Re: please look at the code
He meant that you should do put these tags: [vbcode][/vbcode] to make it more readable. Liek this:
VB Code:
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
Besides, post a better subject. "Please look at the code" means nothing to me.