Page 1 of 1
How to stop header beeing repeated on each page
Posted: Tue Jan 05, 2016 11:50 am
by Tobias
I have:
HeaderBand
DataBand-Master
DataBand-Detail
Footer-Band
The problem is, that the HeaderBand is repeated on each page. When setting the details to stick together, it happens that I have on page 1 the header but no date and on page 2 the header is repeated with the data following. In this case the header on page 1 is totally useless.
Any suggestions?
Tobias
Re: How to stop header beeing repeated on each page
Posted: Tue Jan 05, 2016 1:02 pm
by HighAley
Hello, Tobias.
Could you send us your report template with sample data for analysis?
Thank you.
Re: How to stop header beeing repeated on each page
Posted: Tue Jan 05, 2016 3:08 pm
by Tobias
I'm afraid it's not that easy - this is really driving me nuts.
I've extracted the code to register the data and run the designer into a sample project using the exact samle report template and there it works fine, but not in my original application (same Reports.net dlls, same *.mrt) - totally weird!
Re: How to stop header beeing repeated on each page
Posted: Tue Jan 05, 2016 3:13 pm
by Tobias
I think found the reason: If for some row in the master data the details data is empty, this happens - I'm trying to prepare a sample.
Re: How to stop header beeing repeated on each page
Posted: Tue Jan 05, 2016 3:23 pm
by Tobias
Ok, here's my code:
Code: Select all
public class Master
{
public List<Detail> Details { get; set; }
}
public class Detail
{
}
Code: Select all
var stiReport = new StiReport();
stiReport.Load("Report.mrt");
stiReport.Dictionary.Clear();
stiReport.Dictionary.BusinessObjects.Clear();
stiReport.RegData("data", new List<Master>
{
new Master
{
Details = new List<Detail>()
},
new Master
{
Details = new List<Detail>
{
new Detail(),
new Detail(),
new Detail(),
}
},
});
stiReport.Design(false);
Please note the the first Master-Record has an empty Details-List. This is what is causing the trouble. If I switch the two Master-records, it works fine.
I've attached the report template. As you will see - the "Foo"-Header is printed on the first AND the second page, but it should only be printed on the second page.
Re: How to stop header beeing repeated on each page
Posted: Wed Jan 06, 2016 2:40 pm
by Ivan
Hello,
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.
Re: How to stop header beeing repeated on each page
Posted: Mon Jan 11, 2016 12:29 pm
by Tobias
Thanks! 2016.01.08 seems to fix this issue.
Re: How to stop header beeing repeated on each page
Posted: Mon Jan 11, 2016 1:43 pm
by Andrew
Thank you, Tobias, for the reply.
Have a nice day!