I have a VB.Net running a Crystal Report 11 report. This report takes 2 parameters. I have this already set up in my app and in the report. However, I keep getting prompted to enter parameters. How do I get rid of these prompts? Also, I get the below error when I set both of these parameter values to NULL. Here is my code below:
Thanks,Code:Public Function AccessGASR(ByVal strUserID As String, _ ByVal intGroupID As Integer, _ ByVal strInputType As String, _ ByVal strReportPath As String) Try rptErr.clsModule = "GroupActivitySummaryReportDLL" Dim crDoc As New rptGroupActivitySummary With crConnectionInfo .ServerName = "HERCULES" .DatabaseName = "Drip" .UserID = "CRVBNETSQL" .Password = "SC1800fuels" .IntegratedSecurity = True End With crDoc.SetParameterValue("@userID", strUserID) crDoc.SetParameterValue("@groupID", intGroupID) If strInputType = "O" Then PrintGASR(crDoc) ElseIf strInputType = "B" Then CreatePDFReport(crDoc) End If Catch ex As Exception rptErr.clsProcedure = "AccessGASR()" rptErr.clsMsg = ex.Message rptErr.WriteToTextFile(ErrorDirectory, "DRIP-ErrorLog.txt") End Try End Function




Reply With Quote