Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1385
  • Last Modified:

Build a cross-tab report with column headers repeating Crystal 2008

Build a cross-tab report with column headers repeating.

I am building a cross-tab report that will be grouped for four entered dates.
Under each date grouping, I would like to have the headings and the data for each group printed in the appropriate section as shown in the example below:

      1/1/2012                        1/1/2018
Course#      Reqd      Base      Course#      Reqd      Base
3      10      235      3      11      22
4      11      254      4      12      343
5      12      2553      5      343      1
6      343      2552      6      55353      23
7      55353      2553      7      5133523      3
8      5133523      25353      8      25232      5
9      25232      2353      9      0      0
0
cookiejar
Asked:
cookiejar
1 Solution
 
peter57rCommented:
I assume that Course, Reqd and Base are 3 different fields and not values in the same field.
Please confirm.

A crosstab requires a row grouping but you are not showing one in your example.
So how are different rows distinguished from each other?

0
 
PCIIainCommented:
So, firstly  in the cross tab expert, Customise style tab
  set the summaries to be horizontal.
  tick 'Show Labels' to put the labels on.

No, back in the crosstab, right click, advanced calculations, embedded summary. New, move this to the top of the list, edit embedded summary and enter

GridLabelAt (<name of field which is the row name> ,CurrentRowIndex)

You can get the row name in the right format, but selecting Grid Value in the functions selection area on the function editor, then Row or Column Names, and then choosing the correct field (I am assuming the row field is the course number.).

Finally, suppress the course number field to the very left of the crosstab design, and drag it very small, then use the Customise style tab, draw grid lines to remove the small empty boxes to the left.

Voila!
0
 
cookiejarAuthor Commented:
PCIIain,

I entered the following  and encountered a 'a string is required' error:
GridLabelAt ({Pstl_UnitTrngAttnProj.Course_No},CurrentRowIndex) .  The datatype of the course_no field is string.

Peter57r,
I am grouping on date, and course number
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
cookiejarAuthor Commented:
PCIIain,
I realized that repeating the row in each section would
take up too much space on the page but I would like to know why I enconuted the string is required error.
Is there a way to display the row label for Course#?
0
 
mlmccCommented:
DO you have 3 fields you are trying to show for the dates?

mlmcc
0
 
cookiejarAuthor Commented:
I have five fields.  PCIIain's solution worked beautifully but I need to also show Course No# over the course row.    
0
 
PCIIainCommented:
You need the field name as a string So it's probably,

"Pstl_UnitTrngAttnProj.Course_No"

at the bottom of the grid formulas selection, there's a node for field names. Double click the right name from there to get it autotyped in in the right format.
0
 
cookiejarAuthor Commented:
If the customer thinks the repeated row  for course# is taking up too much space and want to print only once, is there a way to display a row column header for the Course# row?
0
 
PCIIainCommented:
I thought it was doing that automatically, isn't course_no one of your row selection criteria?
0
 
cookiejarAuthor Commented:
Yes course# is the row group selection.  But on the cross-tab report,no row header displays.

 
For sake of example, I used the term course# but the actual field is skill #.

See the attachment.

 If they choose to use the format created using the embedded summay method I am able to create the course# header.
xtab.jpg
0
 
PCIIainCommented:
Hmmm, then I would expect it to be displayed to the left of the crosstab, unless you'd suppressed it.
0
 
cookiejarAuthor Commented:
The row's data values appear but not the column label title 'Skill No.' in this case.
0
 
PCIIainCommented:
Ah, no it wouldn't.
0
 
cookiejarAuthor Commented:
So there's no feature of being able to display the row label?
0
 
PCIIainCommented:
I'll check tomorrow, (it's the middle of the evening here), but I don't remember one.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now