المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : CrystalReports



C# Programming
07-20-2009, 08:21 PM
I have written an application where a user can select some parameters using a windows form. The app grabs data from various tables and amalgamates them into a single table. I have also created a dataset with the same columns as the amalgamated table. I created a new crystal report and added the table in the dataset as its datasource. I dragged the columns onto the report.

At runtime, I fill the table, then set the report's datasource to the amalgamated table like below:
EmployeeReport rpt = new EmployeeReport();// This is the crystal report
rpt.Database.Tables(0).SetDataSource(data); // data is the amalgamated table filled at runtime

Then I set the CrystalReportViewer control's source as below

CrystalReportViewer viewer = new CrystalReportViewer();
viewer.ReportSource = rpt;

However, none of the fields are shown in the report except for the layout which I created at design time using boxes and labels etc.

I have been searching and googling but no luckhttp://www.barakasoft.com/script/Forums/Images/smiley_frown.gif

CodingYoshi

Artificial Intelligence is no match for Human Stupidity.