Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Cross Tab and line Numbers Post Reply Post New Topic
Author Message
WillieK
Newbie
Newbie
Avatar

Joined: 29 Jun 2009
Location: South Africa
Online Status: Offline
Posts: 8
Quote WillieK Replybullet Topic: Cross Tab and line Numbers
    Posted: 21 Oct 2009 at 2:11am
Hi there,

We have a cross tab report and the user is requesting line numbers to be added to the detail.
It is a report that is generated based on groups, so the counter needs to be reset per group.
Would it be easier to achieve this through the Stored Procedure (Data Source), or can this be easily done in Crystal?

Any help and steps on how to achieve this would be greatly appreciated!

Thank you.

(I inherited the code so I'm not sure how the process works, but let me know if more info is needed and I'll gladly supply it.)
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Oct 2009 at 11:30am
I you really using a CrossTab or just a Report with Grouping that looks like a crosstab? Generally you do not have detail rows appearing a crosstab so I am guessing it is the just grouping.
If So you can use a Running Total or Variable. There aer tons of exampls on these but here is  the gyst:
Create a Running Total as 'GroupedRowCount' (or whatever):
Field to summarize=anyfield that is not NULL on EVERY row (e.g. PrimayKey field)
Type of SUmmary= COunt (disctinctCount can often also be used on a PK field)
Evaluate=For Each Record
Reset = On Change of group (select the group required for your reset to 0)
Place on the detail row to see incrimental counting and on the Groyup Footer to see the total for that group (will be the same as the last row in the group)
IP IP Logged
WillieK
Newbie
Newbie
Avatar

Joined: 29 Jun 2009
Location: South Africa
Online Status: Offline
Posts: 8
Quote WillieK Replybullet Posted: 22 Oct 2009 at 10:51pm
Hi there,

Thanx for the reply!
I am not too familiar with Crystal, as I've only been working with it for 4 months, so please excuse me if I do not use the right terminology...

It is definitely a cross tab report, because we have a similar report (similar in the data, not the structure) and it works with grouping.  So, with that I used a running total to number the detail lines.  I need to achieve this for the cross tab report as well, but as you stated, it does not have detail lines, so I do not know how to generate the line numbers on the final report.
As a solution for the time being, I have changed the stored procedure to include the line numbers, instead of generating them in the report.

So, technically the problem is solved, but I would like to know whether or not this can be achieved in the cross tab report?
IP IP Logged
wetpalm
Newbie
Newbie
Avatar

Joined: 04 Nov 2008
Location: Nigeria
Online Status: Offline
Posts: 3
Quote wetpalm Replybullet Posted: 29 Oct 2009 at 8:15am

Right click on the field in front of which you want the recordnumber to appear, select format field, a new dialog box appears, towards the bottom of the dialog box there is an option that says display string, click on button that says x-2 in front of display string and write the following codes inside

numbervar e;
e:=e+1;
totext(e,'#') + ". " + CurrentFieldValue;
 
the above would put serial number in front of the selected field
again, you have to put column total on top so as not to invert the serial number. hope this helps
Many heads are not always better than one, trust your instinct
IP IP Logged
ramiahragu
Newbie
Newbie


Joined: 03 May 2010
Online Status: Offline
Posts: 1
Quote ramiahragu Replybullet Posted: 03 May 2010 at 7:19pm
how can i reset the number within the groups. my cross tab is below the group
IP IP Logged
erickentry
Newbie
Newbie
Avatar

Joined: 25 Apr 2011
Online Status: Offline
Posts: 1
Quote erickentry Replybullet Posted: 25 Apr 2011 at 10:58pm
Column total? Not row total? Considering that every page has different row total...
IP IP Logged
patpat
Newbie
Newbie


Joined: 22 Aug 2020
Location: Philippines
Online Status: Offline
Posts: 1
Quote patpat Replybullet Posted: 13 Jan 2021 at 4:58am
how can i sort the serial number ascending if i wanted to put the column total at the bottom
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.029 seconds.