For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > March 2006 > parameter help from vb.net 2003









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author parameter help from vb.net 2003
George Hardy

2006-03-23, 7:08 pm

Hello Crystal Wizards:

Im sure i am doing this with one line of code missing, but I am trying to
show a report with certain product numbers ( variable array mKeys() ) passed
in for a quick report....


Dim ParamFieldDef As
CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
Dim ParamValues As CrystalDecisions.Shared.ParameterValues
Dim ParamDiscreteValue As CrystalDecisions.Shared.ParameterDiscreteValue

Dim rptTT As New TransferTicket

ParamFieldDef = rptTT.DataDefinition.ParameterFields.Item("@ProdNum")
ParamValues = New CrystalDecisions.Shared.ParameterValues
ParamDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue

Dim i As Integer
For i = 0 To UBound(mKeys) -1
ParamDiscreteValue.Value = mKeys(i)
ParamValues.AddValue(ParamDiscreteValue.Value)
Next
ParamFieldDef.ApplyCurrentValues(ParamValues)
DBConnectionForReports(rptTT, Me) 'this sets the login info
Me.rptViewer.ReportSource = rptTT

by the time the report shows, it does not prompt me for the parameters, but
is a blank report and doesn't seem to apply the parameter list.
any suggestions?

thanks in advance!!!!!!
george hardy


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com