Shared variables and suppressing details sections
I have done loads of google searches and nearly have the answer to this but not quite.
From top to bottom of a report I have;
Report header a
Report header b
Page Header
Group Header
Details a
Detials b
------Sub Report1
------Sub Report2
Detials c etc
Group footer
etc
In Sub report 2 I have a shared variable 'stringvar dkrows2str;'
I want to suppress 'Details c' if this string is empty. I've been altering code but in the suppress section of Detials c i curent have;
shared stringvar dkrows2str;
stringvar array dkRow;
dkRow := split(dkrows2str,chr(13));
if (Count(dkRow)>0) then false else true;
So if the array has elements, dont suppress, else suppress. Thouble is it always displays Detials c.
开发者_开发技巧Any ideas?
- Determine the correct value of
dkrows2str
for the records you want to suppress. (Is it""
?) - Confirm that you're getting the value you expect. Add a formula that contains just
dkrows2str
, place it in the detail section, and examine the values. - Rewrite your Suppress formula to use
dkrows2str
– it's the simpler of the two variables.
Ordinarily I'd suggest checking for null, but I don't think variables can have null values. So perhaps this:
dkrows2str = ""
精彩评论