Good Day!
I need your help guys, I'm having a problem calling my report using parameters.
I got this error.
I'm trying to print a report that filters the date selected by the user.
Code:
Dim SelectionFormula As String
With CrystalReport1
.Reset
.Connect = "MyConnection"
.ReportFileName = App.Path & "\Reports\RESIGNEDperBenefits.rpt"
.LogOnServer "pdsodbc.dll", "Connection", GlobalConnDatabase, GlobalConnUsername, GlobalConnPassword
.RetrieveDataFiles
.WindowShowCloseBtn = True
.WindowShowExportBtn = True
.WindowShowRefreshBtn = True
.WindowShowPrintBtn = True
.WindowShowPrintSetupBtn = True
.WindowState = crptMaximized
.ParameterFields(0) = "Type;" & Text1.Text & ";TRUE"
.StoredProcParam(1) = DTPicker1.Value
.Action = 1
End With
I used the Stored Procedure connected with my report.
Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[COEResigned]
@dt1 as datetime,
@dt2 as datetime
AS
BEGIN
select * from dbo.view_COEResigned
where dateresigned between @dt1 and @dt2
SET NOCOUNT ON;
END
Please help me//