Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Why I can't pass parameters into CR from VB6

I want to Pass parameters into crystal report from VB6.

But whatever I try, it don't work Fine,

always Show the message "This field name is not known".

Crystal Report::

Parameter: a.@cmpy;

b.@p1

formula:

a. If {?@cmpy} ="USA" or {?@cmpy} ="usa" then

"This is test 1 sentences"

else if {?@cmpy}="TWD" or {?@cmpy} = "twd" then

"This is test 2 sentences"

b. if trim({?@p1})="1" then "This is test 3 sentences"

VB::

Public oApp As New CRAXDDRT.Application

Public oRpt As CRAXDDRT.Report

...

oRpt.ParameterFields(1).ClearCurrentValueAndRange

oRpt.ParameterFields(2).ClearCurrentValueAndRange

oRpt.ParameterFields(1).AddCurrentValue ("TWD")

oRpt.ParameterFields(2).AddCurrentValue ("1")

...

I had trid to use "IsCurrentValueSet" function to check whether parameter was set or not, and It responsed "Ture",so I so confused about it.

Anyone know about this??

ps. I had trid other way that change the formula indirectly, although it can work fine, but it isn't a right way to solve my problem.

Edited by: DeanLai on Jun 22, 2010 8:54 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question