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!

How can "@formula >= {?parameter}" whilePrintingRecords?

Status
Not open for further replies.

AdventurGurl

Technical User
Aug 2, 2006
16
US
I have 3 formulas created to have an end result of all customer balances added up. I need a parameter to pull >= the total customer balances. However, I cannot select my formula in the Select Expert to equal my parameter?

FORMULA 1 : tot1 //Placed in Report Header
WhilePrintingRecords;
NumberVar total;
total := 0

FORMULA 2 : tot2 //Placed in Group Header #4
WhilePrintingRecords;
NumberVar total;
total := total + {amount};

FORMULA 3 : tot3 //Placed in Group Footer #1
WhilePrintingRecords;
NumberVar total;

//Format all to be suppressed.

I want to say in Select Expert: {@tot3} >= {?ExcludeAmount}
but @tot3 is not an option due to WhilePrintingRecord?

Please Help :)
 
What is the {amount} in your second formula? Is this a database field or is it a summary? Please show the exact formula.

-LB
 
Sorry I was tryint to make it easier to read, here is the exact code I have placed in report:

//curBalTot1
WhilePrintingRecords;
NumberVar totalCustCurBal;
totalCustCurBal := 0

//curBalTot2
WhilePrintingRecords;
NumberVar totalCustCurBal;
totalCustCurBal := totalCustCurBal + tonumber({Account.AC_CurBalance});

//curBalTot3
WhilePrintingRecords;
NumberVar totalCustCurBal;

//Selection Expert:
and {@curBalTot3_can't find in list} >= {?ExcludeCertainAmount}
 
I want to say in Select Expert: {@tot3} >= {?ExcludeAmount}
Are we talking about the record select expert?
Why would you like to filter on non database fields in there?

Anyway, it will be very hard for the database to first get those records you want, then add their balance together and then decide not to pull them up at all... This based on your first post.

Your last post talks about {@curBalTot3_can't find in list}, but what is that?

If I get you right you want to calculate a total balance per customer and suppress this is it is < {?ExcludeCertainAmount}?

If this is the case use a simple suppression statement in the Section Expert...

If this is not what you are after, please explain what you are trying to establish....
 
What {table.field} are you grouping on for Group#1 and #4? Are they from the same table? Please provide both field and table names for the groups.

-LB
 
As the formula is WhilePrinting Records then you can't apply that to an earlier process like record selection.

But what you can do is use that variable to conditionally supress the sections you don't want to see.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top