Reputation: 3360
I have this Crystal
report: Don't mind the foreign language :)
Map: (Below the selected section)
PageFooter A: Services + Description.
PageFooter B: Only Services.
PageFooter C: Only Description. (not optional)
PageFooter D: Signature (optional)
"Service" is optional too, I'll explain that later... (after the behavior)
Client must select:
Show "Service" or not AND
Show "Signature" or not.
IF "Service" selected: (trial nº 1)
Pagefooter B and C must appear. (Signature too)
B supress method:
if PageNumber > 1 then
true
else //Page 1
if {?ISSQN} = "supress" then
true
else //With services
false
C can't be supressed.
...
D supress method:
if {?posSignature} = "top" then
true
else
if PageNumber > 1 then
true
else
false
Result:
Only half of PageFooter C
appears.
IF "Service" selected: (trial nº2)
Pagefooter A
must appear. (note: this pagefooter is nothing more than B + C)
In this case, I can delete the two pagefooters (B and C), will happen the same thing above (trial 1), The report won't alocate space for the Section D. AKA: Crytal report can't manage to have 2 footers.
Result:
Pagefooter A
appear, but there is a large blank space relative to the size of the supressed Pagefooter B + C, and Pagefooter D
consumes part of that space. (maybe because he came later)
There is 2 optional sections, (Service and Signature) and the required Description.
4 states:
+Service +Signature
-Service +Signature
+Service -Signature
-Service -Signature
I tried to make 3 Report Footers, the behavior of trial 1 happen.
I also tried to make 4 report footers (with the 4 states), if the client don't choose 1 of the optional fields, a white space is left in the report (like the behavior of the trial 2)
Upvotes: 0
Views: 132
Reputation: 3360
I manage to get working using UnderlaySection option.
Map:
+Serice +Description +Signature (false, false, true)
-Service +Description +Signature (true, false, true)
+Service +Description -Signature (false, true, true)
-Service +Description -Signature (true, true, true)
Thanks for helping... :D
Now, the two optional sections fit the space, finnally!
BUT only works manually, I don't know if need some special formula, here is mine:
if {?service} = "true" then //If supress services
true //do underlay
else
false
if (param["posSignature"] == "top") //Dictionary of params
{//danfe is my report
danfe.PageFooterDescription.SectionFormat.EnableUnderlaySection = true;
}
else
{
danfe.PageFooterDescription.SectionFormat.EnableUnderlaySection = false;
}
if (param["Service"] == "supress")
{
danfe.PageFooterService.SectionFormat.EnableUnderlaySection = true;
}
else
{
danfe.PageFooterService.SectionFormat.EnableUnderlaySection = false;
}
Upvotes: 1