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!

Report Variables not Evaluating 2

Status
Not open for further replies.

carolx

Programmer
Jul 22, 2003
75
JM
Hello Forum

I have two formulae for report variables in sequence in Report Properties: IIF(flowtypeid = 8,amount,0) and IIF(flowtypeid = 6,amount,0) . The first outputs a non-zero amount, the second outputs 0. The records have non-zero values for flowtypeid = 8 and flowtypeid = 6. Do you know what is happening here?
 
Hi Carol,

Report Variables are acting on the report level.

You you want the fields to be evaluated you'll have to put the variable expression into the field expression (see attachment)

FieldVariable_kwxfki.png


hth

MarK
 
Still not sure whether we're getting there, but I'd look into the two report variables you already have, especially their calculation type. If they are set to "Sum", your report detail band (or a group band) will have report fields that use the report variables as their expression to print. Well, then you can add a third report field with inflowreportvariablename-oputflowreportvariablename as its expression and don't need a third report variable at all.

That idea I proposed already, too, but maybe it becomes more apprent after you looked into the details of your two already existing report variables.

Chriss
 
Hi Carol,

Some years ago I wrote a little demo to show how to use report variables, variable field expressions and the system variable _VFP.SetVar() - it pops up when DBLClicking on the group footer 1 and group footer 2.

[URL unfurl="true"]https://res.cloudinary.com/engineering-com/raw/upload/v1708940229/tips/planning_aixqj0.7z[/url]

If you work a lot with reports, you may want to have a look at "The Visual FoxPro Report Writer: Pushing it to the Limit and Beyond Paperback – January 1, 2002"

hth

MarK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top