Add Report to Print Project?
Hi everyone. I have a report that works well, but I want to prepare several Fast Reports and add them all together to a single print project.
Am I able to do this? The data is from various sources so compiling a single report with all of it would be incredibly difficult if not impossible.
But I don't want to send 10 different print jobs to the printer either.
Any help would be greatly appreciated.
Thank you!
Comments
You can use the appending of prepared reports - report.Prepare (true)
Example:
report.Load(file1);
report.Prepare(true);
report.Load(file2);
report.Prepare(true);
report.Load(file3);
report.Prepare(true);
Thank you for your help!
Am I understanding properly that this has to be a file from the file system and not one in memory?
When I try to do this, it doesn't work:
//Get Directory for Reports
string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string FileString = @"\PATH\Reports\Report.frx";
string directoryString = appdata + FileString;
report.Load(directoryString);
report.RegisterData(PrintDT, "Agent");
report.RegisterData(PrintCommunicationsDT, "Communications");
report.RegisterData(PrintJobsDT, "Jobs");
foreach (FastReport.Data.DataSourceBase item in report.Dictionary.DataSources)
{
item.Enabled = true;
}
BigReport.Load(report);
BigReport.Prepare(true);
Thanks!