Link to home
Get AccessLog in
Avatar of RobertEnglish
RobertEnglish

asked on

VB6 / Crystal 8.0 Error 20515

VB6 program calling a Crystal 8.0 report returns "Error 20515: Error in selection formula".

Formula... "{Billback_Invoice.DT_Stamp} >= DTSToDate('1990/01/01')
AND {Billback_Invoice.DT_Stamp} <= ""DTSToDate('2008/07/21')  
AND {Billback_Invoice.Client_ID}  = 13725"

It works fine on development machines but not on clients.
I/ve compared the u2*, uf* and p2* DLLS on cdev & client  PCs and they are the same

Can anyone please help? I've seen previous posts mentioning running a rptchk32.zip file but the link to it on Business Objects' site is dead.
Avatar of Mike McCracken
Mike McCracken

WHy are you using DTSToDate instead of simply DATE?

DTSToate is in a separate user library.  I forget where it is located or what the name is.

mlmcc
Avatar of RobertEnglish

ASKER

Looking further there seems to be other report that ther Client runs that also use DTSToDate in the selection formula and work fine. So I''m guessing maybe another formula on the report has a function missing it's DLL. In that case I'd really like to able to get hold of the rptchk32.zip file.
According to Crystal

"A diagnostic utility has been included on the Crystal Reports CD to help single out the dependency files a report needs to execute the way it was designed. The tool is called Rptchk32.exe and is located in the tools directory on the Crystal Reports version 8.0 CD ROM. The help file, Rptchk32.hlp, accompanies this utility in the same directory."

mlmcc

Thanks alot mlmcc

I dug out the CD, ran the RptChk32.hlp and unfortunately couldn't find any of the files missing on the client machine  and that was on the evelopment machine.
Is the selection formul added in the report design or through the VB program?

If through the program what code is used?

mlmcc
Through the VB6 Program Code...

sSelForm = "{Billback_Invoice.DT_Stamp} >= " & "DTSToDate('" & Format$(dtpFrom, "yyyy/mm/dd") & "') AND {Billback_Invoice.DT_Stamp} <= " & "DTSToDate('" & Format$(dtpTo, "yyyy/mm/dd") & "')"
If Val(txtHotelID.Text) > 0 Then
         sSelForm = sSelForm & " AND {Billback_Invoice.Client_ID} = " & txtHotelID.Text
End If
CRXReport.RecordSelectionFormula = sSelForm
CRXReport.Destination = crptToWindow
CRXReport.Action = 1


ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access