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

Problem with BooleanVar Shared Variable

Status
Not open for further replies.

marabou

IS-IT--Management
Jan 12, 2001
86
GB
I hope somebody can help me. I have declared a BooleanVar shared variable in my subreport, which always displays the right True/False. However, when I then declare it in the main report, it does not seem to have any relevance to what is actually being tested to get the true or false. Sometimes it is right, most of the time wrong. I was wondering if there was something silly I have missed.

The code for declaring my shared variable is

WhilePrintingRecords;
Shared BooleanVar applicable;
If IsNull ({CONTACT.CONTACTID})
THEN applicable:= FALSE
Else applicable:= TRUE;

The code for declaring the variable in the main report is

WhilePrintingRecords;
Shared BooleanVar applicable;
applicable

I have made sure the formula is declared after the sub-report (I have put it in the next section of the report).

Please help, I have absolutely no idea what the problem is.

Thanks in advance
 
OK, I seem to have got the variable to display the right True/False statement within the report, I needed to put it in the detail section.

However, the point of this was to suppress a section using the variable in the suppress of the format section. It seems that it is now suppressing or not, whenever it wants to, regardless of what the variable says. Help!!!!!
 
Are you trying to suppress the section that contains the subreport when there is no data?....if so I don't think this will work. When there is a conditional suppress in the section of the subreport the subreport won't run...I think that is your problem...

My solution to that is to put the subreport in its own section and as thin as possible and returning no value when there are no records (and putting "Can Grow" onthe subreport to view good data)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top