Hi,
I would like to change the report title in code before calling the Report Viewer. I am using the same report but changing the selection in code.
Also I need to use the first day of the month and the last day of the month Dates. I would like to derive the dates BeginMonthDate & EndMonthDate from GetDate() but cannot find the right VB commands or Functions. I found FirstDayOfWeek but not FirstDayOfMonth.
Looking for somthing like:
FirstDayOfMonthDate(TimeInterval.Month, GetDate())
LastDayOfMonthDate(TimeInterval.Month, GetDate())
The code is as follows:
Public WithEvents oRpt As ReportDocument
oRpt = New ExpireList01()
oRpt.DataDefinition.RecordSelectionFormula = "{Listing.Status} in " & "[" & "'" & "A" & "'," & "'" & "C" & "'," & "'" & "P" & "'] " & "and {Listing.OurListing} and {Listing.MlsOfficeId}='" & sdMlsOfficeId & "'" & " And {Listing.ListingExpireDate} in DateTime (2003, 03, 01, 00, 00, 00) to DateTime (2003, 03, 31, 23, 59, 59)"
CrystalReportViewer1.ReportSource = oRpt
I can find how to change the Report Title using the oRpt.------ above.
Any help would be appreciated!!!
Thanks
Roland