Print Page | Close Window

Report Design Crosstab

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1832
Printed Date: 02 May 2024 at 1:49pm


Topic: Report Design Crosstab
Posted By: AnthonyJ
Subject: Report Design Crosstab
Date Posted: 05 Dec 2007 at 7:14pm
Hi,
 
I need to create a crosstab report that show different kinds of metrics for different kinds of chips (see below)
 
 
              |          M6260          |          M6280       | 
--------------+-------------+-----------+------------+---------+-
Metrics       |   Build ID  |   % Avg   |   Build ID |  % Avg  |
--------------+-------------+-----------+------------+---------+-
abc           |   xxxxxxx   |     n%    |  xxxxxxx   |    n%   |
--------------+-------------+-----------+------------+---------+-
xyz           |   xxxxxxx   |     n%    |  xxxxxxx   |    n%   |
--------------+-------------+-----------+------------+---------+-
 
abc and xyz are both metrics that will be used to calculate the % avg column.
 
Column 1 (ie. Metrics - abc & xyz) is not a dimension but a label to describe the metric for each row. 
 
Given this, is it possible to create such a report using Crystal ?
 


-------------
XIR2 on Unix Solaris
CRXIR2, Oracle 9i/10g



Replies:
Posted By: BrianBischof
Date Posted: 06 Dec 2007 at 1:44am
yes. You can use a formula that returns either 'abc' or 'xyz' and then use the formula as the row field to group on.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: AnthonyJ
Date Posted: 06 Dec 2007 at 10:25am

Thanks for the suggestion.

I am new to Crystal Reports and trying to get my feet wet here. Can you tell me exactly how the formula would look like ? The dimensions that I have are Build ID and Chip while the metrics are abc, xyz, etc.
 
By the way, I have read a lot of good things about your book, Crystal Reports Encyclopedia, that I think will help me a great deal in learning more about this product. I've bought both volumes 1 & 2 and just waiting for it to be delivered Smile.


-------------
XIR2 on Unix Solaris
CRXIR2, Oracle 9i/10g


Posted By: AnthonyJ
Date Posted: 08 Dec 2007 at 8:40am
anyone ?

-------------
XIR2 on Unix Solaris
CRXIR2, Oracle 9i/10g


Posted By: BrianBischof
Date Posted: 08 Dec 2007 at 1:23pm
Hey Anthony,

Thanks for buying my books and supporting the forum! If more people followed your lead, I could afford to spend more time creating great content for this site.    Click here for more information on the http://www.amazon.com/exec/obidos/ASIN/0974953601/bischofsystem-20 - Crystal Reports Encyclopedia

Re your question, this is pretty techinical and can be a bit tough to answer over a forum. When you get the book from Amazon, check out the Advanced Tutorials starting on page 497. They will give you lots of good tricks for customizing cross-tabs.

For a cross-tab to have different data on each row, you need a formula to identify each row and which metric it gets. Here is an example formula caled {@MetricType}:
If {field}="type1" Then
   "abc"
Else
   "xyz";

This categorizes each row and also gives it a label that can be displayed in the cross-tab.
Second, you need to use this formula to determine which metric to calculate for a row. Something like this:
EvaluateAfter({@MetricType});
If {@MetricType}="abc" Then
   X*12
Else
   X/2;

Of course, use formulas that are applicable to your situation. In the cross-tab report, put the {@FormulaType} formula in the Rows area and put the metric calculation in the Columns area.

Play around with these ideas and see if it gets you what you need.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window