|
-
Oct 2nd, 2002, 03:46 PM
#1
Thread Starter
Hyperactive Member
please look at the code
Can some one please look at the code and tell me whats wrong with it .. I have been doing this thing for a long time .. everything in the code works but when it gets to the last line where i am trying to print the report out it gives me an error that the print routine failed .. but it still prints all the reports ..
Dim Report As New CrystalReport1
Private Sub Form_Load()
Dim TransDate As Date
Dim tempDay As String
tempDay = Format(Date, "dddd")
If tempDay = "Monday" Then
TransDate = Format(Date - 5, "m/d/yyyy")
Else
TransDate = Format(Date - 3, "m/d/yyyy")
End If
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
Report.EnableParameterPrompting = False
Report.ReadRecords
Set params = Report.ParameterFields
For Each param In params
With param
.ClearCurrentValueAndRange
If .Name = "{?InsertDate}" Then
.AddCurrentValue TransDate
End If
End With
Next
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
Report.PrintOut False
End Sub
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
|