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

Manual Crosstab Print Month Headings 1

Status
Not open for further replies.

maccrystal

Technical User
Mar 1, 2003
146
US
Crystal 8.5 MS SQL2000, Manual Crosstab Report with Starting and Ending Date parameter. Report Format:
Jan..Feb..Mar........Sep...Oct..Nov..Dec.
For a Date Range of 9/1/06 to 8/31/07 Need to print the mm/yy above the Months as Below:

01/07.02/07.03/07......09/06.10/06.11/06.12/06
.Jan...Feb...Mar........Sep....Oct...Nov...Dec.
if date Range is less than a year print n/a above the month.






 
If the date range is always no longer than a year, you could create formulas like this:

//{@Jan}:
if month({table.date}) = 1 then {table.date}

//{@Feb}:
if month({table.date}) = 2 then {table.date}

Then for the labels, use another set of formulas:

//{@Janlabel}:
if maximum({@Jan}) <> date(0,0,0) then
totext(maximum({@Jan}),"MM/yy") else
"N/A"

//{@Feblabel}:
if maximum({@Feb}) <> date(0,0,0) then
totext(maximum({@Feb}),"MM/yy") else
"N/A"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top