Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Fille Detail in Last Page Post Reply Post New Topic
Page  of 2 Next >>
Author Message
AngeloF
Newbie
Newbie
Avatar

Joined: 13 Apr 2012
Location: Italy
Online Status: Offline
Posts: 18
Quote AngeloF Replybullet Topic: Fille Detail in Last Page
     Posted: 16 Apr 2012 at 1:01am
I want to fill the entire last page of asterisks

PS:
the desired result

HEADER OF LAST PAGE OF THE REPORT

Line 1…………………………..
Line 2…………………………..
Line 3…………………………..
…………………………………....
…………………………………....
…………………………………....
Line N…………………………..
*******************
*******************
*******************
*******************
*******************
*******************
*******************
 
FOOTER OF LAST PAGE OF THE REPORT
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 17 Apr 2012 at 5:51am
you would need to count lines...since CR doesn't tell you where you are on the page or how much you have left.
 
I would think that I would have a detail section that is suppressed while 'Not OnLastRecord'
 
for that section I would have a text box set to Can Grow, that would be tied to a formula. The formula would look something like:
 
shared numbervar icount;
local numbervar irow;
local stringvar ast := "********************************************************" + chrw(13) + chrw(10);
local stringvar answer := "";
for irow := icount to xxx  do //xxx is the number of rows for a page for your report
( answer := answer + ast;
);
answer
 
 
I guess I forgot, you will need a line counter running that is reset every page and incremented as needed...it is what icount represents in the formula...the number of rows already printed.
 
HTH
IP IP Logged
AngeloF
Newbie
Newbie
Avatar

Joined: 13 Apr 2012
Location: Italy
Online Status: Offline
Posts: 18
Quote AngeloF Replybullet Posted: 17 Apr 2012 at 6:23am
How I build the line counter 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 17 Apr 2012 at 10:44am
reset formula, in page header
shared numbervar icount := 0
"" hide reset
 
in each section, detail and headers and footer
increment formula
shared numbervar icount;
icount := icount + 1;
""//again to hide the incrementation.
 
 
IP IP Logged
AngeloF
Newbie
Newbie
Avatar

Joined: 13 Apr 2012
Location: Italy
Online Status: Offline
Posts: 18
Quote AngeloF Replybullet Posted: 17 Apr 2012 at 10:34pm
With my Crystal Reports 8.5,
in the Can Grow formul, I can insert only a boolean Var,
whereby, I can't use your suggestion

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 18 Apr 2012 at 3:15am
no, you want to set the report object to can grow...what you are going to put into it...the astericks, is the output of the formula.
 
I guess another way to say this is: you create a formula. Drop it on the report. Right click on this 'new' object and set it to Can Grow.
 
Does that make more sense?
IP IP Logged
AngeloF
Newbie
Newbie
Avatar

Joined: 13 Apr 2012
Location: Italy
Online Status: Offline
Posts: 18
Quote AngeloF Replybullet Posted: 18 Apr 2012 at 3:51am
another problem :

A max lenght of a string is 254 char,
how do I?

Also,
if the last page has no records, 
equally, appear the asterisks, Why?


Edited by AngeloF - 18 Apr 2012 at 5:18am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 19 Apr 2012 at 6:06am
last page would fill with astericks as there was no detail printed. If the last page is completely blank, you could suppress it, or suppress the astericks based on the CR variable OnLastRecord.
 
As for the 254 char limit...what so you want to do with it?
Only print the first 254 chars or to split the record into 254 strings, or print all.  Actually, I don't think that there is 254 limit, maybe CR defaults to memo when it doesn't know the type.
 
IP IP Logged
AngeloF
Newbie
Newbie
Avatar

Joined: 13 Apr 2012
Location: Italy
Online Status: Offline
Posts: 18
Quote AngeloF Replybullet Posted: 19 Apr 2012 at 7:13am
I get a blank page at the end and I can not delete with suppress,

which section I mput suppress?


Try entering a string with more than 254 char in a formula and see if it lets you save...I can't in my CR
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 19 Apr 2012 at 11:36am
oh, a string in an formula, I guess that could have a limit...
why do you need one?  You could just concatenate one...
 
for a blank last page that you want to suppress, Section Expert, x-2 button on the Suppress line:
OnLastRecord
 
HTH
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