expression invalid swtich case

  • I am getting error when i see the report preview as

    The defenition of the report is invalid

    The value expression for the text box'Text Box1' has a nested aggregate that specifies a dataset scope.Inner aggregates cannot specify a dataset scope.

    My Expression is

    = "Record contains "

    + Switch(

    Sum(Fields!FQ.Value, "ds") <> 0 and Sum(Sum(Fields!QC.Value, "ds") + Sum(Fields!QA.Value, "ds") )<> 0 , "Fit and Auto",

    Sum(Fields!FQ.Value, "ds") <> 0 and Sum(Sum(Fields!QC.Value, "ds") + Sum(Fields!QA.Value, "ds") )= 0 , "Fit",

    Sum(Fields!FQ.Value, "ds") = 0 and Sum(Sum(Fields!QC.Value, "ds") + Sum(Fields!QA.Value, "ds") ) <> 0 , "Auto"

    )

  • the SUM(SUM( doesn't look right to me; i think you just wnat to add the two together:

    does this minor change work?

    = "Record contains "

    + Switch(

    Sum(Fields!FQ.Value, "ds") <> 0 and (Sum(Fields!QC.Value, "ds") + Sum(Fields!QA.Value, "ds") ) <> 0 , "Fit and Auto",

    Sum(Fields!FQ.Value, "ds") <> 0 and (Sum(Fields!QC.Value, "ds") + Sum(Fields!QA.Value, "ds") ) = 0 , "Fit",

    Sum(Fields!FQ.Value, "ds") = 0 and (Sum(Fields!QC.Value, "ds") + Sum(Fields!QA.Value, "ds") ) <> 0 , "Auto"

    )

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Ok Fine. Thanks its working

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply