Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to place the crosstab? 1

Status
Not open for further replies.

maggi

Programmer
Nov 21, 2002
27
US
Hi,

I have a 5 groupings in my report. Lets say

Group1
Group2
Group3 (Monthly/Yearly)
Group4
Group5

I want to display the crosstab in the report footer where it uses fields for group1 + group2 as the row header and field for group4 as column header. So far everything is okay. But I need to display the crosstab based on group3. Group3 has 2 options- monthly and yearly. So I want to display the crosstab in the report footer by monthly first and then on the next page by yearly. Right now crosstab displays all the records for monthly and yearly in that one crosstab. How should I break them up by Monthly and Yearly. And this crosstab need to be displayed at the end of the report where it summarizes all the data found in the report, that's why I am using the Report Footer.

I am using crystal v10.
 
Leave the crosstabs in the report footer and add your date field as another column, that you drag to the topmost position. While in the expert, with the datefield highlighted, go to group options and select "print on change of month".

Do the same for the yearly crosstab, but place it in a separate report footer section, and when you go into group options, select "print on change of year".

You can insert a new page before on report_footer_b.

-LB
 
Thanks for your reply. I will try this out. Just one question. Monthly/Yearly is not a date field. It is a text field that is either Monthly or Yearly. So how should I do this in group options?
 
What do you expect to show in the two different crosstabs then? If you want the monthly crosstab to show columns by month, then you will need to use a datefield. Same with year.

Or are you saying that the text field displays a date? Maybe you should show a sample of results for this field.

-LB
 
I have an interval field in my database. Based on this field I group them into two categories-Monthly/Yearly. I created a formula to do this.
For example- if interval = AA, BB, CC, DD, EE then Monthly else Yearly.
Then I grouped my report on this formula, which is group 3.
Now I want to display 2 crosstabs that will summarize the information by Monthly and the 2nd by Yearly.
 
Your response does not answer my questions. You have not explained what the columns would be if, for example, "monthly" was chosen, or whether this in turn is based on a datefield--or what datatype that date field would be. Also, are you the original poster?

-LB
 
No, the montly crosstab will not show the months as the column name. The columns are based on another text field called Equipment. The column would display the different equipment names.
Monthly is not based not a date field either. It is a text field. None of the fields in my crosstab are datefield. So the crosstab should look something like this

Monthly
--------Equip1 Equip2 Equip3 Total
Eastern---10-----10-------10----30
Central---20-----25-------6-----51
Total-----30-----35-------16

 
In the crosstab expert if I drag the monthly/interval field as the top most column I do get the right result but right now it displays monthly and yearly in one cross tab. I want to display only monthly in one crosstab and yearly on a different page.
 
Try inserting the crosstab in a subreport in the report footer where you specify in the subreport record selection criteria that:

{table.group3field} = "Monthly"

In the second subreport, specify "Yearly".

-LB
 
Is there no other way of doing it? I don't want to create a subreport. That really slows down my report.
 
Try adding the field as the highest order column field->group options->specified order->add "Monthly"->Others tab->discard all others.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top