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

Conditional Suppression Question

Status
Not open for further replies.

im4osu

MIS
Apr 14, 2003
12
0
0
US
Hello,

I have a report that will be used to generate patient surveys dependent on the type of service received. Our patients can receive anywhere from one service to eight services. I have created a group on service and added multiple sections to the group footer. Each section is set to suppress if a particular service is not present. The problem that I am having is that one section (F) is supposed to print if section G, H or I are present. However, section F should not repeat itself if more than one of the sections are present. If I print the report right now, I will get section F then G then F then H then F then I. How can I get the report to print section F only once?

Any suggestions will be greatly appreciated!!

Sandy Laws
Manager, Decision Support
Fidelity Health Care
937-208-6495
srlaws@mvh.org
 
You might use a formula with a boolean variable in G to determine if it's been printed yet.

Something like:

@patient group
whileprintingrecords;
booleanvar ShowF := False

G, H, I subfooters level
whileprintingrecords;
booleanvar ShowF;
If <condition>
ShowF := True

Base the display of F on the value of ShowF

-k
 
It does not seem to be working but I have never used the whileprintingrecords command so I am not sure I am doing it correctly. From reading your post, I am assuming that I need create the @patient group formula and then insert it in section F. Currently, the result is always false. Next in G, H, I the following formula has been inserted:

whileprintingrecords;
booleanvar ShowF;
not({@My STC} in [&quot;TX&quot;]); (changes depending on section)
ShowF := True

Then in section F I entered the formula:
{@patient group] = true

Now when I print the report, section F is printing 3 times but section G, H, I are not printing at all.
 
Why not treat it as three distinct conditions? i.e.

a) Applies for section G, never mind H or I.
b) Does not apply for section G, does apply for H, ignore I
c) Does not apply for sections G or H but does for I.

These three distinct conditions result in three distinct actions, printing F after G, after H or after I. You can make three copies of F if necessary, that's a matter of detail.

Madawc Williams
East Anglia
Great Britain
 
It doesn't sound like you are executing the booleanvar suggestion properly. This is how I would do it.

In Group Header F, place this formula:

@patient group
whileprintingrecords;
booleanvar ShowF := False

In Group Footers G, H, and I, place this formula once per footer:

whileprintingrecords;
booleanvar ShowF;
If <whatever condition should make the Group Footer F show is true>
Then ShowF := True

Conditionally suppress Group Footer F with the following condition:

BooleanVar ShowF = False;

Naith
 
OK. The last post helped clarify the booleanvar suggestion so my section F is only printing once. However, now my sections F, G, H and I are not conditionally suppressing so they are printing on every patient record even when that patient did not receive the service.
 
If your other sections were working okay before, you were not meant to change them.

Although you place the boolean formula in their footers, this is all you do. You do not drive the sections G, H, or I in any way by the BooleanVar formula.

Do not change their conditional suppression formulae.

Naith
 
Thanks for all your help!! I did not have a lot of luck with the booleanvar suggestion but just got the report working by creating a running total field. I suppress section F if the running total is not equal to 1. I am sure I was doing something wrong with the booleanvar. Anyway, I just wanted to thank everyone for their input!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top