DataDefinition.ParameterFields
(1)
ASP.NET
(1)
ParameterDiscreteValue
(1)
Database
(1)
Report
(1)
ParameterField
(1)
DscVal.Value
(1)
ParamField
(1)

CR 8.5 / ASP.NET 3.5 / SQL2K Boolean Parameter

Asked By bh
19-Mar-10 12:44 PM
I have a crystal report (8.5) based on a SQL2K Stored procedure that accepts
a single bit parameter (@Qual), which defaults to 0 in the procedure.

When I run the report from crystal, it works fine, whether I select true or
false.

When I run the report from .NET, no matter what I send to the discrete
parameter, it filters out only the true (1) records.


Imports CrystalDecisions.Shared
Dim paramField As ParameterField = New ParameterField
Dim dscVal As ParameterDiscreteValue = New ParameterDiscreteValue
-----set dscVal using one of the following scenarios, below----
paramField.CurrentValues.Add(dscVal)

Scenario 1: (returns only records with @Qual = 1 in the database)
dscVal.Value = False

-OR-

Scenario 2: (returns only records with @Qual = 1 in the database)
dscVal.Value = 0

-OR-

Scenario 3: Errors out, as you can not pass chr() data into a discrete value
dscVal.Value = Chr(168)

Any help you could offer to get this operational would be appreciated.
Thanks in advance.
bh

Not just boolean--I tried changing the parameter type to int then string

bh replied to bh
20-Mar-10 11:07 AM
Not just boolean--I tried changing the parameter type to int then string &
displaying on the report, and realize, the stored procedure is not
recognizing any value passed in through vb/asp.net.  The report is accepting
that a value has been passed, and I have tested that the parameter name in
report's DataDefinition.ParameterFields matches what I am sending in.  This
is really frustrating.  I can pass other (Crystal--not SQL stored procedure)
parameters that are in the report to the report without any problem.  This
is really frustrating, and would help from anyone who ise experience/resolved
this issue.  Thank you.
Post Question To EggHeadCafe