For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > February 2008 > Parameter Prompt









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 Prompt
Andy Baker

2008-02-20, 7:26 pm

I have a VB.NET 2003 application that uses crystal reports XI with SP3 for
reporting. I have a working report that contains a subreport that I need to
add a parameter to, and pass the value of the parameter from my VB.NET code.
I have done this - adding the parameter and using the same code that I use
elsewhere in the project i.e.
ParameterFieldDefinitions = rptReport.DataDefinition.ParameterFields
ParameterFieldDefinition =
ParameterFieldDefinitions.Item("SeparateSpecials")
ParameterValues = ParameterFieldDefinition.CurrentValues
ParameterValues.Clear
ParameterDiscreteValue = New
CrystaDecisions.Shared.ParameterDiscreteValue
ParameterDiscreteValue.Value = False
ParameterValues.Add(ParameterDiscreteValue)
ParameterFieldDefinition.ApplyCurrentValues(ParameterValues)

where the boolean parameter just added is called SeparateSpecials and the
report is rptReport. However, every time I run the report, I am getting a
prompt to input the parameter where I would not expect to. I presume it is
because the report has 2 parameters as I have a subreport as well (this is
the only thing that is different from other places in my code), but I cannot
see what I need to do to prevent this. Thanks in advance.

Andy Baker


Sponsored Links







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

Copyright 2008 codecomments.com