Combine Reports
Hello,
i try to Combine Reports, for "Note Paper".
My First try with Background Pictures is not very fast an flexible.
My second Try is this:
FastReport.ReportPage frPage = new FastReport.ReportPage();
//Load the Report with Objects in ReportTitel
report1.Load(@E:\Rep1.frx);
frPage = report1.Pages[0] as FastReport.ReportPage;
FastReport.ObjectCollection oc1 = new FastReport.ObjectCollection();
frPage.ReportTitle.GetChildObjects(oc1);
report1.Clear();
//Load Report 2
report1.Load(@E:\Rep2.frx);
//Generate Overlay
frPage = report1.Pages[0] as FastReport.ReportPage;
frPage.Overlay = new FastReport.OverlayBand();
frPage.Overlay.Name = "Overlay1";
frPage.Overlay.Height = 10 * 1.5f;
frPage.Overlay.CreateUniqueName();
//Add the Object from the First Report
oc1[0].CreateUniqueName();
frPage.Overlay.AddChild(oc1[0]);
report1.Design();
My Questions,
1. can i do this, or better an other Way.
2. when the Object is a Picture, the Picture is not show the first Time. After 2 Preview the Picture is visible.
Regards, Frank
i try to Combine Reports, for "Note Paper".
My First try with Background Pictures is not very fast an flexible.
My second Try is this:
FastReport.ReportPage frPage = new FastReport.ReportPage();
//Load the Report with Objects in ReportTitel
report1.Load(@E:\Rep1.frx);
frPage = report1.Pages[0] as FastReport.ReportPage;
FastReport.ObjectCollection oc1 = new FastReport.ObjectCollection();
frPage.ReportTitle.GetChildObjects(oc1);
report1.Clear();
//Load Report 2
report1.Load(@E:\Rep2.frx);
//Generate Overlay
frPage = report1.Pages[0] as FastReport.ReportPage;
frPage.Overlay = new FastReport.OverlayBand();
frPage.Overlay.Name = "Overlay1";
frPage.Overlay.Height = 10 * 1.5f;
frPage.Overlay.CreateUniqueName();
//Add the Object from the First Report
oc1[0].CreateUniqueName();
frPage.Overlay.AddChild(oc1[0]);
report1.Design();
My Questions,
1. can i do this, or better an other Way.
2. when the Object is a Picture, the Picture is not show the first Time. After 2 Preview the Picture is visible.
Regards, Frank
Comments
1) There are two ways to add a backgound picture to a report page:
- use the Page.Watermark. It can be a picture, text or both.
- use the overlay band with a picture inside it.
2) Can you make a simple project that demonstrates this error, and send it to me?