cancel
Showing results for 
Search instead for 
Did you mean: 

Date value required

Former Member
0 Kudos

Hi Everyone,

I got a report with a date parameter which enables the user to select a single date

however the user selection should pull in the data for the fyscal year by month

so I've created to formulas as follow:

@FYStart:

cdate(year({?Date})

-(if month({?Date})<7 then 1 else 0),7,1)

@FYEnd

cdate(year({?Date})

+(if month({?Date})>=7 then 1 else 0),6,30)

and I've declared the following in the record selection:

{billing_tx_history.date_of_service} >= {@FYStart}

and

{billing_tx_history.date_of_service} <= {@FYEnd}

The report works fine on my local but once I deploy it to the WebApp which is a Web-portal called AVATAR and try to run the report from there I get an error msg saying that:

"Date or number or currency is required here"

and I think the problem that the two formulas above were created using IF function which returns Boolean

Any help would be appreciated

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Mohamed,

Try modiying the Record Selection to:

if(month({?Parameter}) >= 7) then

{billing_tx_history.date_of_service} IN

[cdate(year({?Parameter}),7,1) to cdate(year({?Parameter})+1,6,30)]

else

{billing_tx_history.date_of_service} IN

[cdate(year({?Parameter})-1,7,1) to cdate(year({?Parameter}),6,30)]

-Abhilash

Former Member
0 Kudos

HI Abhilash,

I tried this but still not working, on the webapp side it says invalid date specified - parameter error

and here is the error message in the attachments

former_member183750
Active Contributor
0 Kudos

As this is happening in a web app and assuming this is a .NET app, I moved the thread to the

SAP Crystal Reports, version for Visual Studio SCN Space.

How are you passing in the parameter? Are you using the CR parameter prompt screen or APIs?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi Ludek,

I'm passing the parameter in the webApp based on an SQL query under a report definition section

Message was edited by: Ludek Uher

Answers (2)

Answers (2)

Former Member
0 Kudos

Indeed, I’ve removed the CR 2008 new functions based objects from the report and then the report worked just fine in the WebPortal

Former Member
0 Kudos

I believe that the following applies to my case:

Error: A Number, Currency Amount, Boolean, Date, Time, Date-Time, or String Is Expected Here

Explanation: In general, this happens when you're running a Crystal Reports template that was created on one machine, that the report developer used a custom DLL to create the report (in a formula field), and those DLLs were not copied/installed/registered on the machines running Report Runner Viewer or Report Runner Batch. The custom DLLs are normally stored/registered in the Windows Crystal directory.

In short, it means your report is trying to use a function that the Crystal Reports runtime engine does not recognize.

You can also get this with version incompatibilities. For example, if you were to run a Crystal Reports 2008 template in Crystal Reports XI, there are a few new functions to 2008 that XI doesn't know how to run.

former_member183750
Active Contributor
0 Kudos

Well, you're giving me possible solutions so thanks for that. However I have no idea what this means:

I'm passing the parameter in the webApp based on an SQL query under a report definition section

- Ludek

abhilash_kumar
Active Contributor
0 Kudos

Hi Mohamed,

The record selection formula I supplied does NOT use any Custom DLLs. It uses native CR functions. I don't know what AVATAR is, however if the report works fine in the CR designer, it is ought to work in any application that calls it.

If AVATAR is a custom portal, I would suggest that you have a word with their Tech Support and find out if it's an issue with their CR Runtimes.

Also, CR 2008 has many new features that older versions of CR do not support. If your report has any of the newer functionalities and if AVATAR is based on lower runtimes, the report will not work.

-Abhilash

Former Member
0 Kudos

In order to deply our reports to the WebPortal we have to create a Report Definition first where we pass the Parameters of the report based on an SQL Query which is retrieved from the database which is restored in that portal

Former Member
0 Kudos

The last two lines of your reply discribes the point that I'm trying to make

Thanks for your replies everyone