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

Displaying Monthwise Columns in Crystal Report 9 - Crosstab

Status
Not open for further replies.

apghosh

Programmer
Nov 2, 2003
2
IN
Hi ,

With reference to the thread : "thread767-889125"...i have a little modified problem. With reference to the thread "thread767-889125" i am also displaying the data with the columns as months e.g :

Jan Feb Mar Apr......Dec
12 3 45 4 12

With the row displays the summary of a field for that particular month. I have followed the logic that is mentioned in the thread "thread767-889125" for creating the columns...BUT the problem is that if the data is not present for that particular month in the database then that month is not displayed in the columns at all..for e.g. if for the year of 2004, there is not data for the month from May to Dec, then the report displays:

Jan Feb Mar Apr
12 3 45 4

BUT i want that even if the data is not there for the other months the report should display the other months with the value of 0. like....

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
12 3 45 4 0 0 0 0 0 0 0 0

That is for any scenario all the columns of the months should be displayed....and if no data is there in the database then atleast 0 should be displayed...

Please help.....Thanks in ADVANCE...

Aunshuman
 
One solution is to create a manual crosstab, with formulas like:

//{@May}:
if month({table.date}) = 5 then {table.amt} else 0

Add any groups you wish, and then insert summaries on the formula for each month and suppress the details section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top