TfrxCrossView printed on 2 pages
Hello,
I put a CrossView on a band MasterData et write this code :
In executing the project, the TStrinGrid is printed twice on two pages when I have only one page in my report.
I put a CrossView on a band MasterData et write this code :
void __fastcall TForm2::frxReport1BeforePrint(TfrxReportComponent *Sender)
{
TfrxCrossView* Cross;
AnsiString s=Sender->ClassName();
if(s == "TfrxCrossView")
{
Cross = (TfrxCrossView*)Sender;
for (int i = 1;i<=2;i++)
{
for (int j = 1;j<=2;j++)
{
Variant pRows[] = {i};
Variant pCols[] = {j};
Variant pStrs[] = {"12345"};
int nSize = ARRAYSIZE(pStrs);
Cross->AddValue((const Variant*)pRows,ARRAYSIZE(pRows)-1,
(const Variant*)pCols,ARRAYSIZE(pCols)-1,
(const Variant*)pStrs,ARRAYSIZE(pStrs)-1);
}
}
}
}
MasterData > RowCount = 1In executing the project, the TStrinGrid is printed twice on two pages when I have only one page in my report.