How to stop header beeing repeated on each page
How to stop header beeing repeated on each page
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
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
Hello, Tobias.
Could you send us your report template with sample data for analysis?
Thank you.
Could you send us your report template with sample data for analysis?
Thank you.
Re: How to stop header beeing repeated on each page
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!
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
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
Ok, here's my code:
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.
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);
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.
- Attachments
-
- Report.mrt
- (8.91 KiB) Downloaded 351 times
Re: How to stop header beeing repeated on each page
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.
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
Thanks! 2016.01.08 seems to fix this issue.
Re: How to stop header beeing repeated on each page
Thank you, Tobias, for the reply.
Have a nice day!
Have a nice day!