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:
crParameterFieldDefinitions = MyReport.DataDefinition.ParameterFields
crParameterFieldDefinition = crParameterFieldDefinitions.Item("@Name")
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterDiscreteValue = New ParameterDiscreteValue
crParameterDiscreteValue.Value = "Jazmin"
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
Catch ex As Exception
Dim sMessage As String
sMessage = ex.Message
End Try
'This function will populate my datatable works fine
Dim data As DataTable = dbHelper.GetProjectProfileReport(ids, div, func, funca)
projReport.SetDataSource(data)
' trying to pass @Name Parameter to the report but can't see it
projReport.SetParameterValue("@Name", crParameterDiscreteValue)
Thank you for your help in advance,
Waely
Re: Parameters are not showing on report
waely,
Parameter names are started with "?" not with "@", as formulas...
[]s
João Luiz
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
Re: Parameters are not showing on report
waely,
You'll put ?name.
[]s
João Luiz
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
Re: Parameters are not showing on report
I always used this syntaxe
Code:
Report.ParameterFields.ITEM(1).AddCurrentValue cust
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
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.
Re: Parameters are not showing on report
Hi Wazda:
I appreciate if you find the correct syntax...
Thanks
Re: Parameters are not showing on report
Hi Wazda:
You don't find the syntax?
Thanks
Re: Parameters are not showing on report
hi sacramento,
Am working on it. haven't got it yet.
Re: Parameters are not showing on report
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