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

Static Crosstab Columns

Status
Not open for further replies.

kriesten

Technical User
Apr 16, 2001
13
US
cr 8.5
Oracle database
windows XP

I am trying to create a crosstab to display a schedule for each month and within each month I want to show a static frequency of occurrence whether there is data to support the column or not.

I am counting the number of records assigned the frequency.

For Example:
May | June | July
----------------------------------------------------------
Mthly|Qrtrly | Mthly| Qrtrly | Mthly| Qrtrly
----------------------------------------------------------
AHU 0 | 0 | 1 | 0 | 0 | 1
AC 1 | 0 | 0 | 1 | 0 | 0

In this case I would like to show the May Qrtrly column and the July Mthly column whether there is data or not. What Crystal does is only show the column header when there is data to match both cases.

Essentially is there a way to force or make static columns even if there is no data at the time to fill that particular column?

Help would be appreciated.

Thanks in advance.
 
I think you would have to use a manual crosstab to accomplish this. You would group on whatever your row field is, and then create formulas of the form:

//{@May-Monthly} to be placed in the detail section:
if month({table.date}) = 5 then 1

Not sure what you mean by your "Quarterly" column, so I won't venture there, but you would need a specific formula for each column. You would then insert summaries (SUMs, not Counts) on each formula and suppress the details section.

-LB
 
Thanks for the reply.

I thought that would probably be the direction to go in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top