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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Max Values in Report Header

Status
Not open for further replies.

kamkaro

Programmer
Oct 25, 2006
23
CA
Hi All,

Please help me here.

I have 4 columns where I used max formula in order to get only one value. Now I want to display all four values on report header. After insert the following filed into the Report header I am getting all values accordingly with no issues.
{Max of Command.STATUS_DECS_1}
{Max of Command.STATUS_DECS_2}
{Max of Command.STATUS_DECS_3}
{Max of Command.STATUS_DECS_4}

Problem:
If we have values only STATUS_DESC_1 and STATUS_DESC_4 then on the report it shows only two but with blank space in the middle as STATUS_DESC_2 and STATUS_DESC_3 are Null.

Solution:
Could you please tell me any loop or formula where i can ignore Null values and display not Null values in order (no gap).

Thanks alot.
 
i am not sure i fully understand what you are trying to accomplish, but you may be able to place each value in it's own subsection and then use a formula (something like: "({Max of Command.STATUS_DECS_1})=TRUE" ) in the section expert to suppress the null value rows.
 
I am sorry if I did not explain properly. Let me try again.

If I have the following 4 Max fields or formula
{Max of Command.STATUS_DECS_1} = F
{Max of Command.STATUS_DECS_2}
{Max of Command.STATUS_DECS_3}
{Max of Command.STATUS_DECS_4} = K

Currently, my output result is showing

STATUS_DECS_1 = F
STATUS_DECS_2 =
STATUS_DECS_3 =
STATUS_DECS_4 = K

And I would like to display on report Just

STATUS_DECS_1 = F
STATUS_DECS_4 = K

I do not want to display blank space for STATUS_DECS_2 and STATUS_DECS_3 as both does not carry any data. My question is how do I ignore Null fields.

Thanks.

 
If I understand what you need, the following approach should work.

Replace the 4 individual "maximums" in the RH with the following formula:

Code:
(   
    If      IsNull(Maximum({Command.STATUS_DECS_1}))
    Then    ''
    Else    Maximum ({Command.STATUS_DECS_1}) + CHR(13)
)   
+
(
    If      IsNull(Maximum({Command.STATUS_DECS_2}))
    Then    ''
    Else    Maximum({Command.STATUS_DECS_2}) + CHR(13)
)   
+
(
    If      IsNull(Maximum({Command.STATUS_DECS_3}))
    Then    ''
    Else    Maximum({Command.STATUS_DECS_3}) + CHR(13) 
)
+
(
    If      IsNull(Maximum({Command.STATUS_DECS_4}))
    Then    ''
    Else    Maximum({Command.STATUS_DECS_4}))

This will list them down the page, but without leaving blank lines when there is no data.

Cheers
Pete
 
Another method is to place the fields in a text box, using returns to place on separate lines, and then format the text box (format field->common) to: "Suppress embedded blank lines".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top