I am using QuickReport and am trying to make a report with more than one page. I tried to create two reports in diferent forms, separate, and then in the main form I put a preview button and a composite report to put both reports together, however on the preview just appears the last page added.
I used the following code:
//----------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//----------------------------------------------------------
void __fastcall TForm1::QRCompositeReport1AddReports(TObject *Sender)
{
QRCompositeReport1->Reports->Add(Form2->QuickRep1);
QRCompositeReport1->Reports->Add(Form3->QuickRep1);
}
//----------------------------------------------------------
void __fastcall TForm1::BtnPreviewClick(TObject *Sender)
{
QRCompositeReport1->Preview();
}
//----------------------------------------------------------
I did add all units and forms to Form1. Am using Builder 6 C++ and QuickReport v 3.0.9. Can anyone help?
Another thing, somehow i cant use "begin" or "procedure", any ideas why??