Format Date in a Report for RTC...

Hello Experts,

I am implementing report for RTC so using Visual Studio. Now i have to display report date like “9 July,2010” this way. Can somebody tell me how can i achieve this? I tried using this FORMAT(“Posting Date”,0,’ <Month Text,3> ') … but its giving error in Visual Studio like No of arguments should be 2.

P.S. : I have done with it in Classic Client.

Date fields can be formatted a number of different ways. Following are some methods you may wish to consider.

  • One method is to build a call to the FORMAT function into the source expression of the text box in the NAV section designer. This will format the date properly for classic reports as well as sending a properly formatted date through to the RTC report. The problem with this is that the dataset for the RTC report will have this field as text data instead of a date. This makes it difficult to take advantage of some of the new features of RTC reports such as interactive sorting.
  • Another method is to learn to use the Format property of textboxes in RDLC. If there is no format property specified then the date will format as a date and time (the field is, after all, really date/time data type). If the format property has a value of “d” then the field will be formatted with just the date portion of the field and I believe it will take advantage of the regional settings on the user’s computer. Other format values (such as “MM/dd/yy”) will cause the field to be formatted as indicated. The problem with this last example is that it is not particularly usable in a global environment where different arrangements of month, day, and year need to be supported.
  • Another possibly is to pass two fields through to the RTC dataset: one with the date as a date/time data type and the other with the date already formatted as a text string (as in my first method). This requires adding a invisible text box to the NAV section design to provide for the second field. The formatted field can be used for display in the RTC report and the date/time field can be used for things like interactive sorting.
  • A final method is to include an additional field in the RTC dataset that includes a value to be used as the Format property of the RDLC text box. This is similar to what is being done automatically for decimal fields (and, in my opinion should be done automatically for date fields as well). This also requires an additional, invisible, text box to be added to the NAV section design to supply the format string. A text constant should be used as the source expression for this text box so that it can have different values based upon the user’s selection of language. A label control could be used instead of a text box since the multi-language captions available with a label also provide for different values based upon language.

Hi Jack…

Thanks for ur reply.

I have solved my problem using 1st method…