Results 1 to 11 of 11

Thread: [RESOLVED]How to Stop Crystal from prompting for parameters

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    26

    Resolved [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

  2. #2
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    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?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    26

    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.

  4. #4
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    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.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    26

    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

  6. #6
    Lively Member
    Join Date
    Nov 2002
    Location
    Cranston, RI
    Posts
    110

    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

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    26

    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.

  8. #8
    Lively Member
    Join Date
    Nov 2002
    Location
    Cranston, RI
    Posts
    110

    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.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    26

    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

  10. #10
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    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."

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    26

    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
  •  



Click Here to Expand Forum to Full Width