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

CR XI date range question 1

Status
Not open for further replies.

finbib

IS-IT--Management
Aug 12, 2002
26
0
0
US
I have a report request from a user to show sales in qty and dollars for the 1st quarter of the current year, as well as the last 3 years.

I was able to get the current year qty and dollars fairly easily, using this formula:

If {Invoice.Date} in Calendar1stQtr then {Ship.Qty} else 0;

and a similar formula for the dollars.

How can I calculate the qty shipped and dollars for the 1st Quarter of the previous 3 years?

I'm using CR XI, connecting to an IBM Universe database thru ODBC. The table I'm hitting has all pertinent info I need, without any joins of any kind.

TIA

Bob Osborne
 
A simple way would be to insert a crosstab. First create a formula {@Qtr}:

datepart("q",{table.date})

Use this as your row field. Then insert {table.date} as your column and select "group options"->print on change of year->options tab->customize name->use a formula->x+2 and enter:

"Qtr " + totext(datepart("q",{table.date}),0,"")

Then add sales (sum) as the summary field.

-LB
 
lbass,

thanks, it worked just like you advertised

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top