Hi there
I have a datasource containing a DateTime? field. I added the datasource to the report. Up to this point, everything is perfect. Now, I want to display the field in a TextBox on the report. Actually, it allowed me to set the TextBox to =Fields.Value once. But now, it displays a validation error.
In addition, it doesn't seem possible to set the TextBox to =Field.Value.ToShortDateString() or something similar.
Is there a possibility to use DateTime? and let it format in the TextBox as "dd.MM.yyyy" resp. ToShortDateString() instead of doing that already in the datasource item where I could set the value to string?
Thanks
Hi,
I think is what you want to use. Click on the Expression Assistant icon on the right side of the field in your report and you can add something like the following expression to format your date.
=Format("{0:dd/MM/yyy}", Fields.HireDate)
You might want to take a look at the following documentation concerning using expressions in Reports.
http://help.infragistics.com/NetAdvantage/reporting/2013.1/CLR4.0?page=How_to_Use_Expressions.html
Please let me know if this helps or if you have any further questions.