ReportBook Parameters

2 posts, 0 answers
  1. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 08 Oct 2010 Link to this post


    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.


  2. Peter
    Peter avatar
    1629 posts

    Posted 11 Oct 2010 Link to this post

    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,
    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
Back to Top