build error: report item expressions can only refer to fields within the current data set scope

  • Hi all,

    Help!!

    I have no idea what does it mean.  I assumed it's in the layout.  I have modified the stored procedure but nothing changed in the layout - not that I remembered .

    The error message came when I preview and rebuild.  The whole message is " The group expression for the grouping'matrix1_field_value' refers to the field 'Field_value'.  Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.  I got maybe 10 of them.  each from different field.

    What I changed in the store procedure is adding a case when in the select statement as " CASE

      WHEN description is null THEN #temp1.t_name

      ELSE #temp2.description

      END

    AS description " from just select the description.

    Where should I look into?

  • Try Modifying your stored procedure to include a alias name for the field that is fetched using CASE

     " CASE

      WHEN description is null THEN #temp1.t_name

      ELSE #temp2.description

      END AS description

    AS description " from just select the description.

    This may help, once you compile your stored procedure just click on refresh button adjacent to the dataset dropdown and check if the fields are updated on database fields window just to double check.

     

    Prasad Bhogadi
    www.inforaise.com

  • Thank you for the reply.  But I don't quite understand.  Could you please explain it more?  I was adding 'AS description' at the end of the case when, but got an error incorrect syntax near keyword AS.

    Regards,

     

  • Sorry about the misleading, my old stored procedure doesn't work either now.  I must have ? changed the layout of the report just by clicking around.  But does anyone know what this error message mean?

    Thank you for your help in advanced,

     

  • solved, - for this error message.

    What I did is changed the dataset's stored procedure name since I got a new stored procedure.  However, the layout matrix was bound to the old stored procedure.  Once I changed the dataset1's query string to new stored procedure name, I should have deleted the layout's matrix and create a new matrix.

    Cheers, for now

Viewing 5 posts - 1 through 4 (of 4 total)

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