Enabling Time Zone for Operational Reports¶
For Generated RDFs¶
- For RDFs that are generated through the model & not modified yet, enable the Time Zone functionality by adding the "
TimeZoneMode
" code generation property and setting its value to"server"
or"site"
in the report model file.
report GeneralLedgerRow;
component GENLED;
logicalunit GeneralLedgerRowRep;
codegenproperties {
SchemaSourceName "GeneralLedgerRowRep";
GenerateRdf "yes";
TimeZoneMode "server";
}
For Modified RDFs¶
-
For RDFs that are generated through the model & modified, enable Time Zone functionality by adding '
SERVER
' as the last parameter in the 'Report_SYS.Define_Report_
' call in the report RDF file.Report_SYS.Define_Report_('&REP1VIEW', '&MODULE', '&LU', 'General Ledger Report', '&REP1TAB', '&PKG..&REP1METHOD', 0, NULL, NULL, NULL, 'PLSQL1.2', 'TRUE', 'Financials', 'General Ledger', 'SERVER');
-
Inside the report method, locate the ‘Xml_Record_Writer_SYS.Create_Report_Header’ call, ensuring the report result key is passed as the last parameter.
Xml_Record_Writer_SYS.Create_Report_Header(xml_, '&VIEW', package_name_, result_key_);
Handling reports with a customized order report page¶
There are certain customized Order Report dialogs within certain product areas. Here is a short guide to handle those.
-
Add a time zone group box (TimeZonesGroup) to the Assistant page with a drop-down control for the end-user to select a time zone value:
``` group TimeZonesGroup for ReportVirtual { label = "Time Zone"; visible = [TimeZoneMode = "SERVER"]; @DynamicComponentDependency APPSRV lov TimeZoneRef with ReferenceIsoTimeZoneSelector { size = Medium; search = TimeZoneCode, Description; } }` ```
-
Define the attributes used in the ReportVirtual record inside the projection file:
```sql virtual ReportVirtual { attribute TimeZone Text { fetch = "TIME_ZONE"; label = "Time Zone"; maxlength = 200; required = [false]; editable = [true]; } @DynamicComponentDependency APPSRV reference TimeZoneRef(TimeZone) to IsoTimeZone(TimeZoneCode) { label = "Time Zone"; } attribute TimeZoneEnabled Text { fetch = "Report_Definition_Api.Get_Time_Zone_Mode('GENERAL_LEDGER_ROW_REP')"; } } ```
-
When the print operation executes, the time zone value needs to be added to the report attribute string before calling the Report_Format_API.Create_New_Report method in the reporting framework.
```sql FUNCTION Print_Genled_Report___ ( key_ IN Report_Virtual_Key ) RETURN NUMBER IS result_key_ NUMBER; rec_ Report_Virtual_Rec; oldrec_ Report_Virtual_Rec; report_attr_ VARCHAR2(32000) := NULL; parameter_attr_ VARCHAR2(32000) := NULL; distribution_list_ VARCHAR2(2000) := Fnd_Session_API.Get_Fnd_User; report_id_ VARCHAR2(100) := 'GENERAL_LEDGER_ROW_REP'; BEGIN rec_ := Get_Record___ (key_); Client_SYS.Clear_Attr(report_attr_); Client_SYS.Add_To_Attr('REPORT_ID', report_id_, report_attr_); Client_SYS.Add_To_Attr('TIME_ZONE', rec_.time_zone, report_attr_); Add_To_Parameter_Attr___(rec_, parameter_attr_); -- Validation of the report parameters are handled in the report package method. result_key_ := Report_Format_API.Create_New_Report(report_attr_, parameter_attr_, distribution_list_); oldrec_ := rec_; rec_.result_key := result_key_; CRUD_Update___(oldrec_, rec_); RETURN result_key_; END Print_Genled_Report___;` ```
Adding Time Zone information to the Layout¶
Put the translated time zone display text attribute as a label and the processing attribute as a value under the processing information section on the first page.
- In the RDF file, the attribute data types are set using column comments in the report view. If the view comments' data type is "DATE," it won't be used for time zone operations. However, if the column types are DATE/DATETIME or DATE/TIME, they will affect the time zone functionality.
- If a report does not contain any such columns (Date/DateTime or Date/Time), then, there will be no effect of timezones on those reports.
- If a report's data is ordered through a background process without displaying the order report assistant, then the working time zone will be used as the selected time zone for the report.
Note: The Model, newly generated schema, report layout & the modified RDF(if any with Time Zone information) should be checked into the source repository to get the Time Zone changes into your report successfully.