I have one page using a Query Data Source and a Basic Uni View to display a formatted list of locations. This list is grouped by country. To facilitate this I used a query to pass a ShowCountry [Int] value into the transformation so the country only displays when it is the first location for that country. This works great.
I have another page, which is the detail for the location that lists the media contacts for that location based on associative region and business unit data. The query is almost identical and the transformation looks like this:
<%if (Convert.ToInt32(Eval("ShowBusiness")) == 1) { %>
<tr>
<th><h3><%# Eval("BusinessUnitName") %></h3></th>
<td>
<%# Eval("FirstName") %> <%# Eval("LastName") %><br />
<%# Eval("Company") %><br />
<%# Eval("Phone") %><br />
<%# Eval("Email") %><br />
<%# Eval("Address") %><br />
<%# Eval("City") %>, <%# Eval("PostalCode") %><br />
<%# Eval("Country") %>
</td>
</tr>
<%} %>
<%else { %>
<tr>
<th> </th>
<td>
<%# Eval("FirstName") %> <%# Eval("LastName") %><br />
<%# Eval("Company") %><br />
<%# Eval("Phone") %><br />
<%# Eval("Email") %><br />
<%# Eval("Address") %><br />
<%# Eval("City") %>, <%# Eval("PostalCode") %><br />
<%# Eval("Country") %>
</td>
</tr>
<%} %>
Now, I can just put the ShowBusiness variable on the page and it is correct(first element is 1 all the rest are 0).
The problem is that when it is 1, even though the record is showing on page, the if statement is not evaluating. Is there a syntax difference between a uni view and a repeater when it comes to transformations? My uni view uses a head/foot transformation due to the display requirements. But for this page, that was not necessary so I just went with a single transformation, using content before/after to create the container. Everything displays correctly but my conditional criteria is not being met when it is a 1 for some reason.
Any thoughts?