Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Get the correct Row No. display Post Reply Post New Topic
Author Message
Elisha83
Groupie
Groupie


Joined: 19 Feb 2008
Location: Malaysia
Online Status: Offline
Posts: 62
Quote Elisha83 Replybullet Topic: Get the correct Row No. display
     Posted: 22 Apr 2009 at 11:41pm
Hi there~
 
I need help to retrieve the correct Row No. for my 2nd page. I need to display the same Store Type name at 2nd page if 1st page cant fit all the information for 1st Store Type. Just because the repeated Store Type name at 2nd page, it reset my Row No. starting from 1 eventhough is the same Store Type with the 1st page.
 
Example :
 
Page 1                                                        Page 2
 
Store Type 1                                               Store Type 1
                                         
1    Ace                                                        1 Geo
2    Bag                                                        2 Pastry
3    DKNY
4    Flyer                                                      Store Type 2
                                                                  
                                                                    1 Ame
                                                                    2 Booklet
 
 
Desire Output :
 
Page 1                                                        Page 2
 
Store Type 1                                               Store Type 1
                                         
1    Ace                                                        5  Geo
2    Bag                                                       6   Pastry
3    DKNY
4    Flyer                                                      Store Type 2
                                                                  
                                                                    1   Ame
                                                                    2   Booklet
 
 
 
Please advice.. Urgently need help on this.
 
 
 
Thanks in advance..
 
 
Eli
 


Edited by Elisha83 - 23 Apr 2009 at 7:10am
3Lish@
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Apr 2009 at 6:12am
wouldn't it be 5 and 6?  just checking. 
 
My solution would be to write your own record numbering formula using shared variables.
 
You might be able to use a running total that is a count and display that...I haven't used running totals, but this seems like a situation that they should fit the bill.
 
I don't know how you are generating the record numbers, but maybe they are being reset incorrectly, it should be on the store group changing, not the page.
IP IP Logged
Elisha83
Groupie
Groupie


Joined: 19 Feb 2008
Location: Malaysia
Online Status: Offline
Posts: 62
Quote Elisha83 Replybullet Posted: 23 Apr 2009 at 7:08am

Sorry.. My mistake..yup 5 and 6.. I have write a row no. counting using shared variables. This are my codes.

Row No. (put at  detail section)

WhilePrintingRecords;
Shared Numbervar RowNo := RowNo + 1;

 
Reset Row ( put at Grp Header : Store Type )
 
WhilePrintingRecords;
Shared Numbervar RowNo := 0;
 
 
 
If no repeat Grp Header at 2nd page, then the Row No. will display correctly. But if I want Grp Header repeat in 2nd page whereby the 1st page can't fit all, then the Row No. will display like the Example shown above.
 
What can I do to achieve like the desire output?
3Lish@
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Apr 2009 at 7:14am
Ahh, I see.  The formulas look good, but since this is resetting when the group header is displayed, and that might span multiple pages, I would try putting your reset formula in the group footer instead as that won't be printed multiple times.  Usually, I put the resets in the headers, but in this case...
 
HTH
 
IP IP Logged
Elisha83
Groupie
Groupie


Joined: 19 Feb 2008
Location: Malaysia
Online Status: Offline
Posts: 62
Quote Elisha83 Replybullet Posted: 23 Apr 2009 at 7:19am
Thanks a lot lockwelle.. I get what you mean. Manage to get the right row no. already.
 
 
Really appreciate your help~Big%20smile
 
 
 
Regards,
Eli
3Lish@
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