Quantcast
Viewing all articles
Browse latest Browse all 3636

Error: The browse field type is not compatible with the parameter field type

Upgrading from CR11.5 to CR13.

 

I set parameters using CrystalDecisions.CrystalReports.Engine.ReportDocument.SetParameterValue method. Works fine for Stored Procedure Parameters. Doesn't seem to work for ReportParameter types. At least that what I've determined in my investigation so far.

 

When I execute the SetParameterValue, I receive error: CrystalDecisions.CrystalReports.Engine.ParameterFieldException: {"The browse field type is not compatible with the parameter field type."}.

 

Here is a parameter that works:

 

{CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition}

    Attributes: Count = 1

    CurrentValues: Count = 1

    DefaultValueDisplayType: DescriptionAndValue {1}

    DefaultValues: Count = 0

    DefaultValueSortMethod: BasedOnValue {0}

    DefaultValueSortOrder: NoSort {0}

    DiscreteOrRangeKind: DiscreteValue {0}

    EditMask: Nothing

    EnableAllowEditingDefaultValue: True

    EnableAllowMultipleValue: False

    EnableNullValue: True

    EngineObjectFactory: {CrystalDecisions.CrystalReports.Engine.EngineObjectFactory}

    FormulaName: "{?P_DATE_FROM}"

    HasCurrentValue: True

    IsOptionalPrompt: False

    Kind: ParameterField {6}

    MaximumValue: Nothing

    MinimumValue: Nothing

    Name: "P_DATE_FROM"

    NumberOfBytes: 8

    ParameterFieldName: "P_DATE_FROM"

    ParameterFieldUsage: Unknown {3}

    ParameterFieldUsage2: InUse Or DataFetching {33}

    ParameterType: StoreProcedureParameter {1}

    ParameterValueKind: DateTimeParameter {5}

    PromptText: Nothing

    RasDocument: {CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper}

    RasField: {System.__ComObject}

    RasObject: {System.__ComObject}

    ReportName: ""

    UseCount: 0

    ValueType: DateTimeField {15}

 

 

Here is the one that doesn't:

{CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition}

    Attributes: Count = 1

    CurrentValues: Count = 0

    DefaultValueDisplayType: DescriptionAndValue {1}

    DefaultValues: Count = 0

    DefaultValueSortMethod: BasedOnValue {0}

    DefaultValueSortOrder: NoSort {0}

    DiscreteOrRangeKind: DiscreteValue {0}

    EditMask: Nothing

    EnableAllowEditingDefaultValue: True

    EnableAllowMultipleValue: False

    EnableNullValue: False

    EngineObjectFactory: {CrystalDecisions.CrystalReports.Engine.EngineObjectFactory}

    FormulaName: "{?p_date_from}"

    HasCurrentValue: False

    IsOptionalPrompt: False

    Kind: ParameterField {6}

    MaximumValue: Nothing

    MinimumValue: Nothing

    Name: "p_date_from"

    NumberOfBytes: 4

    ParameterFieldName: "p_date_from"

    ParameterFieldUsage: Unknown {3}

    ParameterFieldUsage2: InUse Or DataFetching {33}

    ParameterType: ReportParameter {0}

    ParameterValueKind: DateParameter {3}

    PromptText: "STARTING WORK DATE"

    RasDocument: {CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper}

    RasField: {System.__ComObject}

    RasObject: {System.__ComObject}

    ReportName: ""

    UseCount: 0

    ValueType: DateField {9}

 

After I saw this is when I figured that the problem was b/c this paramter is of ParameterType of ReportParameter. I verified that case is not a problem. I also tried oReport.ReportClientDocument.DataDefController.ParameterFieldController.SetCurrentValue, but that did not work. I am using InProc RAS.

 

Any ideas? Thanks.


Viewing all articles
Browse latest Browse all 3636

Trending Articles