Example: Print a Custom Report in a Workday Studio Integration
This example illustrates how to extract the custom report data from Workday and generate a PDF file using Workday Studio.
Your HR department asks you to generate a new hire letter in PDF format. You'll use a custom report definition and Workday assembly project in Workday Studio to generate the PDF.
- Create a report design for a new hire letter with the dynamic translation based on locale. See Example: Create a Report Design With Dynamic Translation Based on Preferred Locale.
- Create a letter outlining employee benefit enrollments. See Example: Create a Report Design with Multiple Data Sets.
- Sign in to your Workday GMS tenant.
- Access theCreate Custom Reporttask.
- Configure these values:OptionValueReport NameEmployee Benefit EnrollmentsReport TypeAdvancedEnable As Web ServiceSelect this check box.Optimized for PerformanceClear this check box.Data SourceAll Active and Terminated Workers
- On theColumnstab on theEdit Custom Reportpage, configure these values:Business ObjectFieldColumn Heading OverrideColumn Heading Override XML AliasWorkerLegal Name - Last NameLast NameLast_NameWorkerLegal Name - First NameFirst NameFirst_NameWorkerEmployee IDEmployee IDEmployee_IDWorkerSupervisory OrganizationOrganizationOrganizationWorkerFirst Day of This Calendar YearBenefit Enrollment DateBenefit_Enrollment_DateWorkerCurrent WorkerSignatorySignatoryWorkerBusiness TitleSignatory Business TitleSignatory_Business_TitleWorkerWork Address - FullWork AddressWork_AddressBenefit ElectionsBenefit TypeBenefit TypeBenefit_TypeBenefit ElectionsBenefit ProviderBenefit ProviderBenefit_ProviderBenefit ElectionsCoverageCoverageCoverageBenefit ElectionsDependentsDependentsDependentsBenefit ElectionsCurrent Election Coverage Begin DateEffective DateEffective_DateBenefit ElectionsGroup NumberGroup NumberGroup_Number
- Add aGroup Column Headingfor the secondary business object, Benefit Elections. EnterBenefit Electionsfor both theBusiness ObjectandGroup Column Headingfields.
- Open Workday Studio.
- Create a newWorkday Assembly ProjectnamedCallPrintPdf.
- In theProject Explorerview, right-clickCallPrintPDF/ws/WSAR-INFand create a newMy_Report_Designsfolder.
- Add these components to your assembly project and link them together:Component TypeIDworkday-inStartHereworkday-out-restRequestCustomReportDataAsync-mediationSetReportandReportDesignVarsPdfPrintStepGeneratePDFAsync-mediationUploadToWorkday
- Configure the Report Service on theStartHereworkday-in component.
- In thePropertiesview, access theServicestab for theStartHereworkday-in component.
- Select theCreate Report Serviceicon and name itStartHere.
- Select theAdd New Entryicon and enter these values:OptionValueAliasmynewhireletterDescriptionMy New Hire Letter ReportReport ReferenceMy New Hire Letter Report
- Configure theRequestCustomReportDataworkday-out-rest component.
- On theRequestCustomReportDataworkday-out-rest component, selectSelect a RaaS Reporton theExtra Pathproperty.
- On theFilter Custom RaaS Reportspage, specifyEmployee Benefit Enrollmentsfor the custom report name, then clickNext.
- Select the report, then clickFinish.
- SpecifyEmployeeBenefitEnrollmentsforReport Alias, then clickFinish.
- On theExtra Pathproperty on the workday-out-rest component, enter@{intsys.reportService.getExtrapath('mynewhireletter')}?Worker!Employee_ID=21099!21189.
- Configure theSetReportandReportDesignVarsasync-mediation component.
- Add 2 write steps onPropertiestab of theasync-mediationassembly component and configure these values:Step 1Step 2StepID:WriteReportToVariableInput value:messageOutput value:variableVariable name:test.workday.reportStepID:CopyReportDesignToVariableInput value:messageOutput value:variableVariable name:test.report.design
- Using theMessage Builder, add a static-file element.Specify@{'my_report_designs/New_Hire_Letter.rptdesign'}as the report design file location in theInput Fileproperty.
- On thePropertiesview of theGeneratePDFPDF print step component, click theSelect Parameterbutton on theParameterstab.Configure these parameters:Parameter NameValuepdf.report.design.variabletest.report.designpdf.workday.report.variabletest.workday.reportpdf.timezoneCETpdf.languagefr_FRpdf.localefr_FRpdf.business.form.layout.widfbbe44a681251000039acc2ff657000apdf.report.design.widfbbe44a6812510000399fdf02c3f0006pdf.apply.report.design.per.rowtrue
- Store the generated PDF file with theUploadToWorkdayasync-mediation component.
- Add aStorestep component with an Output MIME type ofapplication/pdf. Name theOutputvariabletest.document.reference.
- Right-click the project in theProject Explorerand selectDeploy to Workday.
- In theCloud Explorer, right-click theStartHereworkday-in integration node , then selectLaunch Integration.
- Access the PDF file on theW:Drive.
- Select theProcess Monitorview, then click theWorkday: Process Monitoricon.
- Sign in to Workday and click .
- On theMy Reportstab, in theFile Namecolumn, click thePDFicon.