Results 1 to 13 of 13

Thread: Parameters are not showing on report

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    Parameters are not showing on report

    hi,
    I have crystal report that I'm trying to pass parameters to it. the below code doesn't generate any errors but I don't see value for my @Name parameter on my report:

    VB Code:
    1. crParameterFieldDefinitions = MyReport.DataDefinition.ParameterFields
    2.             crParameterFieldDefinition = crParameterFieldDefinitions.Item("@Name")
    3.             crParameterValues = crParameterFieldDefinition.CurrentValues
    4.             crParameterDiscreteValue = New ParameterDiscreteValue
    5.             crParameterDiscreteValue.Value = "Jazmin"
    6.             crParameterValues.Add(crParameterDiscreteValue)
    7.             crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
    8.  
    9.         Catch ex As Exception
    10.             Dim sMessage As String
    11.             sMessage = ex.Message
    12.  
    13.         End Try
    14.  
    15.         'This function will populate my datatable works fine
    16.         Dim data As DataTable = dbHelper.GetProjectProfileReport(ids, div, func, funca)      
    17.         projReport.SetDataSource(data)
    18.  
    19.         ' trying to pass @Name Parameter to the report but can't see it
    20.         projReport.SetParameterValue("@Name", crParameterDiscreteValue)

    Thank you for your help in advance,
    Waely

  2. #2
    Hyperactive Member Jlarini's Avatar
    Join Date
    Jan 2002
    Location
    São Paulo, Brazil
    Posts
    263

    Re: Parameters are not showing on report

    waely,

    Parameter names are started with "?" not with "@", as formulas...

    []s

    João Luiz
    nothing is impossible, it's sometimes very hard to do!

    If your thread is solved... Please edit it and add [Resolved] or [Solved] on it!

    If you like Marine aquarium, feel free to PM me.

    Sorry my bad English

    God bless Parksie!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    Re: Parameters are not showing on report

    I"m not doing anything special on crystal report's end. I'm just draging my @Name parameter from the parameter fields list to the report and it will place ? infront likst ?@Name

    still issue not resolved. thanks for trying to help out.

    Quote Originally Posted by Jlarini
    waely,

    Parameter names are started with "?" not with "@", as formulas...

    []s

    João Luiz

  4. #4
    Hyperactive Member Jlarini's Avatar
    Join Date
    Jan 2002
    Location
    São Paulo, Brazil
    Posts
    263

    Re: Parameters are not showing on report

    waely,

    You'll put ?name.

    []s

    João Luiz
    nothing is impossible, it's sometimes very hard to do!

    If your thread is solved... Please edit it and add [Resolved] or [Solved] on it!

    If you like Marine aquarium, feel free to PM me.

    Sorry my bad English

    God bless Parksie!

  5. #5
    Member
    Join Date
    Jun 2007
    Location
    Lomé - TOGO
    Posts
    38

    Re: Parameters are not showing on report

    HI waely,
    Did u finally solve your problem out? am having the same issue. After binding a data table to my CR, i want to send to data to some parameter fields that i've put on my CR.

    WaZda

  6. #6
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Parameters are not showing on report

    I always used this syntaxe
    Code:
        Report.ParameterFields.ITEM(1).AddCurrentValue cust
    ===================================================
    If your question has been answered, mark the thread as [RESOLVED]

  7. #7
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Re: Parameters are not showing on report

    Hi to all:

    I'm using too the same syntax for parameter fields:

    Code:
    Report.ParameterFields.ITEM(1).AddCurrentValue cust
    But lately i had put in section Details a parameter field and write this code:

    Code:
    Report.ParameterFields(1).AddCurrentValue "name"
    Report.ParameterFields(1).AddCurrentValue "morada"
    Report.ParameterFields(1).AddCurrentValue "localidade
    but CR only return the last item...
    If I have a parameter field in details section,I think CR should present 3 records no?
    Anyone know way this happens?

    Thanks

  8. #8
    Member
    Join Date
    Jun 2007
    Location
    Lomé - TOGO
    Posts
    38

    Re: Parameters are not showing on report

    hi sacramento,
    from what u've written it's clear that u have only the last value. there is another syntax to have the details like a arrays so u can have a much as records as you want. I'll see if i can find it.

  9. #9
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Re: Parameters are not showing on report

    Hi Wazda:

    I appreciate if you find the correct syntax...

    Thanks

  10. #10
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Re: Parameters are not showing on report

    Hi Wazda:

    You don't find the syntax?

    Thanks

  11. #11
    Member
    Join Date
    Jun 2007
    Location
    Lomé - TOGO
    Posts
    38

    Re: Parameters are not showing on report

    hi sacramento,
    Am working on it. haven't got it yet.

  12. #12
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Re: Parameters are not showing on report

    ok..thank you very much

  13. #13
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Re: Parameters are not showing on report

    Hi Wazda:

    Don't you find the code?
    Sory but i need a lot this code...I appreciate if you can give a little help!

    Thanks

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