cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Variable

Former Member
0 Kudos

Hi All,

I have a main report having some sections .For every section i am having 1 sub report.I gave some logic's to suppress the section.

Now my requirement is i have a text box which i have to display  the corresponding report not executed.(section is not executed)

I hope we can do this by Boolean variables.

Please suggest how to do this.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Divya,

You don't really need a Booleanvar to be able to do this.

You can use the same logic described in your previous post here:

http://scn.sap.com/thread/3433350

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thank you.

As you told i created the below formula in main report

shared numbervar s1;

shared numbervar s2;

shared numbervar s3;

shared numbervar s4;

shared numbervar s5;

if s1 = 0 then

     "Subreport 1 is Blank"

else if s2 = 0 then

     "Subreport 2 is Blank"

else if s3 = 0 then

     "Subreport 3 is Blank"

else if s4 = 0 then

     "Subreport 4 is Blank"

else if s5 = 0 then

     "Subreport 5 is Blank"


Suppose 4th report executed and it is having data but  it is showing NoDataAvailable for Report 1.

But I don't want to show any message whenever i have data for any report.

Please suggest

abhilash_kumar
Active Contributor
0 Kudos

I'm sorry I didn't understand what you just said.

So Subreport 4 has data and you get a message saying 'Subreport 1 is Blank'?

How about Subreport 1; is it blank? If it is blank then you will get that message. Isn't that how you wanted the report behave?

By this statement

But I don't want to show any message whenever i have data for any report.

Are you trying to say that you Don't want to show that message when any one of the Subreports has data? Or in other words, show that message when 'All' the Subreports are blank?

If yes, then modify the code to:

shared numbervar s1;

shared numbervar s2;

shared numbervar s3;

shared numbervar s4;

shared numbervar s5;

if s1 = 0 AND s2 = 0 AND s3 = 0 AND s4 = 0 AND s5 = 0 then

     "Subreports are Blank"

If that's not what you want, please explain in detail.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Actually i am keeping my report in a web portal there my user have a link called stack having 3 values.

S,P,A.

If my user click S then he clicked report 1 .in that case if report 1 don't have data i need to show the message NoDataForReport1

If my user click P then he clicked report 2.in that case if report 2 don't have data i need to show the message NoDataForReport2

If my user click A then he clicked report 3 .in that case if report 3 don't have data i need to show the message NoDataForReport3

Upto here fine

incase my user click S and if he clicked report 2 at that also i need to show  NoDataForReport2 even sub report 2 have data

incase my user click S and if he clicked report 3 at that also i need to show  NoDataForReport3

even sub report 3 have data

Former Member
0 Kudos

Hi Abhilash,

Please find my report.Unfortunately it will not show you preview.Please find my suppression logics for every section and text boxes for every sub report.

I tried with boolean var i don't know whether that is correct or not.

Please suggest

Answers (0)