Page 1 of 1

Headers not working Correctly In Subreports

Posted: Mon Sep 20, 2010 7:50 am
by rchecketts
Version 2010.2.764 (called SWPF_2010.09.15)

If I have a HeaderBand followed by a DataBand with data that fills multiple pages. When viewing the report the header appears correctly at the top of each page.

However if I now use this same report as an external SubReport loading it into a main report, when viewing the main report the header is only shown on the first page.

Headers not working Correctly In Subreports

Posted: Tue Sep 21, 2010 2:32 am
by Alex K.
Hello,

This is correct, it was the idea. When designing subreport, one page of the infinite height is generated, so it turns out that in subreport only once displayed header band.

Thank you.

Headers not working Correctly In Subreports

Posted: Tue Sep 21, 2010 9:01 am
by rchecketts
Hello

This is really bad news.

I have multiple reports that I need to merge into 1 report for page numbering, printing, display, exporting to pdf etc. but this will not be any good for me if the subreport pages do not display the headers.

My application involves many hundreds of Sites, each site has multiple controllers. I need to have individual reports for each controller and 1 combined report for a Site. Is this not the sort of thing the sub-reports are intended for.

Another reason to construct a complex report using multiple subreports is because of the very poor performance of the designer once you have more than a few pages.

Would it not be possible to provide a means to override this behaviour? this is very important to me.

Thanks

Headers not working Correctly In Subreports

Posted: Wed Sep 22, 2010 8:39 am
by Alex K.
Hello,

In this case, the main report can be obtained either by adding the pages of your other reports using the following code:

Code: Select all

StiReport mainReport = new StiReport();
mainReport.RenderedPages.Clear();
mainReport.NeedsCompiling = false;
mainReport.IsRendered = true;
for (int i = 1; i < repCount; i++)
{
    StiReport repDeatil = new StiReport();
    repDeatil.Load(repArray[i]);
    repDeatil.Render();
    foreach (StiPage repPage in repDeatil.RenderedPages)
    {
        repPage.Report = newreport;
        mainReport.RenderedPages.Add(repPage);
    }
}
mainReport.Show();
or by adding your additional reports to the SubReports collection of the main report, in this case they are rendered as separate reports:

Code: Select all

StiReport mainReport = new StiReport();
mainReport.Load("");
for (int i = 1; i < repCount; i++)
{
    StiReport repDeatil = new StiReport();
    repDeatil.Load("");
    mainReport.SubReports.Add(detailReport);
}
mainReport.Render();
mainReport.Show();
Thank you.

Headers not working Correctly In Subreports

Posted: Wed Sep 22, 2010 11:32 am
by rchecketts
Hello

Thanks for your help.

Both code solutions work giving me a full master report as I need except for the page numbering.

I have tested a combine of 2 reports both containing 7 pages when rendered.

In the first code example the pages are numbered 1 to 7 and then again 1 to 7.

In the second code example the first 7 pages are all numbered 7 and the second 7 pages are all numbered 14.

I need the pages to be numbered 1 to 14.

Do you have a solution to this?

Thanks

Headers not working Correctly In Subreports

Posted: Fri Sep 24, 2010 3:30 am
by rchecketts
Any help with the above?

Headers not working Correctly In Subreports

Posted: Fri Sep 24, 2010 4:11 am
by Alex K.
Hello,

We are working on the problem. We will let you know when the solution is available.

Thank you.

Headers not working Correctly In Subreports

Posted: Fri Oct 08, 2010 6:43 am
by rchecketts
Hello

Any progress on this issue?

Rick

Headers not working Correctly In Subreports

Posted: Mon Oct 11, 2010 5:13 pm
by Ivan
Hello,
rchecketts wrote:In the second code example the first 7 pages are all numbered 7 and the second 7 pages are all numbered 14.
I need the pages to be numbered 1 to 14. Do you have a solution to this?
We made some improvements in that direction.
Please check the next prerelease build when it will be available and let us know about the result.

Thank you.