Hi,
I have a main report which has a sub report.
The main report receives para1 from user's input and talks to the SQL server to get para2 and para3 and pass these to sub-report as parameters. where should I set the breakpoints in visual studio to see the values of para2 and para3?
thanks!
5 Answers, 1 is accepted
The values passed to the sub report must have been transferred via report parameters in the sub report - How to: Create a Master-Detail Report Using a SubReport Item. Thus you can directly use the report parameters in expressions in the sub report to check the received values.
If you need further help, please elaborate on the reason to access report parameters in code.
Regards,
Stef
Telerik

Thanks. I can pass the values from the main report without any problem. However, during the testing/debugging, how can I see the values which has been past to the sub-reports because the values is generated after the main report?
For example,
I pass para1 =1 to the main report.
The main report run sql statement and generate para2=2 and para3=3 to the sub-reports. How can I set a breakpoint in VS so I can read the values of para2 and para3? Or is there any other way for me to debug/watch the values?
Thanks
Expressions and values of parameters and items are processed internally by the reporting engine. If you need to debug and log if values are passed, test subscribing for the report's events e.g. ItemDataBinding where you can get the processing report and its Parameters collection - Using Report Events.
Before adding any other logic in events, please check the Understanding Events article.
Regards,
Stef
Telerik

Got it. so even I try to debug the main report query but I should trigger sub-reports ItemDataBinding to see what values are passed-in. instead of looking at main report to know what values I am going to pass to my sub-reports. Please correct my if I mis-understand it. thanks
If the SubReport.Report property is not configured correctly to map the sub report's parameters to fields/parameters of the master report, you will not get this information by debugging only the master report. Thus you need to debug the separate report definitions.
Regards,
Stef
Telerik