Pregunta

I have a ReportViewer with LocalReport in an Asp.Net webform that currently has four placeholders, each containing a different field.

What I am looking to do is to change the placeholders from this:

[Name]
[Address1]
[Address2]
[CityStateZip]

To a more conditional display such as:

[Name]
[Address1]
if(Address2 != null)[Address2] else [CityStateZip]
if(Address2 != null)[CityStateZip] else ""

Is there a way I can do this in the rdlc?

¿Fue útil?

Solución

yes, you can do this with iif in RDLC expression. try this

=IIf(IsNothing(Fields!Address2.Value), Fields!Address2.Value, Fields!CityStateZip.Value)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top