AddCurrentValue not working correctly for boolean parameters 
Author Message
 AddCurrentValue not working correctly for boolean parameters

I have developed a reporting app in VB6(sp5) using CR 8.5.  One report has
several boolean parameters.  When I try to set these parameters via the VB
program, they seem to always revert back to False, no matter what I set them
to.  If I run the report directly from Crystal Reports and enter the
parameter values manually, the report works fine.  All other types of
parameters are set correctly.  Here is the code that I am using:

                If .ParameterFields.Item(StoredProcParamNum).ValueType =
crNumberField Then

.ParameterFields.Item(StoredProcParamNum).AddCurrentValue
(CLng(CurrentValue))
                ElseIf .ParameterFields.Item(StoredProcParamNum).ValueType =
crBooleanField Then

.ParameterFields.Item(StoredProcParamNum).AddCurrentValue
(CBool(CurrentValue))
                Else

.ParameterFields.Item(StoredProcParamNum).AddCurrentValue (CurrentValue)
                 End If

If I step through this part of the code, it correctly hits the 2nd condition
(value type is boolean) and adds the correct value, but when the report is
printed/previewed, it is clear that the boolean values have reverted back to
false.

Any thoughts/ideas?



Mon, 08 Aug 2005 22:13:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Creating ADO recordset w/o database .Append not working correctly IIS5 win2000 Prof not .Net

2. How to AddCurrentValue of Null to parameters in rpt file

3. Help, OA ByRef parameters not passed correctly

4. Step into - F8 not working correctly in Access 2000

5. TransferText method in function does not working correctly

6. Parameterized Update query not working correctly in Access 97

7. Using Hyperlinks - Not working correctly, help !

8. send/receive from outside Outlook not working correctly

9. SelectRow when Subtasks are hidden does not work correctly

10. Listbox not working correctly from Form_Load

11. IDE Tabs not working correctly

12. mouse not working correctly

 

 
Powered by phpBB® Forum Software