I'm trying to select data from other datasets to include in my table. This is the expression I have so far:
=iif(ReportItems!ID.Value=1
, (First(Fields!NumbBreaker.Value, "sp_Permit11"))
,iif(ReportItems!ID.Value=3
, (First(Fields!MoldProd.Value, "sp_PermitASMoldProd"))
,iif(ReportItems!ID.Value =4
, (First(Fields!MoldProd.Value, "sp_PermitASMoldProd"))
,iif(ReportItems!ID.Value =5
, (First(Fields!Thermal.Value, "sp_PermitThermalSand"))
,iif(ReportItems!ID.Value=6
, ((First(Fields!Steel20T.Value, "sp_Permit11")) + (First(Fields!Steel9T.Value, "sp_Permit11")) + (First(Fields!Ductile.Value, "sp_Permit11")))
,iif(ReportItems!ID.Value=7
, ((First(Fields!Steel20T.Value, "sp_Permit11")) + (First(Fields!Steel9T.Value, "sp_Permit11")))
,iif(ReportItems!ID.Value=8
, (First(Fields!IMF.Value, "sp_Permit11"))
,iif(ReportItems!ID.Value=9
, (First(Fields!Ductile.Value, "sp_Permit11"))
,iif(ReportItems!ID.Value = 10
, (First(Fields!DM1.Value, "sp_PermitDM1"))
,iif(ReportItems!ID.Value = 12
, (First(Fields!Zircon.Value, "sp_PermitZircon"))
,iif(ReportItems!ID.Value = 14
, (First(Fields!CMN.Value, "sp_PermitCMN"))
,iif(ReportItems!ID.Value = 15
, (First(Fields!A270.Value, "sp_Permit270"))
,iif(ReportItems!ID.Value= 16
, (First(Fields!A290.Value, "sp_Permit290"))
,iif(ReportItems!ID.Value = 17
, (First(Fields!CM8.Value, "sp_PermitCM8"))
,iif(ReportItems!ID.Value = 20
, (First(Fields!NT.Value, "sp_PermitNT")),"")))))))))))))))
How can I do this without using the First
? The first is only bringing in the first value but without it I get:
Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope
ReportItems!ID.Value
you want the table to show the 3 rows from one of the various datasets? – Chris Latta