At this time the act! OLE DB reader does not support immediate IIFs or case statements in the SQL select statement. A work around is to do the calculation post select. This can be done by manipulating and changing the values of the data set rows before the report is printed but after the select runs. To run custom scripting which allows you to adjust the returned values follow the steps below.
Open the desired report in the Impact Report Designer
Click o the TopMarginBand
Expand the SCRIPTS property then click on (New)
The Scripting Editor will open and you need to paste the code below.
Private Sub TopMarginBand_BeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) For Each row As System.Data.DataRow In Sender.Report.DataSource.Tables(0).Rows If NOT (row.Item("State") is DBNULL.Value) Select Case row.Item("State") Case "NY" ' Calculate . adjust values here row.Item("State") = "New York" End Select End If Next row
End Sub
You will need to change "State" with one of your fields names in your select statement.