Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have done a C # Application and added crystal report, added combo boxes to the application and I am getting the data’s in the combo’s from MS SQL 2008 server database.
Now I need to generate the reports based on selection from the combo boxes and display in crystal report.

Please give me an idea or few samples on how to implement this
Posted
Updated 22-Feb-11 17:27pm
v2
Comments
Prerak Patel 22-Feb-11 23:28pm    
no efforts!!?

Hi! you can use conditions to assign values to variables depending on the comboboxes in following way...

string pid="";
if(ComboBox1.SelectedValue != "")
   pid="P001";


add parameter field in crystal report
then..

ReportDocument cryRpt = new ReportDocument();
cryRpt.SetParameterValue("pid", pid);
CrystalRepotViewer1.ReportSource = cryRpt;


Hope this helps you!:cool:
 
Share this answer
 
v2
 
Share this answer
 

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