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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show one field if meets cruteria or show other

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
972
GB
Hi

I am trying to show something if a value in the report footer is equal to something then display one field in the Group Header and if not show another field. Which ever case the other field also needs to be supressed.

So in the report foot I have

Field: Noofstops

In the GroupHeader I have 2 fields
ordeheader.totalvalue and @totvolume.

If noofstops = 1 then I want @totvolume to display and the ordeheader.totalvalue to supress
if noofstops >1 then I want ordeheader.totalvalue to display and the @totvolume to supress.

I cannot figure out how to achieve this, could someone advise on how to do this please, I am sure it is possible

Thanks
 
Silly me sorted it.

Just supressed on the field if noofstops = 1 and vica versa. (under format fields and common)

No sooner did I write this and I realised.
 
You can use Max() anywhere in report. If you just refer to the field in Report Footer is will be whatever is in last record.
Is NoOfStops a field or a formula. If a formula it cannot use any print time functions.
Assuming you can use MAX()

Create new formula
@Display
If Max(NoOfStops) = 1 then @totvolume else ordeheader.totalvalue

If you want to base on value of last record then remove Max
Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top