Barbara's suggestion is probably the best way to handle this. The only other alternative I have is to create a report variable (rlPrintRed) and set it to .f. Then create a UDF that you call from the detail band. The UDF should look like this:
IF MyTable.MyValue < 0
ldDate = MyTable.MyDate
SKIP
rlPrintRed = (ldDate <> MyTable.MyDate)
SKIP -1
ENDIF
Cathy
>Let's say I have a table with 5 records:
>
>Date Amount
>========== ==========
>05/19/2003 987.65
>05/20/2003 1234.56
>05/20/2003 -7890.12
>05/20/2003 -99.99
>05/21/2003 5678.90
>
>I want to be able to identify that the -99.99 value is negative or not. I will then use the PrintWhen to display it as red. I do not want the -7890.12 to be red. It is only the last record for that date that should be evaluated. The very little bit that I unsucessfully tried using variables and groupings really isn't an issue here. What I tried didn't work and I was looking for other solutions.
>
>>Can you be more specific about how you are doing this? Are you using report variables? Are you using any SUM or COUNT options? Are you putting the information on the GROUP HEADER, GROUP FOOTER, PAGE HEADER, PAGE FOOTER, or where?
>>
>>Please explain what results you are getting .. and what results you want.
>>
>>Cathy
>>
>>
>>>Not sure. I run it with the objects in the top band and they are the same as they would be in the detail band. I move them to the lower band and some numbers change value. Why? Is there a way to do this using the lower band?
>>>
>>>Renoir
>>>
>>>>Why wouldn't the numbers be correct in the Group Footer??
>>>>
>>>>Cathy
>>>>
>>>>
>>>>>Steve,
>>>>>
>>>>>In the detail band, unless what you're thinking would work in the top grouping band. If it's in the bottom grouping band the numbers do not calculate/display correctly.
>>>>>
>>>>>Renoir
>>>>>
>>>>>>Renoir,
>>>>>>
>>>>>>Are you needing to print something *within* the detail band for the last record (if it is negative)? Or can it go in the group footer?
>>>>>>
>>>>>>>I have a financial report that has groupings according to stocks and then within that detail lines that are in date order. So there could be any number of detail records in date order. I need to check the last detail line for any given date and determine if it is a negative value. I've been playing around with a report variable and using a data grouping, but I can't seem to get it to do what I need. Any thoughts? Thanks!
>>>>>>>
>>>>>>>Regards, Renoir