IIF Statement Error

  • Hi All,

    I was wondering where I'm going wrong with the following query please. I'm trying to create a Report which has two different criteria (which will switch between the two reports), for example; I have 2 Datasets which use one stored procedure with two Parameters @id, @option (which is used to select which criteria the user wants to use). Depending on which option the user selects, I need to do a IF Statement so populates the Dataset.Column, which is chosen. I'm using the following script but I keep getting an error, I would be very grateful if anyone could let me know where I'm going wrong please?

    =IIF(Parameters!Option.Value= 1, First(Fields!Name.Value, "DataSet1"),First(Fields!Name.Value,"DataSet2")

    Thank you!

  • Hi

    Missing a bracket at the end of the expression

    =IIF(Parameters!Option.Value= 1, First(Fields!Name.Value, "DataSet1"),First(Fields!Name.Value,"DataSet2"))

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • Thank you!

  • Welcome 🙂

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

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

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