Friends ,

I am working with windows application with C#.As i am new to crystal reports am having a doubt.
Iam displaying the report fom dataset by passing two parametes.
After passing these two parametes i am binding the data into a dataset. The code is given below

Dataset ds1=new Dataset();
rptwithItemDetails cr = new .rptwithItemDetails();
cr.SetDataSource(ds1.Tables[0]);
crystalReportViewer1.ReportSource = cr;
crystalReportViewer1.Refresh();


So when the report loads it will load from the dataset.
My requirement is that i have to set some report heading in every report(4 fields).
So i am fetching that details from my database table and loaded into another dataset say 'ds2'.

How to pass that values in the dataset as paremeters for setting report heading.

Or can i choose any other option? (Note that the report heading have four fields which is fetching from database table)
Please help me .
Thanks a lot in advance.

where you have write the above code on form load or button click tell me first

where you have write the above code on form load or button click tell me first

Hi prajaktaran
Its In Form _ Load event

why u use this and what is it

rptwithItemDetails cr = new .rptwithItemDetails();


Why u are not using the text field of toolbox with the crystal report

why u use this and what is it

rptwithItemDetails cr = new .rptwithItemDetails();


Why u are not using the text field of toolbox with the crystal report

rptwithItemDetails is that crystalreport which have extension as .RPT . How to use text fields? How to load a textfield from dataset. can u explain

You can take it either while designing a crystal report from toolBox- TextBox Object
or

If you want to combine the text from number of tables then u have to add that table and then add the field u need.

I hope it will help u.

Prajaktaran

If it also not working. If possible show me your all code related to crystal report and connections.

If it also not working. If possible show me your all code related to crystal report and connections.

Leave the issue related to Crystal Reports.
I just want to know how to use textobject in reports.
I mean how to pass parameters to test objects in reports.
I have to pass three values to reports.
So i think i have to use three textobjects.
Assume this three values is in my dataset.
How to pass these dataset values to the three textobjects.
can u please ellaborate.
thanks alot for constant effort.

DataSet can have many tables. Instead of using another DataSet add report header details to that second dataset table and pass the whole dataset not only the first table

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.