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!

"String required here" error only through CMC

Status
Not open for further replies.

ApocY85

Programmer
Dec 20, 2007
36
US
This is my first post so please be patient :)

I have a formula with the following text:


if isnull({SurveyResponses_.Question 3e}) then
0
else if {SurveyResponses_.Question 3e} = 0 then
1
else
0


Originally, the first if statement was not there (the part that checks for null), but I thought perhaps checking for null would somehow solve the problem, however it did not. The report runs fine under the actual Crystal development tool, but when I try viewing the report through Crystal Management Console (CMC), it gives me the following error:

Error in formula . 'if isnull({SurveyResponses_.Question 3d}) then ' A string is required here. Details: errorKind. File 1b5c538e80a05c3.rpt.

The report originally was working correctly, but after a few changes, it stopped working through CMC. I tried commenting out this formula, and running the report from there, however it then complains about other formulas with the same error.

The datasource is Excel and the values for the field it's referencing are simply 0 thru 4.

It's a simple formula, but I'm stumped on what exactly the system is complaining on. Hopefully the solution will be just as simple.

Last to note, I'm using CR10. Let me know if you need any more information. Thanks in advance for your time!!
 
is the data type of {SurveyResponses_.Question 3e} a string? if so, trying putting quotes around the 0 and see what that does.

if isnull({SurveyResponses_.Question 3e}) then
'0'
else if {SurveyResponses_.Question 3e} = '0' then
'1'
else
'0'
 
No, the only possible values for {SurveyResponses_.Question 3e} are simply numeric, 0 thru 4. That's the confusing part about it all.

In the report, there are summaries based on the above-mentioned formula, so the report will have to be able to sum all the 1's outputed. Thus, stating the the 0 and 1 in the if statement as a string will not work :(

Again, thanks for any responses!!
 
Hi,
Be sure that in Excel the cells are formatted as Numbers - If any cell in the column is text that all cells in that column will be seen by Crystal as text, not numeric.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thank you so much!! Turkbear, your answer solved all my problems. I'm not sure why, but apparently there was a cell not numerically defined. Once again, thanks for both of your help!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top