Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Different page footers Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Topic: Different page footers
     Posted: 30 Jun 2013 at 11:01pm
Hi all,

I have a question, which I can't seem to answer myself.
For a client, I build an invoice file. This is no problem, did this a few times by now, no problem. The tricky part, is that there could be 3 different page footers, based on the following criteria:

if there is no email address available in the database, and the currency of the account is in EUR, then show page footer A

if there is no email address available in the database, and the currency of the account is in GBP, then show page footer B

If there is an email address available in the database, show page footer C (no matter what the currency is).

I tried different ways of suppressing the page footer, but I get the following error message:
The page size was not large enough to format the contents of an object in the report.

The table where the email address are stored, is linked with an outer join on the database. My suppress formula's so far are:

Page footer A:
isnull({EMAIL.EMAIL}) and
{DEUDA.TIPO_MONEDA_ORIGEN} <> 'EUR'

Page footer B:
isnull({EMAIL.EMAIL}) and
{DEUDA.TIPO_MONEDA_ORIGEN} <> 'GBP'

Page footer C:
not isnull({EMAIL.EMAIL})

Does anyone know how to change the suppress formula's, so that it only shows the correct page footer for every invoice?

Thanks in advance

Kind regards
Gerben
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 30 Jun 2013 at 11:25pm
Small sidenote: before, I only had 2 page footers, only looking at if the currency was EUR of GBP. This worked. It is the part with the email address that is killing me
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jul 2013 at 4:05am
it might be easier to create one formula to display 'A','B' or 'C' then use that result for your suppression.
You can pace the formula in a page footer to see the results to make sure you get the expected A,B or C value. Easier to trouble shoot.
Also in your formula editor set the property to 'use default values for NUlls'. It will keep it the formula from stopping at any nulls (no email address)
//FooterResult
Page footer A:
if not(isnull({EMAIL.EMAIL})) then 'C' 
else 
if {DEUDA.TIPO_MONEDA_ORIGEN} = 'EUR' then 'A'
else
if {DEUDA.TIPO_MONEDA_ORIGEN} = 'GBP' then 'B'
else 'D'
 
 
set each suppression to use that result
e.g.
@FooterResult <> 'A'
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 01 Jul 2013 at 4:32am
Thanks for your reply. I was trying the same thing. I created a formula called Email:
if not isnull({EMAIL.EMAIL}) then
{EMAIL.EMAIL}
else 'Empty'

After that, I created a formula PageFooter:
if {@Email} <> 'Empty' then 'C' else
if {@Email} = 'Empty' and {DEUDA.TIPO_MONEDA_ORIGEN} <> 'GBP' then 'A' else
if {@Email} = 'Empty' and {DEUDA.TIPO_MONEDA_ORIGEN} <> 'EUR' then 'B'

And the page footers have the formula's like this (not ticked):
{@PageFooter} <> 'A'

But I am still getting the same error message as soon as I want to run it, I am getting the same error message.

I tried putting both the Email formula and the PageFooter formula in my report, to see which values I am getting. But these give the correct results by the looks of it. Any ideas?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jul 2013 at 4:48am
did you try my singular formula and did you flip the option in the formula editor to 'use default values for NULLs' ?
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 01 Jul 2013 at 4:50am
Yes and yes.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jul 2013 at 5:02am
what values are you getting from my version of the formula in any unsuppressed footer as compared to what you would expect to see?
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 01 Jul 2013 at 5:09am
That is the weirdest part. When I suppress all the report footers but one, and only show them one at a time, I always get the correct one. However, as soon as I turn 2 of them on, it is giving me the error message.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jul 2013 at 5:14am

sorry, had to reread teh whole thread to see the actul error message.

how large (height) did you make each page footer?
 
the total height of a page footer and page header cannot exceed the the total page size (set up in printing).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jul 2013 at 5:14am
also be wary of setting an object to 'can grow' that would make the footers and or heades expand too much to fit on the page size

Edited by DBlank - 01 Jul 2013 at 5:15am
IP IP Logged
Page  of 2 Next >>
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum