General information
Category:
Reports & Report designer
>You're thinking in the right area by wanting to use variables. Here's what you >do. Create the following report variable:
>Name: bStar (or whatever you want)
>Value Expression: bStar OR (cust_refunds / cust_sales > .2)
>Initial Value: .f.
>Reset: End of Page
>Then, put your ** text in the Page Footer and put the following code in the >Print When logic: bStar.
bStar
Value to Store: bStar or (SUM_cust_refunds / SUM_cust_sales > .2)
The SUM fields are summing the table records to put the sum in the group footer - I have no detail section. The bStar is getting set to .T. even though the SUM field values in the equation are .F.. I put the SUM_cust_refunds and SUM_cust_sales in the page footer to see their value.
As each detail record is being read, it must be that the SUM fields are added to and the bStar is evaluated then. I only want the bStar to be evaluated at the end of page. The very first customer record could have the Refunds at $20 and the Sales at $10, which must set the bStar to .T., even though the total Refunds for a customer are less than 20%.
Did I make any sense?
Brenda
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only