Reputation: 916
Is there any way to set up a formula to display a value depending on the value in another field?
Say if new_field = -1 then display info in new_field2 of that data row? How would a formula for that work?
I've tried it now with doing a formula that just has if{table.order} = 3 then {table.value} ...the value is a number...but it is just showing 0.0 each time while the value is showing up normally with the other records that display above when just dragging and dropping the database value field into my group. I'm trying to put this formula in the report footer to display additional information on one of the records.
Upvotes: 0
Views: 3330
Reputation: 11
Create a formula similar to the following: @DisplayNote
Global stringvar xx;
if {db.field1.value} = 1 then xx:= "your text" else xx:= ""
Then create a running total formula: #DisplayText
Select the @DisplayNote formula as the field to summarize. Type of summary = maximum
Then place the #DisplayText on the pagefooter.
Upvotes: 1
Reputation:
Try inserting the maximum of the formula value into the report footer, instead of the formula value itself.
Upvotes: 0
Reputation: 21905
In the footer, it is too late to display info on any single record in the report. They have all been processed and are gone by the time the footer is proocessed.
You could probably set up a global variable and set the value in a hidden formula in the detail section when the interesting record is processed. The use a formual to display the global variable value in the footer.
Upvotes: 0