Thanks to Kleinma I am successfully passing my desired parameters to my Crystal Report.
But I am still being prompted to enter the parameters.
Any assistance on how to disable the paramter prompt when the crystal veiwer opens the report.
Printable View
Thanks to Kleinma I am successfully passing my desired parameters to my Crystal Report.
But I am still being prompted to enter the parameters.
Any assistance on how to disable the paramter prompt when the crystal veiwer opens the report.
If you pass 1 parameter to the report, you must pass all of them. Are you passing all of them?
Yes I am successfully passing 2 parameters that were coded in the load event for the report. But I am still being prompted by Crystal to enter the parameters. (and it doesnt matter what data i place in the prompt windows, the coded data overwrites that and displays the correct information in the report). I just want to stop crystal form prompting the user to enter data.
It prompts a window asking for a parameter because you didn't supply the correct parameter in which it's expecting a value.
my parameter in the crystal reports are CPMHID ---- number and NoteDate ---- Date
My code being called and the report load event is as below:
Dim rpt As New obhsnotes
rpt.SetParameterValue("CPMHID", paramhid)
rpt.SetParameterValue("NoteDate", paradate)
Me.viewer.ReportSource = rpt
'Me.viewer.PrintReport()
in my main module i have set public the following variables:
Public paramhid As Integer
Public paradate As Date
Just to clarify, are you declaring all of this in an actual load\format event of Crystal or from the Form's Load event?Quote:
My code being called and the report load event
In my experience passing values to parameters I do my reportDoc.Load(), reportDoc.SetDataSource(),.SetParameterValue() and viewer.ReportSource=reportDoc all from the same event, usually a click event from a button on a form
Yes it is on the Form load event of the form that has the crystal report viewer nested within it.
I was able to recreate this by calling RefreshReport() from my CRViewer. You're not making a call to this, are you?
Also, the report object from the CR AxtiveX Design Runtime library has a property called EnableParameterPrompting which you can set to false.
Just covering all the bases.
would you have a code snippet and could you please let me know where i need to place this code
Ogeechee what do you mean how to stop crystal from prompting for parameters?
You mean with .SetParameterValue doesn't work??
Regards
Jorge
I found my problem I was call the report form a button and assigning the report source there. I was also assigning the report source from the properties window from the crystal viewer. When I removed the reportsource from the propeties of the Crystal viewer the rport runs successful;. Thank you all for your assistance on this issue.