Click here to Skip to main content
15,889,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am new to crystal report....i have to create a crystal report where i have passed a dataset object to the report.... the dataset consist of a table that i reuqired to display on report.. here is the code

C#
ReportDocument CReport = new ReportDocument();
      CReport.Load(Server.MapPath("~/C_Report/iCard.rpt"));
      DataTable dt = (DataTable)HttpContext.Current.Session["dt"];
      CReport.SetDataSource(dt);


      CrystalReportViewer1.ReportSource = CReport;
      CrystalReportViewer1.DataBind();


now i added the datafields from the dataset to the report design...
i want to achieve : to display four rows from a datatable to be displayed on a page...i.e four differect detials of the record on each page. but i get the same record on the same page..and next record on next page
Posted

Use strongly type dataset object option

create xsd type file
and pass it to crystal report
 
Share this answer
 
Comments
raul313 10-Apr-14 3:00am    
Ankita.... i have added the dataset object (xsd) to the project and the same dataset i haved used in the crystal report....
i just need to print the next row of the table on the same page...
Ankita M 10-Apr-14 5:22am    
can you please explain with eg.
raul313 12-Apr-14 1:48am    
consider creating i-cards for student...6 students icard should be printed on a page
Ankita M 12-Apr-14 2:16am    
Steps:

Add report File
Add your Dataset file
Using Reports Create wizards
Initially select only 2 filed fields that is student name and suppose roll no
Then using group by ...group by student name
and in detail section select roll no
then your student name will come in group header section and roll no will be in detail section
then drag that roll no filed in group section ...similary what fields you want to add that drag into to group header section
not in detail section
then it will come in same page

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900