This is a migrated thread and some comments may be shown as answers.

debug (watch) the parameters to the sub-report

5 Answers 168 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 11 Aug 2015, 10:20 PM

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

Sort by
0
Stef
Telerik team
answered on 12 Aug 2015, 03:19 PM
Hi Robert,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Robert
Top achievements
Rank 1
answered on 13 Aug 2015, 04:19 PM

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

 

 

0
Accepted
Stef
Telerik team
answered on 18 Aug 2015, 11:21 AM
Hi Robert,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Robert
Top achievements
Rank 1
answered on 11 Sep 2015, 11:38 PM

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

 

0
Stef
Telerik team
answered on 12 Sep 2015, 12:05 PM
Hello Robert,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
Stef
Telerik team
Robert
Top achievements
Rank 1
Share this question
or