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

SUBREPORT PARAMETER BASED ON MAIN REPORT

1 Answer 340 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Francis
Top achievements
Rank 1
Francis asked on 12 Jun 2011, 06:02 PM
Hi,

I have a problem, I am using Telerik Report Q2 2011 with visual studio 2010 silverlight 4 MVVM (C#). I have managed to pass parameters to the report from my silverlight application and its working okay. Thing is one of my reports contains a subreport, the subreport gets its data from a table thats is more of a reference table - main report gets patient data and the sub report gets a patients chronic conditions if (s)he has any. What I want to achieve is;

1) User passes a parameter to the main report using the silverlight report view from the silverlight app. This is working okay.
2) Pass the patient number to the subreport but check to ensure first that the patient has chronic conditions, and populate chronic conditions sub report only if the patient has records in the patient chronic conditions table  otherwise dont pass any parameter to the subreport since I keep getting error if the patient has no chronic condition. This is where I need help. Please help. Any help will be highly appreciated.

Thanks

Francis.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 Jun 2011, 04:51 PM
Hello Francis,

Your question has already been answered in the other thread you've opened:

"The recommended approach for wiring up master report with subreport in order to achieve master-detail scenario is outlined in the Creating Master-Detail Reports Using SubReports help article. This same approach is used successfully in the Invoice demo report which is part of our examples and you can review the report if you have installed them locally.
If we use the above as example, if there is no record for SaledOrderID (in your case chronic conditions), then the subreport would be rendered empty i.e. only static text would be shown. If you want to hide it whenever there is no record for this value, use the approach from the following blog post.

If you're still having problems, please elaborate how you've wired up the master-detail connection and what is the error you get in case there is no record for chronic conditions."


Kind regards,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Francis
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or