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 of page footer 1

Status
Not open for further replies.

CoffeeManOhYesIAm

Technical User
Feb 17, 2005
21
0
0
US
Feliz Cinco de Mayo, Everybody! -

I'm using CR 8.5 to generate a "Job Traveler" report that circulates around our shop with each part we make. Every part has a unique job number ({JobHead.Jobnum}), assembly number ({Jobasmbl.AsmSeq}), and BOM sequence ({Jobasmbl.BOMSEQ}) which directs the manufacturing operations to perform in order, starting with the number 10 (i.e. Operation Sequence ({JobOper.OprSeq}) = 10, 20 ... 80, 90).

===========================================================

The structure of the report is as follows:

Page Layout = Landscape, 8.5 x 11 inch.

RH - Suppressed
PH - Suppress if: PageNumber = 1.
GH #1 (grouped by job number)
GH #2 (grouped by subassembly)
GH #3 (grouped by BOM sequence)
GH #3a - GH #3k (optional pages of info)
Details a - Suppress if: isNull({JobOper.OprSeq})
Details b - Suppress if: isNull({JobOper.OprSeq})
Details c - Suppress if: isNull({JobOper.OprSeq}), New Page After.
Details d - Suppress if: isNull({JobOper.OprSeq}) or CheckBox01 = False.
// User will check the CheckBox01 if s/he wants to print related scanned documents at this operation.
GF #3 - Suppressed, New Page Before, Reset Page Number After.
GF #2 - Suppressed
GF #1 - Suppressed
PF - Suppress if: isNull({JobOper.OprSeq}) (Contains tables with space labeled for Operation Signoffs from Operators, Supervisors, Inspectors)
RF - Suppressed.

===========================================================

Of the 4 details sections, the a, b, & c sections appear for every record of ({JobOper.OprSeq}).

PH + Details a + Details b + Details c + PF = one page height.

In some cases (when the CheckBox01 = True) Details d must be shown as well, on its own page. When this happens, the PF should be suppressed on that page.

My brain hurts from seeing too many Johnny Damon commercials, so I can't figure out how to do this.

So if anybody knows how I can suppress the PF when details d is not suppressed but still have it appear under details a - details c, I would love to hear your solution...This is driving me nuts!



[pc]

 
Who is Johnny Damon, and isn't there a cure for it?

Place a formula in Details D to set a variable if D is not suppressed, then reference that variable in the page footer as the suppression.

So if your details D has suppression such as:

if {table.field} = "SomeValue" then
true
else
false

Add in a formula to details D such as:

whileprintingrecords;
booleanvar PFSuppress:=False;
if {table.field} = "SomeValue" then
PFSuppress:=true

Now reference that formula in the suppression formula for the Page Footer

whileprintingrecords;
booleanvar PFSuppress

-k
 
K-

Thanks for your response. I gave it a try and these are my results:

My report has 21 records under Group #3, 21 Operations if you will, (numbered 10 to 210). At Operation 120, the planner wishes to print a related scanned document, and so checks the CheckBox01 (setting the field {JOBOPER.JOCHKPRINT} to TRUE). Thanks to your logic (and some of my own referenced in my first post), this causes Crystal to show details d at record 12 - on its own page and without the PF. So this works, as was desired.

However, the PF does NOT show on the next page: record 13, details a, details b, & details c. the details d section is suppressed for this record.

Then for the remaining records, the PF appears. What's going on?

==================================================================================================



The exact logic used was:


Details d, suppression formula:
---------------------------------

if (IsNull ({JobOper.OPRSEQ}) or {JOBOPER.JOCHKPRINT} = False) then
True
else
False



Details d, formula @PFSuppress:
---------------------------------

WhilePrintingRecords;

Global booleanVar PFSuppress := False;

if ({JOBOPER.JOCHKPRINT} = True) then
PFSuppress := true



PF, suppression formula:
---------------------------------

Global booleanVar PFSuppress;

if (isNull({JOBOPER.OPRSEQ}) or PFSuppress = true) then
True
else
False


==================================================================================================

What do you think, maybe I should add something to the PH that sets PFSuppress to False?

Thanks again for your help.

-CMOYIA

[morning]



 
Ah-HA!

A formula in Details A did the trick!

=========================================================


Details a, formula @Da - PFSuppress:
------------------------------------

WhilePrintingRecords;

Global booleanVar PFSuppress := False;

=========================================================

Hee hee! I'm so happy!

SynapseVampire, Thanks for all your help! You deserve a STAR.
 
Oh by the way.....

Johnny Damon is the shaggy CF for the Boston Red Sox.
He's also doing commericials for Dunkin Donuts & Puma...and they are on ALL the time.

Arrgh!

[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top