Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to create a crystal report using code at run-time, that is, I want to add the dataset created through code to be added to my crystal report.

Thanks in Advance.
Posted

Yes you have specified the reportsource but no path is provided.

You have not specified the report file path. Write This

C#
reportDocument1.Load(@'Paste Your Report File Path');
 
Share this answer
 
Here you go
C# Crystal Reports without database[^](Using Strongly Typed Dataset)
 
Share this answer
 
Comments
Espen Harlinn 11-Feb-12 6:13am    
5'ed!
Use CrystalReportViewer And Fetch the data from dataset into that report
 
Share this answer
 
Comments
djrocks0101 11-Feb-12 4:43am    
I have fetched the data into the dataset, but not getting the code to set that into the data report. please help..
Aniket Yadav 11-Feb-12 4:46am    
Will You Please Provide A Sample Code
djrocks0101 11-Feb-12 4:48am    
This is the code I am using..


Connect.con.Open();
string cmd = "Select * from system.Branch";
OracleDataAdapter oda = new OracleDataAdapter(cmd,Connect.con);
DataSet ds = new DataSet();
oda.Fill(ds,"Branch");
reportDocument1.SetDataSource(ds);
crystalReportViewer1.ReportSource = reportDocument1;
Aniket Yadav 11-Feb-12 4:53am    
This may be absurd but Did You Provide the report Path and logoninfo? to your report
Aniket Yadav 11-Feb-12 4:53am    
Your code seems ok to me but did not find the report path

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