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

Display every single month, YTD

Status
Not open for further replies.

qlan

MIS
Feb 10, 2005
84
US
Hello,

I am using V10. Currently, I grouped the report by Receive Date. If I receive 2 projects in Jan, 4 in Feb, 5 in April, and 6 in July. My report would show
Jan-06 2
Feb-06 4
Apr-06 5
Jul-06 6

How I can make it to show:
Jan-06 2
Feb-06 4
Mar-06 0
Apr-06 5
May-06 0
Jun-06 0
Jul-06 6

Thanks

 
Crystal does not report on non-existent data. So unless you have another table with all the dates in it, you cannot do what you are asking for.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"A fine is a tax for doing wrong. A tax is a fine for doing well.
" - unknown
 
One way would be to use running totals in the report footer where you use a formula in the evaluation section of the running total to limit the records to specific months:

month({table.date}) = 1 //january

Reset never. Then use text boxes to label each running total.

-LB
 
Another option is much like the one that -LB is mentioning, namely:

Create an formula which is suppressed in for instance the detail sections and is as follows:

while printing records
if month({table.date}) = 1 then counter1 := counter1 + 1;
if month({table.date}) = 2 then counter2 := counter2 + 1;

etc..etc..

Then in a next section (can also be a details section); place a new formula like:

numbervar counter1;
counter1;

This shows the result for the first month.

In this way it is possible to always show all months in spite the fact that there was no result in a month.

It is actually 13 or 14 formulas:
1 formula where all variables are mentioned
13 formulas where the counter1, counter2 etc.. are mentioned
and
1 formula (if you use groups) where the variables are going to be reset.

The running total option is of course the best option, i prefer in some cases the option of the variables while in my case the running totals are not always representing right data when running them by groups.

-D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top