setLocaleDateOptions

setLocaleDateOptions(dateOrder:        Integer;
                     dayDateSeparator: String;
                     dateSeparator:    String): Boolean;

The setLocaleDateOptions method of the JadeReportWriterReport class sets the format for Date fields to be used when running the report. The method overrides default date settings specified on the System Formats dialog, the Report Formats dialog, and the Field Properties dialog for date fields.

The parameters for the setLocaleDateOptions method are listed in the following table.

Parameter Description
dateOrder

An integer specifying the order in which the day, month, and year are displayed. The following constants of the DateFormat class can be used.

  • DayMonthYear (1)

  • MonthDayYear (0)

  • YearMonthDay (2)

dayDateSeparator

A string with a maximum of three characters that is displayed between the day name and the date.

dateSeparator

A string with a maximum of three characters that is displayed between the day, the month, and the year.

If a parameter has an invalid value (for example, a string has too many characters), the method returns false and default formats are used.

Overriding does not take place for fields where the report or field format value is null. For example, if the date separator for a field is set to null (to concatenate the day, month, and year values) calling the setLocaleDateOptions method with a value of "-" for the dateSeparator parameter would not insert the separator characters.

If you do not want to override a format setting, set the value of the corresponding parameter to null. In the following code fragment, the setLocaleDateOptions method is used to override the date order only.

report.setLocaleDateOptions(DateFormat.DayMonthYear, null, null);