This is a migrated thread and some comments may be shown as answers.
Use same report as standalone or sub-report
3 Answers 27 Views
This is a migrated thread and some comments may be shown as answers.
Tomica
Top achievements
Rank 2
Tomica asked on 29 May 2011, 02:27 AM
I have an application where we would like to combine several individual reports into one master report.

I created all six of the sub-reports, and they each have specific report header sections which describe the content.

When embedding these reports, I need to suppress the display of the report header.

I am thinking I can either make that section invisible by default, and then change to visible when the report runs all by itself.

Or the opposite, making the header invisible when I detect that the report is contained inside a parent report.

Question #1: is there a way within the sub-port code to determine if there is a "parent"?

Question #2: is there a way to access the sub-report header setting (visibility) from within the code of the master report?

As an example, in another thread I learned how to set properties in the main report. I am lacking in the knowledge of how to dig deeper into the content of the subreports. In effect, "....some kind of cast....some report property.....find something or other inside subreport1..."

Dim report As Telerik.Reporting.Report = DirectCast(Me.ReportViewer1.Report, Telerik.Reporting.Report)
Dim txt As Telerik.Reporting.HtmlTextBox = TryCast(report.Items.Find("filter_description", True)(0), Telerik.Reporting.HtmlTextBox)
txt.Value = HttpContext.Current.Session("grid_title")

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 May 2011, 07:53 AM
Hi Tomica,

According to your scenario description, a better option would be to use the Report Book feature which main purpose is combining different reports into one. Unlike the SubReports, each report part of a report book keeps its page sections and layout.

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
0
Tomica
Top achievements
Rank 2
answered on 30 May 2011, 03:19 PM
I was under the impression that each report in the "book" would start out on a new page.

As the sub-report sections vary significantly in size, sometimes only a few lines, there would be too much whitespace (i.e. jump to new page).

I resolved this in the sub-report scenario by removing the "keep together" setting.

Is there a similar option with report books?
0
Peter
Telerik team
answered on 31 May 2011, 02:09 PM
Hi Tomica,

The by design behavior of the ReportBook item is to start the reports on a new page. If you have lots of small reports and you want to show them continuously on the page it makes sense to utilize SubReports instead.

Best wishes,
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
Asked by
Tomica
Top achievements
Rank 2
Answers by
Steve
Telerik team
Tomica
Top achievements
Rank 2
Peter
Telerik team
Share this question
or