Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody
i developed a main report and call it based on date parameter using stored proc in c# code.
now iwant to call sub report so any code is mention in c# or it automatically call by
main reoport stored proc any body help me in this
Posted

Please look on that,

C#
ReportDocument myreport = new ReportDocument();
myreport.Load("C:\MyReport.rpt");

ReportDocument subreport = myreport.SubReports[0];
DataSet subds = GenerateReportData(subreport.name)
myreport.SubReports[0].SetDataSource(subds);
 
Share this answer
 
Comments
Md. Rashim Uddin 24-Aug-11 8:07am    
Is it Solve your problems?
Md. Rashim Uddin 25-Aug-11 4:42am    
Is it Working for you? Please lemme know if not or if you need any assistance.
singh Rishi 2-Jan-16 12:21pm    
please explain DataSet subds = GenerateReportData(subreport.name)

what is generatereportdata here
you just check it with "Shared Variables" in crystal report
 
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