Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Can a field formula error do page break, no hdr? Post Reply Post New Topic
Author Message
MikeB75
Newbie
Newbie


Joined: 30 Sep 2011
Location: United States
Online Status: Offline
Posts: 8
Quote MikeB75 Replybullet Topic: Can a field formula error do page break, no hdr?
     Posted: 06 Mar 2012 at 3:56am
Still a rank newbie ... modifying an existing Crystal 2008 that writes our company's checks including stub, back, etc....   I came across one formula error that warned, but also did a page-break without header or footer.  Now I have another error I suspect is similar (rarely used field is non-zero in the problem case), that causes immediate page-eject, with no header or footer.  I have no error message to go on.  Any hints?
Mike Bragg
Phoenix Life Insurance
One American Row, MS H7-E
Hartford, CT 06102
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Mar 2012 at 5:38am
I've looked at this a couple of times, and my first reaction is that there should be header and footer...
 
but if there are formulas to suppress the header and footer, it could be that the when the page break is forced, that the suppression formulas are enforced which could result in the events that you are seeing.
 
CR handles NULL values in an 'odd' way (I think it raises an error, but doesn't display it) which could cause unanticipated results.
 
this is a bit off topic, but if you have this in your code:
if {table.field} = 7 or isnull({table.field}) then...
 
if your data is null, CR won't execute the code even though you check for ISNULL, but....
if isnull({table.field})  or {table.field} = 7  then...
 
will work as expected.
 
there might be other gotcha that I don't know about, but this is one that is easy to make (I'm sure that I made it a few times myself)
 
HTH
IP IP Logged
MikeB75
Newbie
Newbie


Joined: 30 Sep 2011
Location: United States
Online Status: Offline
Posts: 8
Quote MikeB75 Replybullet Posted: 07 Mar 2012 at 6:44am
Thank you for your time!  I know a little more than I did yesterday, but have not had time to test my latest theory yet.  The application process that prepares the data for the CR's query, was modified to add more detail lines  to the stub, than there is physical space, before going to a continuation page.  So it "feels" like the extra lines are physically pushed to the next page without triggering headers and footers, and without incrementing Crystal's built-in PageNumber field.

I have lowered the # of detail lines pushed to the query, and will test today or tomorrow.  Still, I will keep your description of null-handling with me!

Years and years of procedural language work, sometimes don't prepare me for Crystal...  There's nothing like a breakpoint debugger, or the ability to embed messages, is there?
Mike Bragg
Phoenix Life Insurance
One American Row, MS H7-E
Hartford, CT 06102
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Mar 2012 at 8:08am
well, no break points. 
I tend to use formulas and drop them on the report and see what's going on.
 
What's the term for reports...blackbox testing.
 
you know what goes in and comes out, but not a clue about the implementation.
 
again, you would think that if the stub got too long, it should trigger the new page.  They might have code to suppress the header/footer for long stubs as you would still want to print the stubs, but not the check again.
 
I have done a few checks in another reporting system, and the stubs are always the kicker, how to handle the various layouts the clients want for their stubs.
 
Again, I would look and see if there is conditionaly suppression occurring in the SectionExpert for the headers and footers
IP IP Logged
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