Solved

Cross-Tab Columns - Define Range

Posted on 2003-12-03
4
525 Views
Last Modified: 2012-05-04
Is it possible to specify a column range in a cross-tab (expert, formula, etc) report.

For Example the data returned from the data base for the field that will be the column can be anything from 1-12 (months of the year) yet I want the columns to start at 1 and run to 12 irregardless of whether the number exists in the query. Also the data for the row should appear in the correct column.

Is this possible?

Thanks,

Richard
0
Comment
Question by:rgshafer
4 Comments
 
LVL 5

Expert Comment

by:erpeters
ID: 9877345
If you mean show columns where there is no data...I do not think this is possible...with more info there are workarounds, but complicated
0
 

Author Comment

by:rgshafer
ID: 9878071
Yes I am looking for a workaround if it cannot be done straight forwardly....

Report Example:
Type1
         Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
John    2     3      2     4      1      2     0    0      0      0     0     0
Deb     3     2      4     1      2      1     0    0      0      0     0     0
Rob     4     1      2     3      3      2     0    0      0      0     0     0
Lisa     2     3      2     4      1      2     0    0      0      0     0     0


SQL Columns and Data Example:
Name Month Count SalesType
John      2        2       Type1
John      2        1       Type1
John      1        1       Type1
John      1        1       Type1
Deb       1        3       Type1
Deb       2        1       Type1
Deb       2        1       Type1
Rob       1        2       Type1
Rob       1        1       Type1
Rob       1        1       Type1
Rob       2        2       Type1
Lisa       1        1       Type1
Lisa       1        1       Type1
Lisa       2        1       Type1
Lisa       2        1       Type1
Lisa       2        1       Type1

Etc.....

The Month is derived from a date say 01/05/2003 and 01/06/2003 hence multiple records from a Group By.

Notice beginning in 2004 there will not be data for Feb on yet I wish to display Feb to Dec columns with 0 as the cell value.

Another Hitch the data appears in a Group Section of the report for each SalesType. As such modifying the SQL to dummy the data (Union Statements etc) is impossible since the different types of SalesTypes can increase or decrease.

Does this help any better?

Thank you,

Richard


0
 

Accepted Solution

by:
hendrik_ch earned 50 total points
ID: 9925033
Since the column are already fixed (CMIIW), you can create 12 columns, and put formula in each of the column.
s'thing like:

//For Jan column
If ({myDate.Month} = "1") Then
      //<<put whatever you want to display>>
      myInput.Data
Else
      "0"


Hope it helps.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question