Example: Create a Report Design with Resource-Based Translation
This example illustrates how to create a report design that uses resource files to
translate label text based on the user's location.
A colleague asks you to create a report design for a high-level summary of the current
employment situation at Global Modern Services, using resource files to enable
translation. You need to create a custom report in Workday to select the relevant
data. The design uses a single data set. The default locale language for the report
is English. The target language is German.
- Sign in to your Workday GMS tenant.
- Access theCreate Custom Reporttask. Configure these values:OptionValueReport NamePositions VacantReport TypeAdvancedData SourceCompaniesEnable As Web ServiceSelect this check box.
- On theColumnstab, configure these values:Business ObjectFieldColumn Heading OverrideColumn Heading Override XML AliasCompanyNameNameNameCompanyPosition Count - Total including Subordinate OrganizationsPositions - TotalPositions_-_TotalCompanyPositions Filled - CountPositions - FilledPositions_-_FilledCompanyPosition Count - FillablePositions - VacantPositions_-_VacantCompanyAverage AgeAverage Employee AgeAverage_Age
- Open Report Designer in Workday Studio.
- Create a report project namedPositions Vacant. In that project, create a report file namedPositions Vacant.rptdesign.
- Create a Workday data source and download some sample data:
- Create a newWorkday Report Data SourcenamedPositions Vacant Data.
- Download the report description for thePositions Vacantcustom report from Workday.
- Download sample report data from Workday and name the filePositions Vacant Sample.xml.
- Create the data set relating to the primary business object, Company:OptionValueData Source SelectionPositions Vacant DataData Set TypeWorkday Primary Report Data SetData Set NamePositionsReport Designer displays XML schema element values and names for the columns that you added as rows to your custom report for the Worker business object in Workday.
- Create a table using thePositionsdata set:
- Drag thePositionsdata set to theLayouttab of the main window.
- Select all available binding columns.
- Delete the footer row.
- On theGeneraltab of the table'sProperty Editorview, enterPositionsin theNamefield.
- Create a translation resource file for the default locale language and associate it with the report design file:
- Select . Expand theGeneralnode and selectUntitled Text File.
- Add keys to the text file. Use the formatKey=Value, whereKeyis the name you supply for the resource key andValueis the appropriate text in English. Give each key its own line in the text file:KeyValueNameNameTotalPositions - TotalFilledPositions - FilledVacantPositions - VacantAgeAverage Age
- Save the text file in thePositions Vacantproject folder with the filenametranslations.properties.
- On theResourcestab of the report design file'sProperty Editorview, add thetranslations.propertiesproperties file.
- Create a translation resource file for the target language:
- Select . Expand theGeneralnode and selectUntitled Text File.
- Add keys to the text file. Use the formatKey=Value, whereKeyis the name you supply for the resource key andValueis the appropriate text in German. Give each key its own line in the text file:KeyValueNameName der FirmaTotalPositionen - TotalFilledPositionen - GefülltVacantPositions - FreiAgeDurchschnittsalter
- Save the text file in thePositions Vacantproject folder with the filenametranslations_de_DE.properties.
- Associate column headings with resource file key pairs:
- Select theNamecolumn heading.
- On theLocalizationtab of itsProperty Editorview, clickBrowse.
- Select theNamekey pair.
- Repeat substeps a through c for each column heading.
- Delete the date expression from the footer in theMaster Pageview.
- Preview the translation in Report Designer.
- Save your design and preview it as normal by selecting . The table's header row displays in English.
- Change Report Designer's locale by selecting and then selectingGerman (Germany)from theChoose your localedrop-down list.
- Preview the design again. The table's header row displays in German.
Deploy your design to Workday for use as business form layout.