Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula to get data printed on page header doesn't work for the 1st pg

Status
Not open for further replies.

stanja

MIS
Sep 10, 2001
149
BE
Hello ,

i use 2 formulas to print a field on the page header.

for1 = WhilePrintingRecords;
if onfirstrecord then stringVar dosnr := {adorecordset_ttx.DossierNR};

for2 = WhilePrintingRecords;
stringvar dosnr ;

this prints the field , but the problem is that the stringvar dosnr isn't being printed on the 1st page , but only on the pages that follows .

Do i've to use another function in my formula or ???

any help would be appreciated

tx

Stanja

 
As a work-round, you could put the field itself in the same spot on the first page. Suppress if it is not onfirstrecord.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Madawc ,

Isn't there anothe workaround , function ?
It are a lot of fields


Stanja
 
I can't see one. Except to have two page header sections, and suppress the unwanted one. Right-click on the detail section and choose Format Section. Then choose the formula icon (x+2 and a pencil) for suppression. Enter a formula

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
You gave little information on what you are trying to accomplish. Are you wanting to print something on the 1st page header only? If so, then I would do the following adjusted to accommodate a report header if you are printing one.

//@For1
WhilePrintingRecords;
if PageNumber = 1 then
{adorecordset_ttx.DossierNR}
else
""






 
kskid , the information must be printed on each page header .
The records comes from a select ... union select ...
where by the page header information isn't in the result of the last records , that's why i need the info for the page header being kept for the further pages.
The first solution of madawc works but there are so many fields that i would like to resolve this with another option , if there's one.

grtz
stanja
 
StanJa:

You might try inserting "EvaluateAfter()" between the "WhilePrintingRecords" and the rest of the formula. Like this.

Code:
for1 = WhilePrintingRecords;
EvaluateAfter({adorecordset_ttx.DossierNR});
if onFirstRecord then stringVar dosnr := {adorecordset_ttx.DossierNR};

for2 = WhilePrintingRecords;
EvaluateAfter({adorecordset_ttx.DossierNR});
stringVar dosnr ;

Since I don't know all the intricacies of this report this may not help, but it's a simple addition to your formulas and it has helped me quite a bit in the past.

Good luck!
 
beanbrain,

when i use the formula as you describes it gives me the information but i want to use it to display a certain text and this stays blanc(=for3)

for1: WhilePrintingRecords;
EvaluateAfter ({adorecordset_ttx.taalkode});
if onfirstrecord then stringVar taal := {adorecordset_ttx.taalkode};

for2:WhilePrintingRecords;
EvaluateAfter ({adorecordset_ttx.taalkode});
stringvar taal ;

for3:WhilePrintingRecords;
EvaluateAfter ({adorecordset_ttx.taalkode});
if stringvar taal='NED' then 'DOSSIERNR. : ' else
if stringvar taal='ENG' then 'DOSSIERNR. : ' else
if stringvar taal='FRA' then 'Nr.DE DOSSIER : ' else
if stringvar taal='GER' then 'AKTE NUMMER : '
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top