Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

conditional text formatting

Hi,

Based on some selection I want to print text conditionally on report.

For Ex:

If there are records available based on parameter selection .I would like to print 'End of Report ' in black font in report footer section.

But if there are no records available then print 'No Record Found' in red font color .

I am using below formula: (the formula is placed in report footer section)

IF (Count ({PDOC_PRO_INDENT_TRACKING_A.REQUISITION_NO}) <> 0 )

    Then '************************ End of Report ************************'

     ELSE 'No Record Found'

Thanks ,

Karan Sheth

Tags:
Former Member
replied

Hi Karan,

Here's an easy way to do this:

1) Create two Report Footer sections

2) Create a formula with this code and place it on Report Footer a:

IF (Count ({PDOC_PRO_INDENT_TRACKING_A.REQUISITION_NO}) <> 0 )

Then '************************ End of Report ************************'

else "";

Change the font color of this formula field to Black

3) Create another formula and place this on he Report Footer b:

IF (Count ({PDOC_PRO_INDENT_TRACKING_A.REQUISITION_NO}) = 0 )

Then 'No Record Found'

else "";


Color this formula field in Red


4) Go to the section expert > select Report Footer a > Check the option 'Suppress blank section'. Do the same for Report Footer b.


-Abhilash


0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question