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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross-tab: Columns

Status
Not open for further replies.

crystaldev1

Programmer
Nov 6, 2003
232
US
Hello all. I would like to have columns with different formulas in them. For instance, I would like a column to display this year which is the record selection and another column to display last year and also the months as well.


2007(this month) 2006(this month)
count
total

How can get the formula to print two separate columns as above. Thanks in advance.
 
You need to select all dates in your record selection formula that you want to see in the crosstab. Then insert the datefield as a column in the crosstab, and while it is highlighted, select "group options" and choose "print on change of month". Then add count of {table.field} as your summary field.

-:LB
 
Thanks for your response. But unfortunately, all the record selection is for current year, not last year. How can I create another column to print last year's info? Thanks.
 
You MUST include last year in the report, or you will not be able to build it into a crosstab. Otherwise, the only solution would be to insert a subreport with records from last year, but that would be less efficient.

-LB
 
As a side point I should mention that one of the coolest new features of Crystal Reports 2008 is the ability to have calculated crosstab members.

This means you can define calculated row(s) or columns(s), and control the insertion point of the calculations. Within the formula that returns the value of the cell, you can reference other cells in the crosstab.

I don't think this feature is necessary to solve the problem you mention, but I wanted to point it out as it might be needed down the road.

Cheers, Blair
 
An example of the 2008 CrossTab feature above would be to create a column that shows the increase/decrease from the prior year to this year.

You can still achieve the same result in prior versions, but it requires much more effort.

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top