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

Month

Status
Not open for further replies.

chomzky

Programmer
Nov 6, 2007
19
CA
Hello,

I am creating a crosstab report that will show values based on month of the year. I want to use a formula in a column that will capture the inforamtion based on each month. I want to view the inforamtion by year(2005 - 2007) for each row. I thought of using this formula but I keep getting a date range error? Can anyone please help. The forumula I have tried is below.

select MonthName({Blotter.Occured})
case "1": "January"
case "2": "February"
...........
 
Is {Blotter.occurred} a date field?

If so, the formula should be:

Select month({Blotter.occurred})
case 1 : "January"
case 2 : "February"


-LB
 
im not sure I understand what you are trying to do nor what version of Crystal you are using but try this instead of what you are using:

monthname(month({Blotter.Occured}))

that should return the month name for you without using the select.

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Wow, I really wasn't paying attention. If you are doing a crosstab with month as the column and year as the row, then I would use the formula {@month} as the column field so that it sorts correctly:

month({blotter.occured})

Then while this column is highlighted within the crosstab expert->group options->options->customize group name->use a formula:

monthname(month({blotter.occured}))

This will give you the display you want in the right order.

-LB
 
thank-you very much for your help. I am able to get everything reporting correctly. It may have been th 3equoted as well as teh MOnthname instead of month.

Thanks again,

C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top