Results 1 to 7 of 7

Thread: [RESOLVED] Crystal Report - Passing parameter

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    10000 light years away
    Posts
    143

    Resolved [RESOLVED] Crystal Report - Passing parameter

    Hi,

    please tell me the syntax of SetReportVariableValue in crystal report. I am getting Run-time error '70' permission denied when I try this. any other way to pass parameter to the report? (I'm using CR 9 with VB 6)

    Thanks in advance!

    Binish
    I was gratified to be able to answer promptly. I said I don't know!

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Crystal Report - Passing parameter

    to pass parameter to crystal you can use
    crystal.formula(0)="<formulaname>"="ganesh"
    crystal.formula(1)="<formulaname>"="21"

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    10000 light years away
    Posts
    143

    Re: Crystal Report - Passing parameter

    I am getting a subscipt out of range error. It is not a formula field, I am using a parameter field for the selection criteria
    I was gratified to be able to answer promptly. I said I don't know!

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Crystal Report - Passing parameter

    i am sorry why dont you create formula field in the crystal report and name it and pass the value for the field using my earlier post.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Crystal Report - Passing parameter

    Moved to reporting section

  6. #6
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Crystal Report - Passing parameter

    This is how is setup my report Paramters:

    VB Code:
    1. Set m_Rep = m_App.OpenReport(mRepName, 1)
    2.     m_rep.ParameterFields.GetItemByName("Owner").AddCurrentValue (gstrMarker)


    m_rep is a form level variable that is set as the report. Owner is the name of the parameter that I am trying to set and gstrMarker is the value I am setting Owner to.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Location
    10000 light years away
    Posts
    143

    Re: Crystal Report - Passing parameter

    That works like a charm! Thank You very much. thanks to all of u.
    I was gratified to be able to answer promptly. I said I don't know!

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