Data formatting

Top  Previous  Next

To print a textual data in a report, the "Text" object is used. It applies the default formatting to all data that comes from data source. For example, the data source columns of type "DateTime" will be printed in the following way (it depends on your system's regional settings):

 

11.10.2008 18:04:52

 

If you need to print the date part only, you have to set up the data formatting. To do this, right-click the "Text" object to show its context menu. In the menu, choose the "Format..." item. You will see the format editor window:

 

textFormat

 

You may choose one of the available formatting types or set up own formatting string. To do this, select the "Custom" formatting. If the "Text" object contains several data columns or expressions, you may choose appropriate format for each of them. To do this, select the expression in the top of the window, then choose the format:

 

textFormat1

 

You may also format the data using the String.Format method. Get the help on this method in the MSDN.

 

Today is [String.Format("{0:d}", [Date])]