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

Error 20525

Status
Not open for further replies.

acmeyer

Programmer
Joined
Jul 28, 2000
Messages
4
Location
US
I have inheirted some apps that use crystal reports.&nbsp;&nbsp;I am using the following code to set up my .ReportFileName in VB 6.0 .&nbsp;&nbsp;On some Windows NT machines this works fine, but on other machines I get the ERROR 20525 that says I can't load the reports.&nbsp;&nbsp;Any ideas?&nbsp;&nbsp;THanks in advance<br><br><br>&nbsp;g_strReportConnectString = &quot;DSN=W37SQL01;UID=&quot; &<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g_strUserName _<br>&nbsp;& &quot;;PWD=&quot; & g_strPassword _<br>&nbsp;& &quot;;DSQ=MSC300DV;&quot;<br><br>&nbsp;g_strPath = App.Path & &quot;\reports\&quot;<br><br><br>Dim m_iopen As Integer<br><br>&nbsp;&nbsp;&nbsp;&nbsp;On Error GoTo ErrorHandler<br>&nbsp;&nbsp;&nbsp;&nbsp;If g_cnst_bErrorsTurnedOff Then On Error GoTo 0<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;m_iopen = PEOpenEngine()<br>&nbsp;&nbsp;&nbsp;&nbsp;sub_SetUpNotepadPrint<br>' Send report to<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.Destination = crptToPrinter<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.Action = 1<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.ReportFileName = &quot;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;Call PECloseEngine<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>Private Sub sub_SetUpNotepadPrint()<br>Dim m_strReportSelection As String<br>Dim m_strConnectString As String<br><br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.Connect = g_strReportConnectString<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.ReportFileName = g_strPath & &quot;\InspectionNotes.rpt&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.StoredProcParam(0) = l_strPolicyNo<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.StoredProcParam(1) = l_strRequestNo<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.StoredProcParam(2) = fn_GetNotepadPrintSelection<br>&nbsp;&nbsp;&nbsp;&nbsp;ctrNoteReport.ParameterFields(0) = &quot;argUsername;&quot; & g_strUserName & &quot;;TRUE&quot;<br>End Sub<br><br><br><br>
 
The path and name of the report were entered incorrectly in the ReportFileName property. <br><br>Make sure that the path and name of the report are correct and that there are no trailing spaces in the string. <br><br>Hope this helps.<br> <p>Cody ford<br><a href=mailto:codyjford@hotmail.com>codyjford@hotmail.com</a><br><a href= > </a><br>VB, VBS, Seagate Info/Crystal Reports<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top