PDA

Click to See Complete Forum and Search --> : Parameters are not showing on report


waely
Oct 17th, 2006, 03:04 PM
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:

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

Jlarini
Oct 17th, 2006, 03:10 PM
waely,

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

[]s

Joćo Luiz

waely
Oct 18th, 2006, 07:55 AM
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.

waely,

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

[]s

Joćo Luiz

Jlarini
Oct 18th, 2006, 11:38 AM
waely,

You'll put ?name.

[]s

Joćo Luiz

WaZda
Jun 4th, 2008, 05:41 AM
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

Pasvorto
Jun 12th, 2008, 08:47 AM
I always used this syntaxe

Report.ParameterFields.ITEM(1).AddCurrentValue cust

sacramento
Jul 21st, 2008, 08:07 AM
Hi to all:

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

Report.ParameterFields.ITEM(1).AddCurrentValue cust

But lately i had put in section Details a parameter field and write this 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

WaZda
Jul 21st, 2008, 08:55 AM
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.

sacramento
Jul 21st, 2008, 08:58 AM
Hi Wazda:

I appreciate if you find the correct syntax...

Thanks

sacramento
Jul 22nd, 2008, 06:36 PM
Hi Wazda:

You don't find the syntax?

Thanks

WaZda
Jul 23rd, 2008, 05:16 AM
hi sacramento,
Am working on it. haven't got it yet.

sacramento
Jul 23rd, 2008, 05:17 AM
ok..thank you very much

sacramento
Aug 4th, 2008, 06:00 PM
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