Solved

Cross-Tab Columns - Define Range

Posted on 2003-12-03
4
524 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now