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

Help with report book comprehension

2 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 07 Jan 2013, 04:31 PM
I am trying to have one report viewer page where a user gets all reports from my software.  I have many different types of reports that need to be available in that report viewer based on querystring parameters that I pass into the page.  I'm having some difficulty finding documentation that is clear and concise about how I need to approach this.

First, there are potentially several reports that could be needed for any given topic but all related to a given entity, say a specific manifest.  Each of these reports is setup to work with SQLDatasource that is parameterized to expect an @manifest parameter to be used in the where clause of my SQL select statement.  I am first visiting a page in my website that allows the user to specify which reports they wish to produce for a specific manifest.  Let's say there are three possible reports for a specific type of manifest.  They may pick any combination of the three they wish to see produced.

I'm taking their input and passing that as a querystring parameter to allow me, on the report viewer page, to determine which reports to produce for that specific entity; i.e., manifest.

My problem arises from not knowing what I need to do to supply the @manifest parameter to each of the reports that will get included in a report book..

Do I first specify the @manifest parameter for each report and then include that report in a report book?  If so, how do I do that using the instancereportsource type syntax?  Do I have to set up a report parameter separate from the parameter in the sqldatasource and somehow link that to the sqldatasource parameter first?  

What I'm trying to accomplish is to modify the sql select statement for each report to reflect the correct entity in the sqldatasource parameter and then add that report to the reportbook, then move to the next report, modify its select statement then include it in the report book, and repeat this in a loop until all the required reports have been included in the report book at which point I show the finished report book to the user.

Hopefully, I've been clear about what I need to accomplish.  I would greatly appreciate some help figuring out how to proceed as I'm pretty new to the Telerik Reporting product and as usual am under some fairly intense time pressure to "get stuff done".

2 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 07 Jan 2013, 06:51 PM
Okay, I guess nobody has any info on how to do what I asked earlier.  So, maybe if I reframe the question?

Here is what I would like to do in pseudo code:

                ReportBook reportbook1 = new ReportBook();
                Telerik.Reporting.InstanceReportSource instanceReportSource1 = new Telerik.Reporting.InstanceReportSource();
                instanceReportSource1.ReportDocument = new StrippingManifestSummary();
                instanceReportSource1.Parameters.Add(new Telerik.Reporting.Parameter("manifest", Request.QueryString["M"]));
                reportbook1.Reports.Add(instanceReportSource1);

My problem is that the last line won't pass muster and the compiler tells me that 

The best overloaded method match for 'Systems.Collections.ObjectMode.Collection<Telerik.Reporting.Report>.Add(Telerik.Reporting.Report)' has some invalid arguments.

So, my question is simply this:

Once I have an instancereportsource and add a parameter to it, how the heck do I assign that report to a report book?
0
Stef
Telerik team
answered on 10 Jan 2013, 04:00 PM
Hello Steve,

We have finished the discussion in a support ticket, but I would like to provide some help articles for anybody following this thread:
Let us know if you still have questions on the matter.

All the best,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Stef
Telerik team
Share this question
or