I have a page where the user can select a number of reports at the top of the page and select the appropriate variables to go with it. It uses an update panel for a clean call back and everything is dumped into a repeater control. Every report returns the exact same fields. Everything worked great until.....
The user has decided that one report needs 4 new fields. Only that report will have these fields. I have set a boolean value on the .VB file that is set to true when that report is run and false when any other report is run. I use this to add the column headers as needed to the header template. The problem is in the ItemTemplate where now we have some fields that don't match up. I have tried:
<% If MyBool = True Then %>
Special Report Code
<% Else %>
Original Report Code
<% End If %>
I can see in debug that the book is set correctly but it still tries to render the "Special Report Code" anyway. I was pretty sure that this type of IF no longer worked and it appears to be the case. I have done some tricky formatting stuff with this report where I use this:
That works like a charm but can't be used here because the columns aren't always there.