[RESOLVED] Removing Parameter prompt from VB.Net app?
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:
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
Thanks,
Re: Removing Parameter prompt from VB.Net app?
Do you have a subreport that is expecting parameters? I seem to remember you dealing with them before... that could cause this.
Re: Removing Parameter prompt from VB.Net app?
Besoup,
This is actually the same problem you were helping me with before. I don't understand how I fixed it, but whenever I make a change (small change) to the report...I run into this problem again and again. I don't understand what could be causing this. But to answer your question...yes, I have 3 subreports, all of which take the same 2 parameters.
Thanks,
Re: Removing Parameter prompt from VB.Net app?
yeah I would double check all of the links and refresh each subreport individually and see if that helps... what exactly did you change? just a field or something in the database?
Re: Removing Parameter prompt from VB.Net app?
Yeah, all I did was add a new field from the database. It's really weird and very frustrating!
Re: Removing Parameter prompt from VB.Net app?
yeah try opening up all of the sup reports and hitting F5 to refresh them. Then go through all of the sub report parameter links. Maybe even remove them and re link them.
Re: Removing Parameter prompt from VB.Net app?
Well I did what you suggested in your previous post and that seemed to work. Don't ask me what it did exactly but it worked.
Thanks for your help!
Re: [RESOLVED] Removing Parameter prompt from VB.Net app?
yeah whenever you change the structure of a datasource it screws up crystal... it's annoying but we live with it. :cool: