Example: Create a Report Design with Multiple Data Sets
This example illustrates how to create a report design based on a custom report that
includes primary and secondary business objects, as well as multi-instance fields.
Your HR department asks you to create a report design for a letter outlining employee benefit
enrollments. You need to create a Workday custom report that includes a secondary
business object and a multi-instance field. This means that you need to create a
data set for the primary business object, another for the secondary business object,
and a third for the multi-instance field.
- Sign in to your Workday GMS tenant.
- Access theCreate Custom Reporttask. Configure these values:OptionValueReport NameEmployee Benefit EnrollmentsReport TypeAdvancedData SourceAll Active and Terminated WorkersEnable As Web ServiceSelect this check box.
- On theColumnstab, enter these values:Business ObjectFieldColumn Heading OverrideColumn Heading Override XML AliasWorkerLegal Name - Last NameLast NameLast_NameWorkerLegal Name - First NameFirst NameFirst_NameWorkerEmployee IDEmployee IDEmployee_IDWorkerSupervisory OrganizationOrganizationSupervisory_OrganizationWorkerFirst Day of This Calendar YearBenefit Enrollment DateBenefit_Enrollment_DateWorkerCurrent WorkerSignatorySignatoryWorkerWork Address - FullWork AddressWork_AddressBenefit ElectionsBenefit TypeBenefit TypeBenefit_TypeBenefit ElectionsBenefit ProviderBenefit ProviderBenefit_ProviderBenefit ElectionsCoverageCoverageCoverageBenefit ElectionsDependentsDependentsDependentsBenefit ElectionsCurrent Election Coverage Begin DateCurrent Election Coverage Begin DateEffective_DateBenefit ElectionsGroup NumberGroup NumberGroup_Number
- Add aGroup Column Headingfor the secondary business object. EnterBenefit Electionsin both theBusiness ObjectandGroup Column Headingfields.
- Open Report Designer in Workday Studio.
- Create a report project namedEmployee Benefit Enrollment Letter. In that project, create a report file namedEmployee Benefit.rptdesign.
- Create a Workday data source and download some sample data:
- Create a newWorkday Report Data SourcenamedEmployee Benefit Enrollments Data.
- Download the report description for theEmployee Benefit Enrollmentscustom report from Workday.
- Download sample report data from Workday and name the fileEmployee Benefit Enrollments Sample.xml.
- Create the data set relating to the primary business object, Worker, with these values:OptionValueData Source SelectionEmployee Benefit Enrollments DataData Set TypeWorkday Primary Report Data SetData Set NameWorkerReport 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. Note that Report Designer adds aRow_Numbercolumn automatically to support grouping.
- Create the data set relating to the secondary business object, Benefit Elections, with these values:OptionValueData Source SelectionEmployee Benefit Enrollments DataData Set TypeWorkday Secondary Report Data SetData Set NameBenefit ElectionsBusiness ObjectBenefit ElectionsReport Designer displays the XML schema element values for each of the columns that you added as rows to your custom report for the Benefit Elections business object in Workday, and their display names. It also displays a warning message about an emptyPrimaryRowNumberinput parameter value. You'll configure this later, so dismiss the message.
- Review the fields in your custom report in Workday. You will find thatDependentsis a multi-instance field, as indicated by the multi-instance icon.
- Create another secondary data set relating to theDependentsmulti-instance field in your custom report:OptionValueData Source SelectionEmployee Benefit Enrollments DataData Set TypeWorkday Secondary Report Data SetData Set NameDependentsBusiness ObjectBenefit Elections/DependentsReport Designer displays the XML schema element value for theDependentsmulti-instance field, and its display name. Again, it also displays a warning message about an emptyPrimaryRowNumberinput parameter value. As before, dismiss the message.
- Add a table to the layout:
- Drag aTablereport item to theLayouttab of the main window.
- Configure 1 column and 1 details row.
- SelectWorkerfrom theData Setdrop-down list.
- Select all available binding columns.
- Delete the header and footer rows.
- Drag the detail row border to increase its size. Doing so makes its rows a fixed size, which could result in truncated data. To ensure that the table can grow to accommodate the data displayed within it, select the guide cell for the table's only row. On theGeneraltab of the row'sProperty Editorview, delete the value from theHeightfield.
- On theGeneraltab of the table'sProperty Editorview, addWorkerin theNamefield.
- Add a local image file of your company logo to the layout:
- Drag anImagereport item to theWorkertable.
- Select theEmbedded imagecheck box, then clickAdd Image...to browse to an appropriate image file.
- Add theWork Addressfield to the layout:
- Drag theWork Addressfield from theWorkerdata set to theWorkertable in theLayoutview.
- On thePaddingtab of theWork Addressitem'sProperty Editorview, configure theTopandBottomvalues to12points.
- Add the current date to the layout:
- Drag aDataitem to theWorkertable, and position it below the previous item.
- EnterPreparation Dateas theDisplay Nameand selectDatefrom theData Typedrop-down list.
- ClickJavaScript Syntax. Select , then double-clickDate()to enter thenew Date()expression.
- Add a salutation to the layout:
- Drag aDynamic Textitem to theWorkertable, and position it below the previous item.
- Configure this expression in theExpression Builder:"Dear " + row["First_Name"] + " " + row["Last_Name"] + ",". You can enter the row parts of the expression by selecting , then double-clickingFirst_NameorLast_Name.
- Configure the salutation item top and bottom padding to6points.
- Add introductory text to the layout:
- Drag anotherDynamic Textreport item to theWorkertable, and position it below the previous item.
- Configure this expression in theExpression Builder:"Thank you for completing the Benefit Enrollment process. We are very pleased to present your Benefits Statement. You are enrolled in the following plans as of " + row["Benefit_Enrollment_Date"] + "."Expression BuilderYou can enter the row part of the expression by selecting , then double-clickingBenefit_Enrollment_Date.
- Configure the introductory text item top and bottom padding to6points.
- Add theBenefit Electionsdata set to the layout as an embedded table and configure thePrimaryRowNumberinput parameter value:
- Drag theBenefit Electionsdata set to theWorkertable, and position it below the previous item. Select all available binding columns.
- Name the new tableBenefits.
- On theBindingtab of theBenefitstable'sProperty Editorview, clickData Set Parameter Binding.
- Select thePrimaryRowNumberparameter, then clickEdit.
- ClickJavaScript Syntax. Select , then double-clickRowNumto enter therow.__rownumexpression. This expression returns the current row number, so that the corresponding benefit election details are returned for each worker.
- Delete the footer row in theBenefitstable.
- Add theDependentsdata set to the layout as an embedded table and configure both thePrimaryRowNumberandSecondaryRowNumberinput parameter values:
- Add a new column to the right of theCoveragecolumn.
- Drag theDependentsdata set from theData Explorerview, and position it within the detail row of the column you just created. The data set has just one available binding column. Select it.
- Drag theDependentscolumn heading into the heading row betweenCoverageandEffective Date.
- Delete the header and footer rows in the embeddedDependentstable.
- Name the new embedded tableDependents.
- On theBindingtab of theDependentstable'sProperty Editorview, clickData Set Parameter Binding.
- Select thePrimaryRowNumberparameter, then clickEdit.
- ClickJavaScript Syntax. Select , then double-clickRowNumto enter therow._outer.__rownumexpression. Note that the expression is formed this way because theDependentstable is nested within theWorkertable.
- Select theSecondaryRowNumberparameter, then clickEdit.
- ClickJavaScript Syntax. Select , then double-clickRowNumto enter therow.__rownumexpression.
- Add a closing paragraph to the layout:
- Drag aLabelitem to theWorkertable, and position it below the previous item.
- Add this text to the label:If you have any questions or find your enrollment in error, please contact the Benefits Department.
- Configure the closing paragraph item top and bottom padding to6points.
- Add a sign-off to the layout:
- Drag anotherLabelitem to theWorkertable, and position it below the previous item.
- Add this text to the label:Sincerely,
- Configure the sign-off item top and bottom padding to6points.
- Add a signatory to the layout:
- Drag theSignatoryfield from theWorkerdata set to theWorkertable in theLayoutview, and position it below the previous item.
- To make room for a signature, configure the signatory item top padding to40points.
- Include a page break after each letter:
- In theWorkertable'sProperty Editorview, select thePage Breaktab.
- From theAfterdrop-down list, selectAlways.
- Change the background color of theBenefitstable. Make the text in its header row bold and left-justified:
- On theGeneraltab of the table'sProperty Editorview, clickBackground color, and select a suitable color.
- Select the guide cell for the table's header row. On theGeneraltab of the row'sProperty Editorview, clickBand clickLeft.
- Delete the date expression from the footer in theMaster Pageview.
- Save and preview your design.
Deploy your design to Workday for use as a business form layout.