my report has one record per page, at least. It is formed by:
-Page1
-Pageheader1
-Masterdata1
-Subreport1 (Page2) within Masterdata1:
-Masterdata4
-subreport2 (Page3) within Masterdata4:
-Masterdata2
-Header1
-Groupheader1
-Masterdata3
-Groupfooter1
-Footer1
-Child1
-PageFooter1
On event OnBeforePrint of Pageheader1, a function must be performed for
each record, checking if will be printed or not, according to some
conditions. If the record should not be printed, the page should not be
visible, and should skip to next record. If the record should be
printed, load data of report and print (or preview).
I tried to put this checking on same event of Page1, but the result was
not expected because ran the function only once at first record, because
its data were repeated on all pages of report.
I tried to put this checking in the event OnBeforePrints of:
- Pageheader1
- Masterdata1
- Masterdata4
- Child1
- Pagefooter1
but the result was not expected, are not filtering wich cannot be
printed and prints nothing.
Thanks
-----------------------------------------------------------------------------------
meu relatorio tem pelo menos um registro por pagina. Ele � composto por:
-Page1
-Pageheader1
-Masterdata1
-Subreport1 (Page2) dentro de Masterdata1:
-Masterdata4
-subreport2 (Page3) dentro de Masterdata4:
-Masterdata2
-Header1
-Groupheader1
-Masterdata3
-Groupfooter1
-Footer1
-Child1
-PageFooter1
No evento OnBeforePrint de PageHeader1 � executada uma rotina que
verifica se o registro ser� impresso ou n�o. Se o registro n�o deve ser
impresso, a p�gina n�o pode aparecer e deve processar o pr�ximo. Se o
registro pode ser impresso, carrega os dados do report e imprime.
Tentei colocar essa verifica��o no mesmo evento de Page1, mas o
resultado n�o foi o esperado, pois s� executou a rotina uma vez no
primeiro registro, porque os dados dele se repetiram em todas as p�ginas
do relat�rio.
Tentei colocar a verifica��o nos eventos OnBeforePrint de:
- Pageheader1
- Masterdata1
- Masterdata4
- Child1
- Pagefooter1
mas tamb�m n�o est� funcionando como esperado, n�o est� filtrando o que
n�o deve ser impresso, simplesmente n�o imprime nada.
Obrigado
------------
Eduardo.