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

Can someone help me with a Report expression please? 1

Status
Not open for further replies.

Remeartificer

Technical User
May 7, 2004
42
0
0
GB
Can someone help me with a Report expression please?

I have a report that gets printed in response to a company quote. The report has a changeable heading at the top that either says aprooved or Cancellation.

If the Quote is accepted then the quote amount is shown in this report. If the quote is ridiculous then the heading is changed to Cancellation.

The problem I have is that if it is cancelled then my boss does not want the quote figure to be shown.

I have therefore changed the QuoteAmount field to a text box and entered =sum([quoteamount]) into the field. This still leaves me with the amount shown.

What I want is an expression in there that says if the reportdecision=cancellation then the quoteamount is not shown.

I am getting to grips with the basics of this but this one has me stuck. Can anyone please advise?

Many thanks.
 
Code:
=IIf([reportdecision] = "Accepted", Sum([quoteamount]), "")

Have fun! :eek:)

Alex Middleton
 
=IIf([reportdecision] = "Accepted", Sum([quoteamount]), "")

I have tried entering that line into the text box field but the report field in preview remains blank for both Accepted and Cancellation.

Am I entering something wrong? Should there be something within the speach marks at the end of the line?

Cheers for your patience.
 
It should work. make sure everything is typed correctly and that the data in the reportdecision field for the records that you want to show the total for matches the criterion in the condition.

Have fun! :eek:)

Alex Middleton
 
AlexMidd

Well firstly I have to say sorry for doubting you. I have done the sad thing and brought the file home to test again and it worked :)

Secondly, I would like to say a huge thanks for sticking with me. It was much appreciated.

Kind regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top