Solved

Cross-Tab Columns - Define Range

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

20 Experts available now in Live!

Get 1:1 Help Now