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

ReportBook Parameters

1 Answer 212 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Iosu Buenetxea
Top achievements
Rank 1
Iosu Buenetxea asked on 08 Oct 2010, 08:22 AM
Hi.

I have a silvelright reportViewer which Report property is set to a ReportBook.   The reports to be added to this ReportBook are set during runtime and depend upon the parameters sent from SL's client.

I mean, in the ReportBook's constructor, I need to read the parameters, commit a sql command to the database and upons results, add the required reports.     Right now, I cannot read the parameters.   I tried adding a dummy report and get its parameters (which are the same as the real reports ) but they are not filled with the values from the client.


Thanks,


Iosu.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 11 Oct 2010, 04:16 PM
Hi Iosu Buenetxea,

You cannot add parameters on the report book itself and then somehow match the report book's parameters to the parameters of the reports contained in the book. All parameters that a report book can have are those from the underlying reports. The reports instances within the ReportBook constructor are not processed and you can only access the report's definition. Thus you cannot use the ReportBook's constructor to add report's based on the report parameters.

I can suggest another approach and it is to use subreports. The idea is to have a master report with detail section and subreport item in it. Then based on parameters coming from the SL client the master report will generate data source feeding the report with subreports.

Check out the attached sample reports demonstrating the idea.

NOTE: Mind the slightly different rendering of subreports against report book (in the pointed article). For example page sections of subreport are ignored (page sections of the master report are rendered).

Kind regards,
Peter
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
Iosu Buenetxea
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or