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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crstal Reports 11 - crosstab to show data as Zero if no orders

Status
Not open for further replies.

Shusha52

IS-IT--Management
Feb 4, 2008
21
CA
Hi there,

I have a problem displaying zeroes if there are no orders in a specific month. Lets say for this year for example this is the scenario,

Jan- 10 orders
feb - 20 orders
March - Zero orders
April - 10 orders
May - Zero orders

My crosstab shows the numbers as in
running total
Jan-08 10
Feb-08 20 30
Apr-08 10 40

What i wld like my crosstab to look is
Jan-08 10
Feb-08 20 30
Mar-08 0 30
Apr-08 10 40
May-08 0 40


The help I am looking for is for the mths with no orders to be displayed and also the running total. I am not sure how to do this. Any help directed my way is appreciated.

Thanks a million

Usha



 
Are you able to get tables / datasets added to the database? If you got a table of month slots set up, this could be linked to the activity using LEFT OUTER and you'd still get a slot when there was no activity. (But note that LEFT OUTER does not work if you also do a selection on the table receiving the LEFT OUTER link.)
If you can't add a table, you'll be stuck with creating a 'Mock Crosstab'. Crosstabs are fine if you don't mind the absence of rows or columns with no data, but you said you wanted empty slots to show.

A 'Mock Crosstab' is 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.

Each running total will count the record if it was within the criteria - in your case, month.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hi there,

Yes I can add another table to the database. I will follwo your instructions and let u know how it went. thks for the input.

The table I have is called Pat

There are fields within that table for registration date; dishcarge date etc. Every month we have to report on each field..
I create crosstabs for each of the dates we have to report on as separate crosstabs and then what i do is export it to excel and then have to insert the missings mths and show them as zeroes for the books to "so called " Balance.

The reason I wanted to show the empty mths is so that i can do one mass export to excel and maintain it there to do further calculations.

So now i have this table where i have over 15 different dates for each event and so for a typical crosstab

i would have like 7 different crosstabs in the report footer section for each event of the client

First crosstab
Row Summarized field
Regst Date ( by mth - desc) Count of regstdt

Second Crosstab
Row Summarized field
Assmnt Date ( by mth - desc) Count of Assmntdt

third CrosstabRow
Row Summarized field
Discharge Date ( by mth - desc) Count of discharge dt

and so forth.

Pls tell me if i understand you right.

YOu want me to create a table called months and outer link it with this table.. but as u can see the fields are all disfferent and so will your idea work. After posting this i am goign to try and will let u know shortly

Thks

Usha



Usha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top