none
The processing of FilterExpression for the below dataset cannot be performed. Cannot compare data of types system.decimal and system.double. Please check the data type returned by the Filter Expression. RRS feed

  • Question

  • I have bolded the fields, filter expressions and parameters that I believe are part of the issue.

    If I remove the bolded filter expression the report does run.

    RDL below

    <DataSet Name="usp_Sales3SeasonVariance">

          <Query>

            <DataSourceName>bpcRS</DataSourceName>

            <QueryParameters>

              <QueryParameter Name="@Season1Start">

                <Value>=Parameters!Season1Start.Value</Value>

              </QueryParameter>

              <QueryParameter Name="@Season1End">

                <Value>=Parameters!Season1End.Value</Value>

              </QueryParameter>

              <QueryParameter Name="@CUSTOMER_LIKE">

                <Value>=Parameters!CUSTOMER_LIKE.Value</Value>

              </QueryParameter>

              <QueryParameter Name="@SALESREP_IDS">

                <Value>=Parameters!SALESREP_IDS.Value</Value>

              </QueryParameter>

            </QueryParameters>

            <CommandType>StoredProcedure</CommandType>

            <CommandText>usp_Sales3SeasonVariance</CommandText>

          </Query>

          <Fields>

            <Field Name="Season1Start">

              <DataField>Season1Start</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season1End">

              <DataField>Season1End</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season2Start">

              <DataField>Season2Start</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season2End">

              <DataField>Season2End</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season3Start">

              <DataField>Season3Start</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season3End">

              <DataField>Season3End</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="INVOICE_DATE">

              <DataField>INVOICE_DATE</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PRODUCT_CODE">

              <DataField>PRODUCT_CODE</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PART_ID">

              <DataField>PART_ID</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PRODUCT_DESCRIPTION">

              <DataField>PRODUCT_DESCRIPTION</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PART_DESCRIPTION">

              <DataField>PART_DESCRIPTION</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_ID">

              <DataField>CUSTOMER_ID</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_NAME">

              <DataField>CUSTOMER_NAME</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_CITY">

              <DataField>CUSTOMER_CITY</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_STATE">

              <DataField>CUSTOMER_STATE</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="SALESREP_ID">

              <DataField>SALESREP_ID</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="SALESREP_NAME">

              <DataField>SALESREP_NAME</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="INVOICE_QTY_S1">

              <DataField>INVOICE_QTY_S1</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_QTY_S2">

              <DataField>INVOICE_QTY_S2</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_QTY_S3">

              <DataField>INVOICE_QTY_S3</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_AMT_S1">

              <DataField>INVOICE_AMT_S1</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_AMT_S2">

              <DataField>INVOICE_AMT_S2</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_AMT_S3">

              <DataField>INVOICE_AMT_S3</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

          </Fields>

          <Filters>

            <Filter>

              <FilterExpression>=(Fields!INVOICE_AMT_S1.Value + Fields!INVOICE_AMT_S2.Value + Fields!INVOICE_AMT_S3.Value)</FilterExpression>

              <Operator>GreaterThanOrEqual</Operator>

              <FilterValues>

                <FilterValue DataType="Integer">=Parameters!TotalSalesRange1.Value</FilterValue>

              </FilterValues>

            </Filter>

            <Filter>

              <FilterExpression>=(Fields!INVOICE_AMT_S1.Value + Fields!INVOICE_AMT_S2.Value + Fields!INVOICE_AMT_S3.Value)</FilterExpression>

              <Operator>LessThanOrEqual</Operator>

              <FilterValues>

                <FilterValue DataType="Integer">=Parameters!TotalSalesRange2.Value</FilterValue>

              </FilterValues>

            </Filter>

            <Filter>

              <FilterExpression>=(Fields!INVOICE_AMT_S1.Value-Fields!INVOICE_AMT_S2.Value)/Fields!INVOICE_AMT_S2.Value</FilterExpression>

              <Operator>GreaterThanOrEqual</Operator>

              <FilterValues>

                <FilterValue>=Parameters!P1P2_VarianceRange1.Value</FilterValue>

              </FilterValues>

            </Filter>

            <Filter>

              <FilterExpression>=(Fields!INVOICE_AMT_S1.Value-Fields!INVOICE_AMT_S2.Value)/Fields!INVOICE_AMT_S2.Value</FilterExpression>

              <Operator>LessThanOrEqual</Operator>

              <FilterValues>

                <FilterValue>=Parameters!P1P2_VarianceRange2.Value</FilterValue>

              </FilterValues>

            </Filter>

          </Filters>

        </DataSet>

        <DataSet Name="CustomerTotal">

          <Query>

            <DataSourceName>bpcRS</DataSourceName>

            <QueryParameters>

              <QueryParameter Name="@Season1Start">

                <Value>=Parameters!Season1Start.Value</Value>

              </QueryParameter>

              <QueryParameter Name="@Season1End">

                <Value>=Parameters!Season1End.Value</Value>

              </QueryParameter>

              <QueryParameter Name="@CUSTOMER_LIKE">

                <Value>=Parameters!CUSTOMER_LIKE.Value</Value>

              </QueryParameter>

              <QueryParameter Name="@SALESREP_IDS">

                <Value>=Parameters!SALESREP_IDS.Value</Value>

              </QueryParameter>

            </QueryParameters>

            <CommandType>StoredProcedure</CommandType>

            <CommandText>usp_Sales3SeasonVariance</CommandText>

          </Query>

          <Fields>

            <Field Name="Season1Start">

              <DataField>Season1Start</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season1End">

              <DataField>Season1End</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season2Start">

              <DataField>Season2Start</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season2End">

              <DataField>Season2End</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season3Start">

              <DataField>Season3Start</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="Season3End">

              <DataField>Season3End</DataField>

              <rd:TypeName>System.DateTime</rd:TypeName>

            </Field>

            <Field Name="INVOICE_DATE">

              <DataField>INVOICE_DATE</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PRODUCT_CODE">

              <DataField>PRODUCT_CODE</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PART_ID">

              <DataField>PART_ID</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PRODUCT_DESCRIPTION">

              <DataField>PRODUCT_DESCRIPTION</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="PART_DESCRIPTION">

              <DataField>PART_DESCRIPTION</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_ID">

              <DataField>CUSTOMER_ID</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_NAME">

              <DataField>CUSTOMER_NAME</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_CITY">

              <DataField>CUSTOMER_CITY</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="CUSTOMER_STATE">

              <DataField>CUSTOMER_STATE</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="SALESREP_ID">

              <DataField>SALESREP_ID</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="SALESREP_NAME">

              <DataField>SALESREP_NAME</DataField>

              <rd:TypeName>System.String</rd:TypeName>

            </Field>

            <Field Name="INVOICE_QTY_S1">

              <DataField>INVOICE_QTY_S1</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_QTY_S2">

              <DataField>INVOICE_QTY_S2</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_QTY_S3">

              <DataField>INVOICE_QTY_S3</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_AMT_S1">

              <DataField>INVOICE_AMT_S1</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_AMT_S2">

              <DataField>INVOICE_AMT_S2</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

            <Field Name="INVOICE_AMT_S3">

              <DataField>INVOICE_AMT_S3</DataField>

              <rd:TypeName>System.Decimal</rd:TypeName>

            </Field>

          </Fields>

        </DataSet>

      </DataSets>

      <ReportParameters>

        <ReportParameter Name="Season1Start">

          <DataType>DateTime</DataType>

          <DefaultValue>

            <Values>

              <Value>8/1/2016 12:00:00 AM</Value>

            </Values>

          </DefaultValue>

          <Prompt>Season1Start</Prompt>

        </ReportParameter>

        <ReportParameter Name="Season1End">

          <DataType>DateTime</DataType>

          <DefaultValue>

            <Values>

              <Value>8/31/2016 12:00:00 AM</Value>

            </Values>

          </DefaultValue>

          <Prompt>Season1End</Prompt>

        </ReportParameter>

        <ReportParameter Name="CUSTOMER_LIKE">

          <DataType>String</DataType>

          <DefaultValue>

            <Values>

              <Value>412618</Value>

            </Values>

          </DefaultValue>

          <Prompt>CUSTOMER LIKE</Prompt>

        </ReportParameter>

        <ReportParameter Name="SALESREP_IDS">

          <DataType>String</DataType>

          <DefaultValue>

            <Values>

              <Value>NA2</Value>

            </Values>

          </DefaultValue>

          <Prompt>SALESREP IDS</Prompt>

        </ReportParameter>

        <ReportParameter Name="TotalSalesRange1">

          <DataType>Integer</DataType>

          <DefaultValue>

            <Values>

              <Value>250</Value>

            </Values>

          </DefaultValue>

          <Prompt>Enter Total Sales beginning range:</Prompt>

        </ReportParameter>

        <ReportParameter Name="TotalSalesRange2">

          <DataType>Integer</DataType>

          <DefaultValue>

            <Values>

              <Value>999999999</Value>

            </Values>

          </DefaultValue>

          <Prompt>Enter Total Sales ending range:</Prompt>

        </ReportParameter>

        <ReportParameter Name="P1P2_VarianceRange1">

          <DataType>Float</DataType>

          <DefaultValue>

            <Values>

              <Value>-0.1</Value>

            </Values>

          </DefaultValue>

          <Prompt>Enter P1P2 Variance beginning range:</Prompt>

        </ReportParameter>

        <ReportParameter Name="P1P2_VarianceRange2">

          <DataType>Float</DataType>

          <DefaultValue>

            <Values>

              <Value>0.1</Value>

            </Values>

          </DefaultValue>

          <Prompt>Enter P1P2 Variance ending range:</Prompt>

        </ReportParameter>

      </ReportParameters>

      <rd:ReportUnitType>Inch</rd:ReportUnitType>

      <rd:ReportID>455b4f59-ee82-40da-9f79-0a403eb4aa46</rd:ReportID>

    </Report>


    Darlene Gerber Product Data Specialist Buyers Products Company

    • Moved by Weiwei Cai Wednesday, September 21, 2016 6:47 AM not VS issue
    Tuesday, September 20, 2016 1:55 PM

Answers

  • I have moved this to the other forum.

    Darlene Gerber Product Data Specialist Buyers Products Company

    • Marked as answer by DarleneGerber Wednesday, September 21, 2016 12:10 PM
    Wednesday, September 21, 2016 12:10 PM

All replies

  • Hi DarleneGerber,

    This forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Since your problem more related to Report Service Control, I help you move this thread to Report Control forum to get a better help. Thanks for your understanding.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, September 21, 2016 6:46 AM
  • I have moved this to the other forum.

    Darlene Gerber Product Data Specialist Buyers Products Company

    • Marked as answer by DarleneGerber Wednesday, September 21, 2016 12:10 PM
    Wednesday, September 21, 2016 12:10 PM