Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

give more than one value to the parameter through VB 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi...
i want to ask you something like how to give more than one value to the parameter through VB.

while in CR it can after i set the parameter to have multiple value BUT, when i test it through VB it doesn't work, the value in parameter always the last value i give....... :)( strange ha...? )

can anyone help me....?!
 
OBT2,
Following is info from CRW web site. You didn't say what version of VB or CRW you are using - I'll guess VB6 and CRW 8. You will find a lot of answers at the web site:
Then go to the SUPPORT option. They have a 'ASK' input line that is very helpful. good luck.

Passing Multiple Parameters to a Multiple Value
Parameter Field Through ASP



The information in the article refers to:
Seagate Crystal Reports 8
Applies to:
Reported version only
WEB
Crystal Automation Server (ASP)
Parameter Fields


Synopsis

Passing multiple parameters to a multiple value parameter
field through an Active Server Pages (ASP) application using
the Report Design Component (RDC).

Solution

Crystal Reports 8 will now use the RDC as its runtime. The
RDC now has support for the extended parameter features
that the Crystal Automation Server did not include.

In order for a parameter field to accept multiple values
passed to it please ensure that in the Crystal Report
Designer that the parameter has a checkmark in the multiple
values check box.

To pass multiple values the AddCurrentValue property of the
RDC must be used.

' Insert a value for the Crystal Report Parameter Field

set session("ParamCollection") =
Session("oRpt").Parameterfields
'This line creates an object to represent the collection of
parameter
'fields that are contained in the report.

set Param1 = session("ParamCollection").Item(1)
'This line creates an object to reference the first parameter in
the
'report. You can also use the parameter name in the Item()
statement.

Param1.EnableMultipleValues = 1

' This line turns on the option for multiple value parameters.

ParamValue = "USA"
ParamValue1 = "Canada"
'This line creates a temporary variables to store the values to
pass to
'the parameter field.

Call Param1.AddCurrentValue (CStr(ParamValue))
Call Param1.AddCurrentValue (CStr(ParamValue1))

The parameter does not need to be cast with a value type it
will be picked up from the report. Do not try casting a value
type, as the AddCurrentValue method does not support that
many arguments.
 
BUT i am now using CR 7 and VB6 .can it be done with that.
couse as far i know there isn't any of .addcurrentvalue method at crystal 7 while using it in VB6.

Is there another way to do, except using CR 8...? :)

Thank You...
 
Hello,

This is very interesting. I am trying to use the AdCurrent value method in an ASP application.

We currently using the SetCurentValue method sucessfully with string values less than 256 characters. Setting the current value with strings greater than 256 generates an "Out of memory" error.

I am able to execute the AddCurrentValue parameter sucessfully.
I add each value with the AddCurrentValue method, but the parameters have no values. When I test using IsCurrentValueSet and it says true. I look at how many using NumberOfCurrentValues and it shows increments. But when I look at the Param.value, it is empty.

The documentation is limited.

I am probably doing something stupid.

I did not answer your question, but I hope I added to this discussion. I am awating a response from the Seagate e-mail support staff.

mike
mbenefiel@intellisolve.com
 
OBT2,

One idea that comes to mind is to pass a single composite string
parameter that contains multiple parts separated by
some special character.
Then, within Crystal, use Formulas to break the composite parameter
into its parts and use them.

hth,
- Ido
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top