Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Expression as Format value

$
0
0

Hi,  Using a textbox in the report to display a date, we can use {0:d} to get a short date, e.g. 01/02/2015, but in our app we allow the user to specify their own format string on a per user basis, so we pass that in as a parameter (typically to get an even shorter format, e.g. 01/02/15).  In the Format field for a TextBox is it possible to use an expression, e.g. =Parameters.dateFormat.Value ? 

 As background we are evaluating converting from SSRS to Telerik reporting, and in SSRS this is possible by just using Parameters.dateFormat.Value in the Format field, but in Telerik this does not seem to work.  I can see that this is possible to do in the Value field using an expression on the lines

 =sFields.startEventDtm.ToString(Parameters.dateFormat.Value)

 But this will fail with a null reference exception of startEventDtm is null, whereas using  a format string will handle the null neatly.


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>