Michael Graham
asked on
"A string is required here" error in Formula
Hello,
I am getting the above error when I run this formula:
{vw_reporting_biannualaudi t.Drug Schedule}={?@Drug_Schedule }
and
if isnull({?@Drug_Schedule}) or not numerictext({?@Drug_Schedu le}) then
0
else
tonumber({?@Drug_Schedule} )
The last part of the formula (tonumber({?@Drug_Schedule }) gives the error.
I have set the @Drug_Schedule parameter to number.
If I set the @Drug_Schedule parameter to a string it will give me the error "A number is required here" at the top of the formula for the @Drug_Schedule so either way I get an error.
Thanks for any help,
Mike
I am getting the above error when I run this formula:
{vw_reporting_biannualaudi
and
if isnull({?@Drug_Schedule}) or not numerictext({?@Drug_Schedu
0
else
tonumber({?@Drug_Schedule}
The last part of the formula (tonumber({?@Drug_Schedule
I have set the @Drug_Schedule parameter to number.
If I set the @Drug_Schedule parameter to a string it will give me the error "A number is required here" at the top of the formula for the @Drug_Schedule so either way I get an error.
Thanks for any help,
Mike
ASKER
I am still trying to achieve the Parameter Drug Schedule to return all records when nothing is entered. This is very easy when I set the Parameter to optional. I am only using 1 parameter for Drug Schedule now.
We are new to automation in Crystal Reports via Business Objects.
On the dashboard the Parameter will appear at the top and nothing needs to be entered which is what I want (again if I set the parameter to optional prompt).
However, when I run the report it will prompt me to enter a value like it would in the native crystal report. I do not have to enter a value (I can leave it blank) but I do not want this prompt to show up.
We are new to automation in Crystal Reports via Business Objects.
On the dashboard the Parameter will appear at the top and nothing needs to be entered which is what I want (again if I set the parameter to optional prompt).
However, when I run the report it will prompt me to enter a value like it would in the native crystal report. I do not have to enter a value (I can leave it blank) but I do not want this prompt to show up.
So this is the selection formula?
I believe you will need to either have no parameter or write your own viewer.
Are you running the report in the dashboard or separately?
mlmcc
I believe you will need to either have no parameter or write your own viewer.
Are you running the report in the dashboard or separately?
mlmcc
ASKER
Yes this is the selection formula.
I am running it in the dashboard - however I am only allowed to edit it in the report.
I am not sure how to run my own viewer
I am running it in the dashboard - however I am only allowed to edit it in the report.
I am not sure how to run my own viewer
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks everyone I finally figured it out - I had to keep working on the formulas you gave me. You have taught me a lot while I am just starting out in Crystal. I appreciate all the help.
Are there 2 formulas there or is the full formula
Open in new window
If the parameter is a number then you can't convert it to a number.
If it is a number then it can't have non-numeric text in it.
What are you trying to do with the formula? If what I put in the text box is the full formula then you will get another error because the AND wants a Boolean.
If there are 2 formulas then change the second one to
Open in new window
mlmcc