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!

How can I get crystal to format 1 column for each date

Status
Not open for further replies.

jasperjasper

Programmer
Mar 23, 2004
117
US
I have a report that will have data in a 7 day period....

12/1 12/2 12/3 12/4 12/5 ----

xxxx xxxx xxxxx xxxxx xxxx
xxxx


I want the data to line up columns by the date value....

Any one know how to do this?
 
One means is to use a Cross-Tab (look under the Insert pull down).

Place the dates in the column area, and the data in the details.

Otherwise create a manual cross-tab.

To limit data to 7 days, select Report->Edit Selection Formula->Record and place something like:

{table.date} in currentdate-6 to currentdate

-k
 
Dear jasper,

If doing a manual crosstab just create 7 formulas for the columsn:

You would use a variation of the formula sv showed you to make your column headers:

//Column1
Currentdate - 6

//Column2
Currentdate -5

//Column3
Currentdate -4

and so on....

Then for the data under each column you would do an if statement ...

if Table.Date field = {@Column1}
then Data //1 or field you want to display
else 0 //or '' depending on whether text or numerical

Do those types of formulas for each "row" of your manual cross tab.

Regards,

ro


Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top