|
-
Oct 20th, 2005, 12:12 PM
#1
Thread Starter
Junior Member
[RESOLVED]How to Stop Crystal from prompting for parameters
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.
Last edited by Ogeechee; Oct 25th, 2005 at 09:07 AM.
Reason: Resolved
-
Oct 20th, 2005, 03:00 PM
#2
Fanatic Member
Re: How to Stop Crystal from prompting for parameters
If you pass 1 parameter to the report, you must pass all of them. Are you passing all of them?
-
Oct 20th, 2005, 05:56 PM
#3
Thread Starter
Junior Member
Re: How to Stop Crystal from prompting for parameters
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.
-
Oct 20th, 2005, 07:38 PM
#4
Re: How to Stop Crystal from prompting for parameters
It prompts a window asking for a parameter because you didn't supply the correct parameter in which it's expecting a value.
-
Oct 21st, 2005, 09:30 AM
#5
Thread Starter
Junior Member
Re: How to Stop Crystal from prompting for parameters
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
-
Oct 21st, 2005, 11:17 AM
#6
Lively Member
Re: How to Stop Crystal from prompting for parameters
My code being called and the report load event
Just to clarify, are you declaring all of this in an actual load\format event of Crystal or from the Form's 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
-
Oct 21st, 2005, 12:57 PM
#7
Thread Starter
Junior Member
Re: How to Stop Crystal from prompting for parameters
Yes it is on the Form load event of the form that has the crystal report viewer nested within it.
-
Oct 21st, 2005, 01:57 PM
#8
Lively Member
Re: How to Stop Crystal from prompting for parameters
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.
-
Oct 24th, 2005, 07:09 AM
#9
Thread Starter
Junior Member
Re: How to Stop Crystal from prompting for parameters
would you have a code snippet and could you please let me know where i need to place this code
-
Oct 24th, 2005, 11:41 AM
#10
Re: How to Stop Crystal from prompting for parameters
Ogeechee what do you mean how to stop crystal from prompting for parameters?
You mean with .SetParameterValue doesn't work??
Regards
Jorge
"The dark side clouds everything. Impossible to see the future is."
-
Oct 25th, 2005, 09:05 AM
#11
Thread Starter
Junior Member
Re: How to Stop Crystal from prompting for parameters
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|