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

Yet Another Crystal Loading Error..Please Help

Status
Not open for further replies.

mgkSHA

Programmer
Jul 12, 2002
126
US
Hello:

I have seen numerous Crystal Reports errors before when running an EXE on another CPU. Here is a new one: When I run the exe on a CPU I get this error when I try to open the reports:

"A date, time, number, boolean, or string is expected here".

Any ideas of why this is coming up and how to fix it..as always, the reports open fine on my host computer. Please advise if you can.

Martin K
 
Are you talking about a crystal .exe or a VB .exe with a crystal report in the VB project?

In either case there is a decent possibility that a formula on the development machine used a UFL which does not exist on the machine where the .exe is being executed. For example, {Datefield} = Numbertodate(20020801) will rturn this exact error if the Numbertodate UFL is not installed on the workstation in question.

Can you post the formula that is getting this error? Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Here is the error...and yes, I have a formula in my Crystal Report..the user workstation is not able to recognize it. How can I resolve this? Please help, this project is time sensitive. The formula is below (it takes a four digit field and inserts a colon).

If Length({ado.CallTime}) = 3
Then Picture({ado.CallTime},"x:xx")
Else
Picture({ado.CallTime},"xx:xx")

Thanks for any assistance.

Martin K
 
What does "user wotrkstation is not able to recognize it" mean, you get an error?

I'd adjust your formula slightly:

If Length(TRIM({ado.CallTime})) = 3
Then Picture(TRIM({ado.CallTime}),"x:xx")
Else
Picture(TRIM({ado.CallTime}),"xx:xx")

-k kai@informeddatadecisions.com
 
My guess is that there is a .dll associated with the picture() function that is not present, or a different version, from the one on the development machine.

You never answered my question regarding is this a crystal .exe or a vb .exe. Which is it? Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
OK: This is what has happened:

This is a VB exe with a Crystal dsn. When I try to run the dsn I get the error "A boolean, string, date, etc. is expected here." I went to the Crystal Decisions web site and looked up the error and the version I am using (8.5). According to the site, I needed to include the following dll for the UFL to work: U2lcom.dll. Well I included this dll in my setup.exe and I am still getting the same error.

This has gotten very frusterating...can you provide any additional help on resolving this. I have tried the U2Lcom.dll route and it did not fix the problem.

Martin
 
If anyone has any advice or help for this issue please let me know...I am on a deadline and I can't get these crystal reports to open.

I have tried including the U2fodc.dll file and the U2lcom.dll file in my setup.exe and I am still getting the error "A string, boolean, date, expression, etc. is expected".

I am using VB 6.0 and this is a Crystal Dsn within the exe. The formatting code I am using is listed above as well...I modified it based on the advice given, in hopes it might help too.:

If Length(TRIM({ado.CallTime})) = 3
Then Picture(TRIM({ado.CallTime}),"x:xx")
Else
Picture(TRIM({ado.CallTime}),"xx:xx")

I don't know what else to try...the UFL obviously still isn't working. I really don't want to have to take out the formula and have sloppy, jumbled data (it is supposed to be military time and if I take out the colons it becomes 1345, 0721, etc.).

Martin K
 
Perhaps your datatypes are wrong, try:

If {ado.CallTime} < 1000 Then
Picture(TRIM(totext({ado.CallTime},0)),&quot;x:xx&quot;)
Else
Picture(TRIM(totext({ado.CallTime},0)),&quot;xx:xx&quot;)

The error makes it sound like it's a number, not a string.

-k kai@informeddatadecisions.com
 
Synap:

Your formula throws an error: &quot;A string or is required here&quot;. Crystal does not like this syntax. Any other ideas? If anyone knows of any other dlls or files that might help me get this Crystal report up please let me know. I keep hitting my head against a brick wall at this point :)

Martin K
 
That sounds like {ado.CallTime} is a string, not a number.

Try:

If val({ado.CallTime}) < 1000 Then
Picture(TRIM({ado.CallTime}),&quot;x:xx&quot;)
Else
Picture(TRIM({ado.CallTime}),&quot;xx:xx&quot;)

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top