TfrxCrossView printed on 2 pages

edited 12:34AM in FastReport 4.0
Hello,

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 = 1
In executing the project, the TStrinGrid is printed twice on two pages when I have only one page in my report.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.