Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running total

Status
Not open for further replies.

swetham

Programmer
May 5, 2010
257
DE
Hi,
I have a report in this format,

cp1 reg1 tr1
SNO Name tot 2010-05-01 2010-05-02 2010-05-03
001 abc 8 1 3 4
002 def 5 1 1 3
total 13 2 4 7

cp2 reg2 tr2
SNO Name tot 2010-05-01 2010-05-03
003 hgt 5 1 4
004 rty 4 1 3
total 9 2 7

I have 3 groups cp,reg,tr, i placed the crosstab in "tr" group. in row field i wrote a formula for sno as




the column dates will be given by user as startdate and enddate. In first group data is there for 01,02,03 dates and in next group data is there only for 01, 03.

Now my problem is i want the crosstab as

SNO Name 2010-05-01 2010-05-02 2010-05-03 total

cp1 reg1 tr1
001 abc 1 3 4 8
002 dff 1 1 3 5
tot 2 4 7 13

cp2 reg2 tr2
001 fgh 1 0 4 5
002 rty 1 0 3 4
tot 2 0 7 9

a) the sno,name,etc heading i want to repeat once only
b) sno should be starting from 1 in every group
c) If data is not present dat should be zero.

CAn anyone please help me?

 
Crosstabs are quick but inflexible. You could write a Mock-Crosstab, something that looks like a Crosstab, but in fact you define each column yourself, normally as a running total. This would need to go in the report footer, because running totals count as the reports 'run' and they will not be complete until then. Crystal should have included an example along with the Crosstabs.

You can save a little time by doing a paste to a dummy report, changing the name and then pasting back. In Crsytal 11.5, you can also duplicate formula fields using the Field Explorer.

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.

PS. It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
I think you have seen the example report i have given. Can you guide me how to start with? what is a mock crosstab? I am new to crystal reports.
 
Hi Madawc

I am also interesting to know about mock cross tab

Thanks
 
sweish,

Please do not start multiple threads on the same topic and please don't plead urgency as in your last thread--people are donating their time and are not here to respond immediately to your every need.

How have you contributed to other participants in the site? Users are intended to not only receive assistance but to provide assistance to others. I see you have posted 40 threads without offering any assistance to anyone else. Please consider how you might contribute.

-LB
 
lbass,

As i am a fresher, i am not able to answer any of the questions posted by other participants.Sorry for pleading urgency. Next time onwards i will try to reply to other participants threads.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top