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!

command parameter problem

Status
Not open for further replies.

Bloke152

Programmer
Aug 9, 2005
123
NO
Crystal 9
Oracle 9i

Hi guys,
Im having an issue with one of my parameters in a command i have. I have set the parameter up in the command and have set the defaults to S or L. For some reason tho, Crystal keeps telling me that 'S' is an invalid identifier. Can anyone see anything wrong with the bit of code below? i have only attached this small part because everything else if fine without it.

AND ("CUSTOMER_ORDER_LINE_TAB"."REAL_SHIP_DATE">=
(case when upper({?start_date}) = 'S' then
(last_day(add_months((sysdate),-2))+1)
when upper({?start_date}) = 'L' then
(last_day(add_months((sysdate),-1))+1) else to_date('{?start_date}','DD/MM/YYYY')
end)
 
What data type is {?start_date}? If it is set as date-type, it can't be tested for being S.

If you want both a date and a choice, better to use two parameters.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
no, {?Start_date} is a string.

I dont get this one, i do this kind of formula all of the time for our reports and for some reason this one just wont work!
 
I'd break up the formula into parts and see which bit gives trouble.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top