Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: fetching previous group value in crystal report Post Reply Post New Topic
Author Message
getsen104
Newbie
Newbie


Joined: 27 Mar 2009
Online Status: Offline
Posts: 3
Quote getsen104 Replybullet Topic: fetching previous group value in crystal report
     Posted: 28 Mar 2009 at 12:29am
hi,
    i am using crystal reports in asp.net 2005. thing is in crystal reports, i need to display the value of previous group in start of next page(i am displaying each group in new page)  each page should have the value of previous group except the first page. please give reply to this question..

thanks in advance. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Mar 2009 at 7:04am

As long as your groups never excede one page try adding a formula field in the page header as

not onfirstrecord previous(table.field you grouped on)
 
YOu may need to move it to a group headerA and place your grouping on GHB. Not sure exactly how the previous function is going to react on the pager header Shocked


Edited by DBlank - 28 Mar 2009 at 7:12am
IP IP Logged
getsen104
Newbie
Newbie


Joined: 27 Mar 2009
Online Status: Offline
Posts: 3
Quote getsen104 Replybullet Posted: 01 Apr 2009 at 11:19pm
hi ,, thanks for your rply, the previous function u said will not work for this criteria..suggest me any other solution, its vey urgent. please help out my problem

regards,
sen

 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2009 at 7:18am
Sorry about that, The not onfirstrecord didn't function here.
leave that off
Create a GH1b, move your grouping to that section
create the formula field as:
previous({table.field})
and use the field you grouped on to replace "table.field".
Place this on Gh1a and suppress the GH1a when blank to avoid a blank line on the first group.
 
IP IP Logged
getsen104
Newbie
Newbie


Joined: 27 Mar 2009
Online Status: Offline
Posts: 3
Quote getsen104 Replybullet Posted: 02 Apr 2009 at 9:57pm
hi dblank, thank u very much for ur reply. i tried the thing u said, it fetch only the field value. but i need to fetch the sum of previous group value. suggest me a best solution for this problem.

regards.
sen
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Apr 2009 at 6:45am

That is a little different.

Create a group footerB, add your data (name field and a copy of the sum field) and do your page break before this instead of the where you have it now.
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