Quantcast
Viewing all articles
Browse latest Browse all 3636

Mixed Parameter Types for Subreports Causing Error

Hello,

 

I'm updating an ASP project:

Existing:

VS2005

CR 2011

MSDAORA

 

New:

VS2010

CR for VS 13.0.6.1027

Oracle Server

 

All reports run against stored procedures.

 

If I have a sub report that has parameter links of a single type, either linking to a report field OR linking to a parameter the reports run fine. If however I have a mix of Parameter links and Report Field links I receive an error "Cannot find parameter field <Field Name> in subreport <Sub Report>" for any link that is set to a Report Field. The error occurs whether the parameters are set in code or not. The failing reports can be displayed in preview.

 

Private Sub SetParameters()

        Dim oValue As New ParameterDiscreteValue

        Dim oKeys As NameValueCollection = Request.QueryString

 

        For Each oParam As CrystalDecisions.Shared.ParameterField In moReport.ParameterFields

            oValue.Value = oKeys(oParam.Name)

 

            If oValue.Value Is Nothing = False Then

                If oParam.ParameterValueType = ParameterValueKind.DateTimeParameter Then

                    moReport.SetParameterValue(oParam.Name, Convert.ToDateTime(oValue.Value))

                Else

                    moReport.SetParameterValue(oParam.Name, oValue.Value)

                End If

            End If

 

        Next

    End Sub

 

Any insight would be greatly appreciated.

 

Thanks


Viewing all articles
Browse latest Browse all 3636

Trending Articles