|
-
Nov 20th, 2000, 10:18 PM
#1
Thread Starter
Lively Member
My report just stopped showing up in it's window here is my code.
private sub cmdreport_click()
Report.DataFiles(0) = App.Path & "\report.mdb"
Report.PrintReport
end sub()
No errors reported either.
-
Nov 21st, 2000, 09:16 AM
#2
Frenzied Member
Crystal does return errors but they're not always visible. Try this;
Code:
Dim Reply As Integer
Report.DataFiles(0) = App.Path & "\report.mdb"
Reply=Report.PrintReport
If Reply<>0 Then
Msgbox "Crystal Error " & Report.LastErrorNumber & " (" & Report.LastErrorString & ")"
End If
Do you get an error now..?
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Nov 21st, 2000, 10:54 AM
#3
Addicted Member
Hi chongo 2002,
I have this in my code to show my Crystal Reports.
Private Sub mnuReportsfrmPreviewShift_Click()
With CrystalReport9
.Destination = crptToWindow
.DataFiles(0) = "H:\Software Development Projects\Maintenance database\Maintenance Data.mdb"
.ReportFileName = "H:\Software Development Projects\Maintenance database\Summary By Shift.rpt"
.Action = 1
End With
End Sub
I also put the crystal report control on the main form, so that it would not trouble with showing the report. You can get that control from Project, Components, then select the crystal report control and apply.
Good luck!
jeffro
-
Nov 21st, 2000, 02:52 PM
#4
Thread Starter
Lively Member
I get an unable to open database error now or a report not found.
-
Nov 21st, 2000, 03:06 PM
#5
Addicted Member
Let me see your code again.
jeffro
-
Nov 22nd, 2000, 01:26 PM
#6
Thread Starter
Lively Member
got it
If i leave out the .datafiles line it works fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|