Example: Create a Report Design With a Chart
This example illustrates how to create a report design that includes a chart.
Your HR department wants you to create a report design for a summary of the employee total compensation package that includes a pie chart with the breakdown by the reward type. You need to create a Workday custom report with a primary business object for workers and a secondary business object for total compensation items.
- Sign in to your Workday GMS tenant.If you don't have a Workday GMS tenant, you can use any QA tenant in your Sandbox with the correct security access.
- Create a copy of theEmployee Total Rewardscustom report:
- Access theEmployee Total Rewardscustom report and specify 1 or more workers.
- From the related actions menu of the report, select the option.
- Name the new reportMy Employee Total Rewards.
- ClickOK.
- Remove the unnecessary items from the report:
- On theColumnstab of the report, delete these rows:Business ObjectFieldColumn Heading OverrideWorkerTotal Number of Shares GrantedShares Granted TotalWorkerCalculated Grant Value - RSUCalculated Grant Value RSUWorkerCalculated Grant Value - ISOCalculated Grant Value ISOWorkerCalculated Grant Value - NSOCalculated Grant Value NSOWorkerRSU Shares GrantedRSU Shares GrantedWorkerISO Shares GrantedISO Shares GrantedWorkerNSO Shares GrantedNSO Shares GrantedWorkerPercent of Stock Options VestedPercent of Stock Options VestedWorkerColor 1toColor 7.Color 1toColor 7.WorkerLabel 1toLabel 7.Label 1toLabel 7.WorkerCompany Logo URLCompany Logo URLStock GrantsAll rows.All rows.
- In theGroup Column Headingsgrid, remove theStock Grantsbusiness object row.
- In theSubfiltertab, remove theTotal Rewards Items (Do Not Use)business object.
- ClickOK.
- Open Report Designer in Workday Studio.
- Create a report project namedMy Employee Total Rewards. In that project, create a report file namedMy Employee Total Rewards.rptdesign.
- Create a Workday data source and download some sample data:
- Create a newWorkday Report Data SourcenamedMy Employee Total Rewards.
- Download the report description for theMy Employee Total Rewardscustom report from Workday.
- Download sample report data from Workday and name the fileMy Employee Total Rewards.xml.
- Create the data set relating to the primary business object, Workers, with these values:
Option Description Data Source SelectionMy Employee Total RewardsData Set TypeWorkday Primary Report Data SetData Set NameWorkersReport 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, Total Compensation Items, with these values:
Option Description Data Source SelectionMy Employee Total RewardsData Set TypeWorkday Secondary Report Data SetData Set NameTotalsBusiness ObjectTotal Compensation ItemsReport Designer displays the XML schema element values for each of the columns that you added as rows to your custom report for the Total Compensation Items 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. - Add a table to the layout:
- In theOutlineview, right-click theBodynode and selectInsert Element.
- Double-click theTableelement and configure these values:
Option Description Number of columns1Number of details1Data SetWorkersYou only need 1 column and 1 detail row of your table. To delete the header and footer rows, as well as additional columns, right-click in the guide cell, then selectDelete. - AddGrid 1to the table:
- In theOutlineview, right-click theCellnode located under , then selectInsert Element.
- Double-clickGridand configure 2 columns and 1 row.
- Right-click the firstCellnode under , then selectInsert Element.
- Double-click theImagereport item and selectEmbedded image, then clickAdd Image...to browse to the company logo image file.
- Right-click the secondCellnode under , then selectInsert Element.
- Double-clickDynamic Textand select , then insert the column binding forYear.If you can't find the required column binding, clickEdit Bindings...and refresh the list.
- Enter" Executive Rewards"after the+sign and clickOK.
- Drag theWorkerdata set from the node to the second column, below the dynamic text report item.
- In theProperty Editor - Dataview, align the inserted items to the right.
- In theProperty Editor - Gridview, name this gridGrid 1and collapse the grid.
- Save your work.
- AddGrid 2to the table:
- As before, insert a grid, then configure 1 column and 1 row.
- In theProperty Editor - Gridview, select theTotalssecondary data set from theData Setlist.
- From the option, clickJavaScript Syntax.
- In theExpression Builder, select and double-clickRowNumto enter therow.__rownumexpression.
- Add a chart to the grid.Report Designer doesn't currently support live preview for charts. You'll need to disable live preview before adding the chart. To do that, clear theEnable Live Preview in the chart buildercheck box in in thePreferencesmenu.Right-click the node, then selectInsert Element.
- Double-clickChartand configure these values:FieldValueSelect Chart TypePieOutput FormatSelect 1 of these options:
- PNG
- JPG
- BMP
If you select theSVGformat option, the chart won't render when you generate a PDF. - ClickNext.
- On theSelect Datatab, select and drag theTarget Employer Contributioncolumn to theSlice Size Definitionlist forSeries 1. Report Designer inserts therow ["Target_Employer_Contribution"]expression as theSeries 1value.
- Select and drag theTotal Compensation Itemcolumn to theCategory Definitionlist.
- ClickNext.
- On theFormat Charttab, format these values for theSerieschart type:FieldValueValue SeriesDelete theSeries 1title.Configure theFontsfield to:
- Font size6.
- Bold formattingB.
- On theFormat Charttab, format these values for theChart Areachart type:FieldValueTitleYour Estimated AwardsPlotConfigure theseArea Formatsettings:
- Anchor:Top Left.
- Stretch:Vertical.
- Insets (Points): Set all values to0.
Configure these settings:- Orientation:Vertical.
- Position:Left.
- Anchor:Middle.
- Insets (Points): Set all values to0.
Configure theFontsfield to:- Font size6.
- Bold formattingB.
- ClickApplyandFinish.
- Name the gridGrid 2and save your work.
- AddGrid 3to the table:
- Insert a grid with 3 columns and 2 rows.
- Add a background color to the first column of the grid:
You can always resize the column to create a narrow colored strip by dragging the column handle.FieldValueAdd these colors toCustom Colors:- Red:11.
- Green:109.
- Blue:168.
- Custom colors:RGB (11, 109, 168).
- Border:All Borders.
- In theOutlineview, right-click the second cell of the first row, then selectInsert Element.
- Double-click theDynamic Textoption and enter this text:row["Year"] + " Base Salary"
- In theProperty Editor - Dynamic Textview, configure bold formatting and select the12font size.
- In theOutlineview, expand and drag theER Base Pay Totalfield to the third column, first row of the grid.
- In theProperty Editor - Dataview, configure bold formatting, right alignment, and select the12font size.
- In theOutlineview, right-click the second cell of the second row, then selectInsert Element.
- Double-clickLabeland enter this text:Base pay calculated for January 1 to December 31:
- In theProperty Editor - Labelview, configure theInlinedisplay setting and select the9font size.
- In theOutlineview, expand and drag theER Base Pay Totalfield to the second column, second row of the grid, just after the previous label.
- In theProperty Editor - Dataview, configure theInlinedisplay setting and select the9font size.
- In theProperty Editor - Gridview, specify the12bottom margin value.
- Name the gridGrid 3and save your work.
- AddGrid 4to the table:
- Insert a grid with 3 columns and 3 rows.
- As before, add a background color to the first column of the grid:FieldValueGreen
- Color:Green.
- Border:All Borders.
- As before, add the dynamic text to the second cell, first row of the grid:"Employer Allowance Contribution for " + row["Year"]
- Configure bold formatting and select the12font size.
- In theOutlineview, expand and drag theER Allowances Totalfield to the third column, first row of the grid.
- Configure bold formatting and select the12font size.
- Add this dynamic text to the second cell, second row of the grid:"Your Total Employer Allowance Plan Contribution was: " + row["ER_Allowances_Total"]
- In theProperty Editor - Dynamic Textview, select the9font size and the6bottom padding value.
- Add this dynamic text to the second cell, third row of the grid:"Your Contribution to your Allowance Plan was: " + row["EE_Allowances_Total"]
- In theProperty Editor - Dynamic Textview, select the9font size, the6bottom padding value, and the12bottom margin value.
- Name the gridGrid 4and save your work.
- AddGrid 5to the table:
- Insert a grid with 3 columns and 3 rows.
- Add a background color to the first column of the grid:FieldValueAdd these colors toCustom Colors:
- Red:251.
- Green:155.
- Blue:26.
- Custom colors:RGB (251, 155, 26).
- Border:All Borders.
- Add this dynamic text to the second cell, first row of the grid:"Employer Benefit Contribution for " + row["Year"]
- Configure bold formatting and select the12font size.
- In theOutlineview, expand and drag theER Benefits Totalfield to the third column, first row of the grid.
- In theProperty Editor - Dataview, configure bold formatting, right alignment, and select the12font size.
- Add this dynamic text to the second cell, second row of the grid:"Your Total Employer Benefit Plan Contribution was: " + row["ER_Benefits_Total"]
- In theProperty Editor - Dynamic Textview, select the9font size and6bottom padding.
- Add this dynamic text to the second cell, third row of the grid:"Your Contribution to your Benefit Plan was: " + row["EE_Benefits_Total"]
- In theProperty Editor - Dynamic Textview, select the9font size, the6bottom padding value, and the12bottom margin value.
- Name the gridGrid 5and save your work.
- AddGrid 6to the table:
- Insert a grid with 3 columns and 3 rows.
- Add a background color to the first column of the grid:FieldValueRed
- Color:Red.
- Border:All Borders.
- Add this dynamic text to the second cell, first row of the grid:"Target " + row["Year"] + " Management Incentive Plan Award"
- Configure bold formatting and select the12font size.
- In theOutlineview, expand and drag theER Incentive Totalfield to the third column, first row of the grid.
- In theProperty Editor - Dataview, configure bold formatting, right alignment, and select the12font size.
- Add this dynamic text to the second cell, second row of the grid:"Your Target Award is calculated using the estimated " + row["Year"] + " Base Salary shown above."
- In theProperty Editor - Dynamic Textview, select the9font size and6bottom padding.
- Add this dynamic text to the second cell, third row of the grid:"Your current Target Award as a percentage of Base Salary is: " + row["Bonus_Target_Percent"] + row["Percent_Sign"]
- In theProperty Editor - Dynamic Textview, select the9font size, the6bottom padding value, and the12bottom margin value.
- Name the gridGrid 6and save your work.
- AddGrid 7to the table:
- Insert a grid with 2 columns and 1 row.
- Add a background color to the first column of the grid:FieldValueAdd these colors toCustom Colors:
- Red:255.
- Green:223.
- Blue:223.
- Custom colors:RGB (255, 223, 223).
- Border:All Borders.
- Add this dynamic text to the first cell of the grid:"Total Estimated " +row["Year"] + " Compensation"
- In theOutlineview, expand and drag theTotal Compensation Amountfield to the second column of the grid.
- In theProperty Editor - Dataview, configure bold formatting, right alignment, and select the12font size.
- Name the gridGrid 7and save your work.
- To remove extra pages from the end of the report, modify the report layout preferences:
- In theOutlineview, select theMy Employee Total Rewards.rptdesigntop-level report design node.
- In theProperty Editor - Reportview, select theAuto Layoutlayout preference.
- Save and preview your design.
Deploy your design to Workday for use as a business form layout.