cancel
Showing results for 
Search instead for 
Did you mean: 

Run Time Error 20507 Invalid File Name

Former Member
0 Kudos

Hello,

I'm is new member, I have trouble with my application. I'm use visual basic 6.0 with access as database and crystal report 8.5. My trouble is "Run time error 20507 Invalid file name. I have script like this :

CR.DataFiles(0) = App.Path & "\databasename.mdb"

CR.ReportFileName = App.Path & "\reportfilename.rpt"

CR.WindowState = crptMaximized

CR.Action = 1

When the click button for view report, show message error as above.

Somebody help me.....

I'm very thank's

Accepted Solutions (1)

Accepted Solutions (1)

thomas_brutigam2
Active Participant
0 Kudos

Hi ian,

first of all, if you're working with vb6 have you ever heard of debugging ?

have you checked whether App.Path is with or without "\" ?

Sometimes with App.Path it's not necessary to add a Backslash if the Application is in Root Directory

for example "C:\" - you see ?

On which line do you get the Error ?

Database or CR-File ?

Greetings

Thomas Br

Edited by: Thomas Br on Nov 1, 2011 9:33 PM

Former Member
0 Kudos

CR-FIle

Former Member
0 Kudos

Hello,

You're asking a Crystal Reports OCX SDK question. You should post your question to the [Legacy SDKs - SAP Crystal Reports|; forum and close this thread.

The old OCX (crystl32.ocx) error messages were usually pretty accurate. Invalid file name typically means that the path and name of the report were entered incorrectly in the ReportFileName property. Make sure that the path and name of the report are correct and that there are no trailing spaces in the string.

Sincerely,

Dan Kelleher

Answers (0)