Wiki source code of Créer une fabrique de documents PDF
Last modified by Aurelie Bertrand on 2025/07/04 17:22
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% class="box infomessage" %) | ||
| 2 | ((( | ||
| 3 | 🙋 This tutorial is intended for **advanced users**. | ||
| 4 | |||
| 5 | ⏱ It is designed to be followed independently **in 2 hours.** | ||
| 6 | ))) | ||
| 7 | |||
| 8 | ---- | ||
| 9 | |||
| 10 | {{ddtoc/}} | ||
| 11 | |||
| 12 | ---- | ||
| 13 | |||
| 14 | = Introduction = | ||
| 15 | |||
| 16 | In this tutorial, we're going to find out how to create a PDF {{glossaryReference glossaryId="Glossary" entryId="fabrique de documents"}}document builder{{/glossaryReference}}. | ||
| 17 | |||
| 18 | To do this, we are going to produce a PDF report on the turnover (CA) achieved for different product families of a company. It is based on the retailfr.xls dataset, which corresponds to fictitious data from a retail company containing information on products and data such as prices, sales, margins, etc. | ||
| 19 | |||
| 20 | The various stages of this tutorial are as follows: | ||
| 21 | |||
| 22 | * Creation of the data model based on the retailfr.xls file | ||
| 23 | * Creation of the 6 charts to be used in the report: | ||
| 24 | ** Summary table of turnover by product family | ||
| 25 | ** Breakdown of turnover by product | ||
| 26 | ** {{glossaryReference glossaryId="Glossary" entryId="Courbes"}}Lines{{/glossaryReference}} showing sales growth by month | ||
| 27 | ** Breakdown of sales by region | ||
| 28 | ** Comparison of sales by product | ||
| 29 | ** Table listing product families for each section | ||
| 30 | * Creation of the {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}} | ||
| 31 | * Creation of the dashboard page used to generate the PDF report | ||
| 32 | |||
| 33 | = Prerequisites = | ||
| 34 | |||
| 35 | In order to complete this tutorial, you need to : | ||
| 36 | |||
| 37 | * have installed DigDash Enterprise version 2025R1 or higher ; | ||
| 38 | * be a member of the**"Data Model Designer**" and**"Dashboard Designer**" authorisation groups; | ||
| 39 | * download the resources archive [[tutoriel_fabrique_pdf_ressources.zip>>attach:tutoriel_fabrique_pdf_ressources.zip]] containing the retailfr.xls file and the images used. | ||
| 40 | |||
| 41 | (% class="box" %) | ||
| 42 | ((( | ||
| 43 | ℹ The screenshots in this tutorial were created using the Chrome browser. There may be slight differences depending on the browser. | ||
| 44 | ))) | ||
| 45 | |||
| 46 | = Step 1: Creating and configuring the data model = | ||
| 47 | |||
| 48 | (% class="box infomessage" %) | ||
| 49 | ((( | ||
| 50 | This entire part of the tutorial takes place in the Studio. | ||
| 51 | ))) | ||
| 52 | |||
| 53 | == Import the retailfr.xls data source == | ||
| 54 | |||
| 55 | Here we're going to import the data from the retailfr.xls Excel file we downloaded earlier. To do this | ||
| 56 | |||
| 57 | 1. Launch the Studio. | ||
| 58 | 1. Click on the **Templates** tab. | ||
| 59 | 1. Click on the **New template** button. | ||
| 60 | [[image:New_model_all_files_FR.png||alt="Nouveau modèle Fichiers"]]\\ | ||
| 61 | 1. In the **Create a new data model** box, select **All types **in the **Files** section. | ||
| 62 | 1. In the **Search for remote files** box, select "**Common Datasources**" from the **Server** drop-down list and click the **Add file to server...** button. | ||
| 63 | [[image:Search_remote_files_FR.png]]\\ | ||
| 64 | 1. In the **Select a file** box, select **From your computer**, click the **Browse... **button and find the file //retailfr.xls// | ||
| 65 | 1. Click **OK**. | ||
| 66 | ➡ The file is now saved on the DigDash Common Datasources server and accessible to all users. | ||
| 67 | |||
| 68 | (% start="5" %) | ||
| 69 | 1. In the **Remote File Search** box, select the //retailfr.xls //file and then click **OK**. | ||
| 70 | |||
| 71 | The **Excel File **window appears. It offers data selection options and a preview of the data. Here we will configure the data model. | ||
| 72 | |||
| 73 | == Configuring the data model == | ||
| 74 | |||
| 75 | The elements in the first row of the table correspond to the heading of the data in each column. We are therefore going to use them as column headings. To do this, in the **Data selection** section, tick the **First row as header** box. | ||
| 76 | |||
| 77 | === Filtering product families === | ||
| 78 | |||
| 79 | Here we are going to concentrate on the product families: | ||
| 80 | |||
| 81 | * Cold meats | ||
| 82 | * Dessert | ||
| 83 | * Sport & leisure | ||
| 84 | * Telecom | ||
| 85 | |||
| 86 | We are therefore going to filter the rows for which the **Family **field is equal to the above values. To do this, in the **Data selection** section : | ||
| 87 | |||
| 88 | 1. Click on the **Add...** button. | ||
| 89 | 1. In the **Edit filter rule** box, select** Family**, then **respond to the regular expression **and enter **Charcuterie|Dessert|Sport & leisure|Telecom**. | ||
| 90 | [[image:Rule_filter_family_FR.png]] | ||
| 91 | 1. (% style="color:#36525b; font-size:14.6667px; white-space-collapse:preserve" %)Click(%%)** OK**. | ||
| 92 | ➡ The other members of the **Family **dimension are greyed out. | ||
| 93 | 1. Click the **Next** button at the bottom right to open the data model configuration window. | ||
| 94 | |||
| 95 | === Create the measures CA (Year - 1) and CA ~(% Progression) === | ||
| 96 | |||
| 97 | We are now going to create 2 new measures calculated with the wizard: CA (Year - 1) and CA ~(% Growth). To do this | ||
| 98 | |||
| 99 | 1. In the **Columns** tab, click on the **New measure** button. | ||
| 100 | 1. Click on **Calculated measure**: | ||
| 101 | 1*. For the **CA (Year-1)** measure, drag and drop the **Year-1** function from the **Transformer **tab onto the** CA** measure. | ||
| 102 | [[image:New_calculated_measure_revenue_FR.png||alt="Nouvelle mesure CA N-1"]]\\ | ||
| 103 | 1*. For the **AC** measurement **~(% Progression):** | ||
| 104 | 1**. Drag and drop the **% Progression** function from the **General **tab onto the** CA** measurement. | ||
| 105 | 1**. Define the progression between the **First measurement**: //CA (Year-1) //and the **Second measurement**: //CA.// | ||
| 106 | 1**. Select the **Format **: //Percentage //and click **OK**. | ||
| 107 | [[image:New_measure_revenue_progression_FR.png||alt="Progression CA"]] | ||
| 108 | ➡ The calculated measures are added to the list of columns. | ||
| 109 | 1. In the** Properties** tab, name the **Retail** data model and then click **Finish **at the bottom right to save it. | ||
| 110 | |||
| 111 | Now that the Retail data model is configured, we can create the charts based on this model. | ||
| 112 | |||
| 113 | = Step 2: Creating the charts = | ||
| 114 | |||
| 115 | (% class="box infomessage" style="line-height: 1.2; text-align: justify;" %) | ||
| 116 | ((( | ||
| 117 | ℹ This entire part of the tutorial takes place in the Studio. | ||
| 118 | ))) | ||
| 119 | |||
| 120 | We are now going to create the graphs that we will insert into our {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}}. | ||
| 121 | All the graphs created in this tutorial will be based on the retail data model. | ||
| 122 | |||
| 123 | To create a chart (flow), click on the **New {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}** button and then select the desired flow. | ||
| 124 | |||
| 125 | [[image:New_flow_FR.png||alt="Nouveau flux" height="526" width="938"]] | ||
| 126 | |||
| 127 | (% style="line-height: 1.2; text-align: justify;" %) | ||
| 128 | == Summary table of sales by product family == | ||
| 129 | |||
| 130 | 1. Create a new {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} of the **{{glossaryReference glossaryId="Glossary" entryId="Tableau croisé"}}Cross table{{/glossaryReference}}** type. | ||
| 131 | 1. Select the data model and enter the name **Summary of sales by product family**. | ||
| 132 | 1. Drag the **Family **dimension onto the **Column 1** axis. | ||
| 133 | 1. Place the measures **Sales**, **Sales (Year-1)** and **Sales ~(% Growth)** on the **Line 1** axis. | ||
| 134 | [[image:Flow_revenue_synthesis_FR.png||alt="Synthèse du CA par famille"]]\\ | ||
| 135 | 1. Click on the sort button for the **Column 1** axis and apply a descending sort to the Sales measure. | ||
| 136 | [[image:Family_sort_measure_FR.png||alt="Tri sur la mesure"]] | ||
| 137 | |||
| 138 | We are now going to add an alert format to the **Sales ~(% Growth) **measure **:** | ||
| 139 | |||
| 140 | 1. Right-click on the **Sales **measure **~(% Growth) **and then click on **Apply a format -> Format manager... ** | ||
| 141 | [[image:1738318144425-934.png||alt="Format CA progression"]]\\ | ||
| 142 | 1. In the**Format Editor**, select **Alerter** and then click on the **+** button to create a new alerter format **_tutoriel_progression. | ||
| 143 | [[image:New_format_tuto_progression_FR.png]]**\\ | ||
| 144 | 1. Click on the **+** button in the **Format Editor** section on the right to create the following alerts with an **Output Type of** //Colour + icon// in the //Percentage// **Format** //~:// | ||
| 145 | 1*. Value **0**: equal sign | ||
| 146 | [[image:New_alerter_tuto_progression_FR.png||alt="Nouvel alerteur ="]]\\ | ||
| 147 | 1*. Interval **-infinite to 0 **: red down arrow | ||
| 148 | [[image:New_alerter_tuto_progression_neg_FR.png||alt="Nouvel alerteur négatif"]]\\ | ||
| 149 | 1*. Interval **0 to +infinite**: green up arrow | ||
| 150 | [[image:New_alerter_tuto_progression_pos_FR.png||alt="Nouvel alerteur +"]] | ||
| 151 | |||
| 152 | (% class="box warningmessage" %) | ||
| 153 | ((( | ||
| 154 | ℹ The order in which alerts are created must be respected. | ||
| 155 | ))) | ||
| 156 | |||
| 157 | (% start="4" %) | ||
| 158 | 1. Click **OK** and select the** _tutor_progression** alert format for the measurement.[[image:1738319323337-417.png||alt="Format _tutoriel_progression"]]((( | ||
| 159 | ➡ We obtain the following display in the table: | ||
| 160 | [[image:1738319397544-607.png||alt="Tableau avec alerteur"]] | ||
| 161 | ))) | ||
| 162 | 1. Click **OK **at the bottom right of the editing window to save the {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}. | ||
| 163 | |||
| 164 | == Breakdown of turnover by month == | ||
| 165 | |||
| 166 | (% start="1" %) | ||
| 167 | 1. Create a new {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} of the **{{glossaryReference glossaryId="Glossary" entryId="Tableau croisé"}}Cross table{{/glossaryReference}}** type. | ||
| 168 | 1. Select the data model and enter the name **Breakdown of turnover by month**. | ||
| 169 | 1. Drag the **Date** dimension onto the **Column 1 **axis (at Month level in the Date hierarchy). | ||
| 170 | [[image:Date_hierarchy_selection_FR.png||alt="Hiérarchie date"]]\\ | ||
| 171 | 1. Place the **Turnover**, **Turnover (Year - 1)** and **Turnover ~(% Growth)** measures on the **Line 1** axis. | ||
| 172 | 1. Apply the **_tutoriel_progression** alert format created earlier to the **CA ~(% Progression)** measure **.**((( | ||
| 173 | [[image:Apply_format_alerter_revenue_date_FR.png||alt="Appliquer le format alerteur _tutoriel_progression"]] | ||
| 174 | ))) | ||
| 175 | 1. Click on the sort button [[image:Sort_button_FR.png||alt="Bouton Tri"]] on the **Column 1** axis and apply the **Data Model Sort **to sort the months in chronological order. | ||
| 176 | [[image:Sort_date_DM_FR.png||alt="Tri modèle de données"]] | ||
| 177 | 1. Click **OK **at the bottom right of the edit window to save the {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}. | ||
| 178 | |||
| 179 | == {{glossaryReference glossaryId="Glossary" entryId="Courbes"}}Lines{{/glossaryReference}} showing sales by month == | ||
| 180 | |||
| 181 | (% start="1" %) | ||
| 182 | 1. Create a new **{{glossaryReference glossaryId="Glossary" entryId="Courbes"}}Lines{{/glossaryReference}}** flow. | ||
| 183 | 1. Select the data model and enter the name **{{glossaryReference glossaryId="Glossary" entryId="Courbes"}}Lines{{/glossaryReference}} by Month**. | ||
| 184 | 1. Place the **Date** dimension on the **Abscissa** axis (at the Month level of the Date hierarchy). | ||
| 185 | 1. Place the **Sales** measure on the **{{glossaryReference glossaryId="Glossary" entryId="Courbes"}}Lines{{/glossaryReference}}** axis. | ||
| 186 | 1. From the **Specific parameters** tab in the right-hand panel, add the **Circle** marker (contained in the **Other** category). | ||
| 187 | [[image:Add_marker_lines_FR.png||alt="Courbe d’évolution du CA par mois"]]\\ | ||
| 188 | 1. Click **OK **at the bottom right of the edit window to save the {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}. | ||
| 189 | |||
| 190 | == Breakdown of turnover by region == | ||
| 191 | |||
| 192 | 1. Create a new {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} of the **Map** type. | ||
| 193 | 1. Select the data model and enter the name **Breakdown of sales by region**. | ||
| 194 | 1. Drag the **Sales** measure onto the **Measure Axis**. | ||
| 195 | 1. Drag the **Warehouse Region** dimension onto the **Geography** axis: select the **Continent** level of the **Geography** hierarchy and tick the **Add the "Navigate hierarchies" action** box. | ||
| 196 | [[image:Region_hierarchy_selection_FR.png||alt="Hirérarchie région magasin"]]\\ | ||
| 197 | 1. In the **Interaction **tab of the right-hand pane, tick the **Navigate in hierarchy** box **if a filter is applied**. | ||
| 198 | [[image:Map_revenue_region_FR.png||alt="Naviguer dans la hiérarchie si un filtre est appliqué"]]\\ | ||
| 199 | 1. Click on **Colours **in the toolbar** to **display the colour options. | ||
| 200 | 1. Click on the **Edit **button ** [[image:Edit_button.png||alt="Editer" height="28" width="27"]] to the right of the main palette to open the Colour Palette Manager**. | ||
| 201 | 1. Click on the **+** button to create a new colour palette: | ||
| 202 | 1*. Enter the name **_tutoriel_carte**. | ||
| 203 | 1*. Define the 2 palette colours: colour codes #FFEBD7 and #B15900. | ||
| 204 | [[image:Color_map_tuto_map_FR.png]]\\ | ||
| 205 | 1*. Click** OK**. | ||
| 206 | ➡ The new colour palette is applied to the map. | ||
| 207 | [[image:1738328590656-399.png||alt="Carte nouvelle palette" height="417" width="651"]] | ||
| 208 | 1. Click **OK **at the bottom right of the editing window to save the {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}. | ||
| 209 | |||
| 210 | == Comparing turnover by product == | ||
| 211 | |||
| 212 | (% start="1" %) | ||
| 213 | 1. Create a new **Bar** type {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}. | ||
| 214 | 1. Select the data model and enter the name **Comparison of turnover by product**. | ||
| 215 | 1. Drag the **Product **dimension onto the **Bar** axis. | ||
| 216 | 1. Place the **Sales** measure on the **Stacking** axis. | ||
| 217 | 1. Modify the colour distribution in the colour options: activate the colour distribution on the **Bars** axis. | ||
| 218 | [[image:CA par produit.png||alt="CA par produit"]]\\ | ||
| 219 | 1. Click on the sort button on the **Bar** axis and apply a descending sort on the **CA** measure. | ||
| 220 | [[image:Sort_bar_product_revenue_FR.png||alt="Tri décroissant CA"]]\\ | ||
| 221 | 1. Apply the **Nb Abbrev** format to the **CA** measure. | ||
| 222 | [[image:Apply_nb_abbrev_revenue.png]]\\ | ||
| 223 | |||
| 224 | (% start="8" %) | ||
| 225 | 1. In the **Labels **tab of the right-hand panel: | ||
| 226 | 1*. activate **Bar Content**. | ||
| 227 | 1*. Tick the **Automatic text colour** box. | ||
| 228 | [[image:1738329396496-547.png||alt="Comparaison du CA par produit"]] | ||
| 229 | 1. Click **OK **at the bottom right of the editing window to save the {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}. | ||
| 230 | |||
| 231 | == Table listing the product families == | ||
| 232 | |||
| 233 | We are going to create a table listing the product families that we are going to use to create a section. This section will be used to duplicate the sales details page for each product family contained in the table. | ||
| 234 | |||
| 235 | (% start="1" %) | ||
| 236 | 1. Create a new {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} of type **Table**. | ||
| 237 | 1. Select the data model and enter the name **Product Family List**. | ||
| 238 | 1. Drag the **Family** dimension onto the **Column 1** axis. | ||
| 239 | 1. Click on the sort button for the **Column 1** axis and apply an ascending alphabetical sort. | ||
| 240 | [[image:Sort_alphabetic_family_measure_FR.png||alt="Liste des familles de produit"]] | ||
| 241 | |||
| 242 | (% start="5" %) | ||
| 243 | 1. Click **OK **at the bottom right of the edit window to save the {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}. | ||
| 244 | |||
| 245 | We have created all the graphs required for the report. Now we're going to create the {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}}. | ||
| 246 | |||
| 247 | = Step 3: Configuring the {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}} = | ||
| 248 | |||
| 249 | (% class="box infomessage" %) | ||
| 250 | ((( | ||
| 251 | ℹ This entire part of the tutorial takes place in the Studio. | ||
| 252 | ))) | ||
| 253 | |||
| 254 | ((( | ||
| 255 | (% role="presentation" %) | ||
| 256 | Here we're going to create and configure the PDF {{glossaryReference glossaryId="Glossary" entryId="fabrique de documents"}}document builder{{/glossaryReference}}. We're going to add the graphics we created earlier, as well as text boxes, images, page numbers, etc. to create a complete report. | ||
| 257 | |||
| 258 | (% id="HCrE9ationetpropriE9tE9sdelafabriquePDF" role="presentation" %) | ||
| 259 | == Create and define the properties of the {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}} == | ||
| 260 | ))) | ||
| 261 | |||
| 262 | 1. Create a new **PDF {{glossaryReference glossaryId="Glossary" entryId="fabrique de documents"}}document builder{{/glossaryReference}}** type {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} then, in the **Properties** tab : | ||
| 263 | 1. Name this {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} **PDF Report**. | ||
| 264 | 1. Define the output name of the PDF file in the **Export name** field: tutorial_report_CA_${filter.Date}_${filter.Region Warehouse}_${date.yyyyMMddhhmm}. | ||
| 265 | |||
| 266 | (% class="box infomessage" %) | ||
| 267 | ((( | ||
| 268 | 💡 The text **${date.yyyyMMddhhmm}** put in the **Export Name** field corresponds to a DigDash keyword used to obtain the current date in the format YYYYMMDDhhmm. | ||
| 269 | ))) | ||
| 270 | |||
| 271 | (% start="4" %) | ||
| 272 | 1. Click on the **Editor** button. | ||
| 273 | [[image:New_PDF_builder_FR.png||alt="Nouvelle fabrique PDF"]] | ||
| 274 | |||
| 275 | ➡ The PDF {{glossaryReference glossaryId="Glossary" entryId="fabrique de documents"}}document builder{{/glossaryReference}} editor opens. Here we will configure the {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}} template. | ||
| 276 | |||
| 277 | ((( | ||
| 278 | == Modifying the page parameters == | ||
| 279 | |||
| 280 | First of all, we're going to modify the page layout: | ||
| 281 | ))) | ||
| 282 | |||
| 283 | * In the **Settings **tab of the right-hand panel, change the document to **A4 landscape** format **(297 x 210 mm)**. | ||
| 284 | |||
| 285 | [[image:Page_size_landscape_FR.png||alt="Page paysage"]] | ||
| 286 | |||
| 287 | == Configure the cover page == | ||
| 288 | |||
| 289 | On the first existing page, which will act as the cover page, we're going to add : | ||
| 290 | |||
| 291 | * A header banner that will be repeated on every page (image) | ||
| 292 | * A footer banner that will be repeated on every page (image) | ||
| 293 | * Page numbering, repeated on every page (text) | ||
| 294 | * A logo (image) | ||
| 295 | * A title (text) | ||
| 296 | |||
| 297 | === Add the header banner === | ||
| 298 | |||
| 299 | To add the image corresponding to the header banner : | ||
| 300 | |||
| 301 | 1. Click on the **Image** button. | ||
| 302 | 1. Click on an empty zone on the right-hand side of the page to create an image zone.((( | ||
| 303 | [[image:Add_image_area_FR.png||alt="Ajout image"]] | ||
| 304 | ))) | ||
| 305 | 1. Click on the [[image:1716900965745-365.png]] button in the created zone and then click **Edit** to open the **Icon Manager**. | ||
| 306 | [[image:Edit_picture_area_FR.png||alt="Editer image"]]\\ | ||
| 307 | 1. In the **Indicators** tab, click **Add a custom icon**. | ||
| 308 | 1. Add the 2 images **_custom_tutoriel_pdf_banniere_haut.png** and **_custom_tutoriel_pdf_banniere_bas.png **(downloaded previously) then click **OK** in the **Add a custom icon** window. | ||
| 309 | (% style="border:none; color:#36525b; display:inline-block; font-family:~"Open Sans~",sans-serif; font-size:11pt; font-style:normal; font-variant:normal; font-weight:400; height:309px; overflow:hidden; text-decoration:none; white-space:pre-wrap; width:709px" %)[[image:Add_custom_picture_FR.png]] | ||
| 310 | |||
| 311 | (% start="6" %) | ||
| 312 | 1. In the **Icon Manager** window, select the image **_custom_tutoriel_pdf_banniere_haut.png** then click **OK**. | ||
| 313 | |||
| 314 | The first image is now present in the PDF template. To move and resize it, you can select it then drag and drop it or hold down one of the corners. To be more precise, you can also enter values directly in the fields in the toolbar above the page: | ||
| 315 | |||
| 316 | * **X** (X coordinates from the left edge of the page) | ||
| 317 | * **Y** (Y coordinates from the top edge of the page) | ||
| 318 | * **W** (element width) | ||
| 319 | * **H** (height of the element) | ||
| 320 | |||
| 321 | (% class="box warningmessage" %) | ||
| 322 | ((( | ||
| 323 | ❗These values vary depending on the screen resolution. For the same positioning, the values in your editor may differ from the values illustrated here. | ||
| 324 | ))) | ||
| 325 | |||
| 326 | (% start="7" %) | ||
| 327 | 1. Resize it to the width of the page and position it at the top of the page. | ||
| 328 | 1. Click the [[image:1716900965745-365.png]] button again, click on **Type** and then select **Header **:** this **will allow this element to be repeated on all the pages of the PDF report. | ||
| 329 | [[image:Picture_type_header_FR.png||alt="Type En_tête"]]\\ | ||
| 330 | |||
| 331 | === Add the footer banner === | ||
| 332 | |||
| 333 | To add the footer banner, perform the same actions as above. For this element : | ||
| 334 | |||
| 335 | (% start="1" %) | ||
| 336 | 1. Select the image **_custom_tutoriel_pdf_banniere_bas.png**. | ||
| 337 | 1. Resize it to the width of the page like the previous one and position it at the bottom of the page. | ||
| 338 | 1. Select the **Footer type**. | ||
| 339 | |||
| 340 | (% style="line-height: 1.2; text-align: justify;" %) | ||
| 341 | === Add the logo === | ||
| 342 | |||
| 343 | (% style="line-height:1.2; text-align:justify" %) | ||
| 344 | To add the logo : | ||
| 345 | |||
| 346 | 1. Click on the **Image** button. | ||
| 347 | 1. Click on an empty zone on the right-hand side of the page to create an image zone. | ||
| 348 | 1. Click on the [[image:1716900965745-365.png]] button of the created area and then on **Edit**. | ||
| 349 | ➡ The **Icon Manager** appears. | ||
| 350 | 1. In the **Infographics** tab, click **Add a vector icon**. | ||
| 351 | [[image:Ajout_logo1.png||alt="Ajout infographie"]]\\ | ||
| 352 | 1. Add the image **_custom_tutoriel_pdf_logo_digdash.svg** (downloaded previously) | ||
| 353 | 1. Select the image **_custom_tutoriel_pdf_logo_digdash.svg** from the list and click **OK**. | ||
| 354 | [[image:Add_vector_icon_digdash_logo_FR.png||alt="Logo DigDash"]]\\ | ||
| 355 | 1. Resize it and position it as shown below: | ||
| 356 | [[image:Logo_position_FR.png||alt="Logo positionné"]] | ||
| 357 | |||
| 358 | (% style="line-height: 1.2; text-align: justify;" %) | ||
| 359 | === Add text === | ||
| 360 | |||
| 361 | (% style="line-height:1.2; text-align:justify" %) | ||
| 362 | To add text : | ||
| 363 | |||
| 364 | 1. Click on the **Text** button. | ||
| 365 | 1. Click on an empty area of the page on the right to create a text zone. | ||
| 366 | 1. Click on the menu button for the zone you have created and then click on **Edit**. | ||
| 367 | 1. In the text zone, fill in the texts below, adding a line break between them: | ||
| 368 | 1*. CA indicators report | ||
| 369 | 1*. Report date: ${date.dd/MM/yyyy} | ||
| 370 | 1. Select the first line of text, set the font size to 72 and centre. | ||
| 371 | 1. Select the second line of text, set the font size to 16 and centre. | ||
| 372 | 1. Click** OK**. | ||
| 373 | [[image:Add_report_title_FR.png||alt="Ajout texte"]]\\ | ||
| 374 | 1. Resize and position the text box as shown below:[[image:Title_added_FR.png||alt="Titre ajouté"]] | ||
| 375 | |||
| 376 | === Add page numbers === | ||
| 377 | |||
| 378 | To add page numbering: | ||
| 379 | |||
| 380 | 1. Click the **Page Number** button and then select **Page Number (Footer)**. | ||
| 381 | ➡ Page numbering is added automatically at the bottom right of the page. | ||
| 382 | [[image:Page_numbers_added_FR.png||alt="Numéro de page"]] | ||
| 383 | |||
| 384 | (% style="line-height:1.2; text-align:justify" %) | ||
| 385 | The cover page is now complete. We're going to add a new page to our PDF. To do this, click on the **+ **button **in **the toolbar above the page. | ||
| 386 | |||
| 387 | (% style="line-height: 1.2;" %) | ||
| 388 | You can move between the different pages using the arrows at the bottom. | ||
| 389 | [[image:Add_page2_FR.png||alt="Ajout page 2"]] | ||
| 390 | |||
| 391 | (% style="line-height: 1.2;" %) | ||
| 392 | == Configuring the summary page == | ||
| 393 | |||
| 394 | (% style="line-height:1.2; text-align:justify" %) | ||
| 395 | In this second page, which will be the summary of the sales indicators, we are going to add : | ||
| 396 | |||
| 397 | * A title (text) | ||
| 398 | * 2 description texts (text) | ||
| 399 | * Graphs: | ||
| 400 | ** Summary of sales by product family | ||
| 401 | ** Sales trend by month | ||
| 402 | ** Breakdown of sales by region | ||
| 403 | |||
| 404 | (% style="line-height: 1.2; text-align: justify;" %) | ||
| 405 | === Add title === | ||
| 406 | |||
| 407 | (% style="line-height:1.2; text-align:justify" %) | ||
| 408 | To add a title : | ||
| 409 | |||
| 410 | 1. Click on the **Text** button. | ||
| 411 | 1. Click on an empty zone on the right-hand side of the page to create a text zone. | ||
| 412 | 1. Click on the menu button for the zone you have created and then click on **Edit.** | ||
| 413 | 1. In the text editor, enter the title: //Global summary//. | ||
| 414 | 1. Set the font size to 28 and centre. | ||
| 415 | [[image:Page2_title_FR.png]]\\ | ||
| 416 | 1. Click **OK**. | ||
| 417 | 1. Resize the text box and position it as follows: | ||
| 418 | [[image:Page2_title_added_FR.png||alt="Titre ajouté"]]\\ | ||
| 419 | |||
| 420 | (% style="line-height: 1.2; text-align: justify;" %) | ||
| 421 | === Add the description texts === | ||
| 422 | |||
| 423 | (% style="line-height:1.2; text-align:justify" %) | ||
| 424 | To add the description texts, follow the same steps as above: | ||
| 425 | |||
| 426 | 1. In the first text box, enter the following text: //Below is a table summarising the turnover achieved by the different product families for the year _KEYWORD_YEAR_ compared with the previous year.// | ||
| 427 | |||
| 428 | (% class="box infomessage" %) | ||
| 429 | ((( | ||
| 430 | **_KEYWORD_YEAR_** is a keyword that will be replaced by the value for the year selected when the PDF report is generated. | ||
| 431 | ))) | ||
| 432 | |||
| 433 | (% start="2" %) | ||
| 434 | 1. In the second text box, enter the following text: //The following pages detail sales by product family//. | ||
| 435 | 1. Resize and position the text boxes to obtain a result similar to the illustration below: | ||
| 436 | [[image:Text_areas_added_FR.png||alt="Zones de texte ajoutés"]] | ||
| 437 | |||
| 438 | === Add graphics === | ||
| 439 | |||
| 440 | To add graphs : | ||
| 441 | |||
| 442 | 1. In the **{{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} by role** tab on the left-hand panel, select the role containing your charts. | ||
| 443 | 1. Find the chart **Summary of sales by product family**. | ||
| 444 | 1. Drag and drop the **Summary of sales by product family** graph from the list of Flows onto the page. | ||
| 445 | 1. Do the same for the other 2 graphs: **Change in turnover by month** and **Breakdown of turnover by region**. | ||
| 446 | 1. Resize and position the graph areas to obtain the following model: | ||
| 447 | [[image:Page2_flows_added_FR.png||alt="Graphiques ajoutés"]] | ||
| 448 | |||
| 449 | (% class="box infomessage" %) | ||
| 450 | ((( | ||
| 451 | 💡 You can multi-select the flows (Ctrl + left-click) to drag and drop several simultaneously. | ||
| 452 | ))) | ||
| 453 | |||
| 454 | (% start="6" %) | ||
| 455 | 1. You can check the rendering of the various elements by activating **Final Rendering** in the toolbar above the page. If the area is not suited to the content, you can resize it. | ||
| 456 | [[image:Page2_rendering_FR.png||alt="Rendu final"]] | ||
| 457 | |||
| 458 | Now that the summary page is complete, we're going to add a new page to our PDF. To do this, click on the **+** button as before. | ||
| 459 | |||
| 460 | == Configuring the details page == | ||
| 461 | |||
| 462 | In this third page, which will detail the sales indicators by product family, we are going to add : | ||
| 463 | |||
| 464 | * A title (text) | ||
| 465 | * A description (text) | ||
| 466 | * Graphs: | ||
| 467 | ** Sales details by month | ||
| 468 | ** Comparison of turnover by product | ||
| 469 | ** Breakdown of sales by region | ||
| 470 | |||
| 471 | This third page will use the notion of section, i.e. this page (and the elements it contains) will be repeated and filtered according to the values in a table (List of product families). | ||
| 472 | |||
| 473 | === Adding the title === | ||
| 474 | |||
| 475 | (% style="line-height:1.2; text-align:justify" %) | ||
| 476 | To add the title : | ||
| 477 | |||
| 478 | 1. Click on the **Text** button. | ||
| 479 | 1. Click on an empty zone on the right-hand side of the page to create a text zone. | ||
| 480 | 1. Click on the menu button for the zone you have created and then click on **Edit**. | ||
| 481 | 1. In the text box, enter the following text: **Details for product family _KEYWORD_CATEGORY_** | ||
| 482 | |||
| 483 | (% class="box infomessage" %) | ||
| 484 | ((( | ||
| 485 | 💡 **_KEYWORD_CATEGORY_** is a keyword which will be replaced by the value of the product family concerned when the PDF report is generated. | ||
| 486 | ))) | ||
| 487 | |||
| 488 | (% start="5" %) | ||
| 489 | 1. Select the text then set the font size to **28** and centre. | ||
| 490 | 1. Click on **OK**. | ||
| 491 | 1. Resize and position the text box as shown below: | ||
| 492 | [[image:Page3_title_added_FR.png||alt="Titre ajouté"]] | ||
| 493 | |||
| 494 | (% style="line-height: 1.2; text-align: justify;" %) | ||
| 495 | === Add graphics === | ||
| 496 | |||
| 497 | (% style="line-height:1.2; text-align:justify" %) | ||
| 498 | To add graphics : | ||
| 499 | |||
| 500 | 1. In the **{{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} by Role** tab of the left panel, select the role containing your charts. | ||
| 501 | 1. Find the **Turnover Breakdown by Month** chart. | ||
| 502 | 1. Drag and drop the **Breakdown of turnover by month** graph from the left-hand panel onto the page. | ||
| 503 | 1. Do the same for the other 2 charts: **Comparison of turnover by product** and **Breakdown of turnover by region**. | ||
| 504 | 1. Resize and position the graph areas to obtain the following model: | ||
| 505 | [[image:Page3_flows_added_FR.png||alt="Graphiques ajoutés"]]\\ | ||
| 506 | 1. As on the previous page, activate **Final rendering **to check the rendering.\\ | ||
| 507 | |||
| 508 | (% class="box infomessage" style="line-height: 1.2; text-align: justify;" %) | ||
| 509 | ((( | ||
| 510 | 💡 If there are too many elements on your page, you can access each element from the **Objects **tab **on the page **and then access their properties by right-clicking on them. | ||
| 511 | [[image:Objects_on_page_FR.png||alt="Objets sur la page"]] | ||
| 512 | ))) | ||
| 513 | |||
| 514 | === Adding a section === | ||
| 515 | |||
| 516 | (% class="wikigeneratedid" %) | ||
| 517 | We're going to define a section to display this third page for each product family. To do this | ||
| 518 | |||
| 519 | 1. Select the **Sections** tab in the right-hand panel. | ||
| 520 | 1. The index corresponds to the page number. Select index **3** then click on **Add...** | ||
| 521 | ➡ The **Section Source** dialog box is displayed. | ||
| 522 | 1. Select the role used and then the **Product family list** table. | ||
| 523 | [[image:Add_section_FR.png||alt="Ajout section"]]\\ | ||
| 524 | 1. Click **OK**. | ||
| 525 | ➡ The section is added. It is also displayed below the page. | ||
| 526 | [[image:Section_added_FR.png||alt="Section ajoutée"]] | ||
| 527 | |||
| 528 | (% class="wikigeneratedid" %) | ||
| 529 | The template is now complete. Click **OK** at the bottom right of the window to save it and close the editor. | ||
| 530 | |||
| 531 | == Configuring word substitution == | ||
| 532 | |||
| 533 | The PDF report contains certain keywords which will need to be replaced by the data value when the report is generated. To do this, we set up a keyword substitution: | ||
| 534 | |||
| 535 | 1. In the **Properties **tab of the **{{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} Properties** box, click on **Configure**. | ||
| 536 | [[image:Configure_PDf_builder_FR.png||alt="Configurer"]] | ||
| 537 | 1. Click on the **Word Substitution** tab. | ||
| 538 | 1. Click on the **Add...** button. | ||
| 539 | 1. In the **Key** field,** enter **the keyword **_KEYWORD_CATEGORY_.** | ||
| 540 | 1. In the **Value** field, enter **${filter.Family}** then click** OK.** | ||
| 541 | [[image:Wod_substitution_FR.png||alt="Substitution de mots"]]\\ | ||
| 542 | 1. Repeat the operation to add a second substitution: | ||
| 543 | 1. In the **Key** field, enter the keyword **_KEYWORD_YEAR_.** | ||
| 544 | 1. In the** Value** field, enter **${filter.Date}**. | ||
| 545 | 1. Click **OK**. | ||
| 546 | |||
| 547 | The {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}} is now complete. | ||
| 548 | We will now create a dashboard with a button to run the PDF {{glossaryReference glossaryId="Glossary" entryId="fabrique de documents"}}document builder{{/glossaryReference}}. | ||
| 549 | |||
| 550 | = Step 4: Create the dashboard and generate the PDF report = | ||
| 551 | |||
| 552 | (% class="box infomessage" style="line-height: 1.2; text-align: justify;" %) | ||
| 553 | ((( | ||
| 554 | ℹ This part of the tutorial takes place in the Dashboard Editor and then in the Dashboard. | ||
| 555 | ))) | ||
| 556 | |||
| 557 | == Creating the dashboard page == | ||
| 558 | |||
| 559 | To create the **PDF Report **dashboard page **:** | ||
| 560 | |||
| 561 | 1. Launch the Dashboard Editor. | ||
| 562 | 1. Select the role you are using. | ||
| 563 | 1. Click the **+** button to create a new dashboard page and name it **PDF Report**. | ||
| 564 | [[image:New_page_PDF_report_FR.png||alt="New page"]] | ||
| 565 | |||
| 566 | == Adding a {{glossaryReference glossaryId="Glossary" entryId="Fabrique PDF"}}PDF builder{{/glossaryReference}} run button == | ||
| 567 | |||
| 568 | We're now going to add a button that will allow us to generate the PDF report from the dashboard page. | ||
| 569 | |||
| 570 | 1. From the **Additional content** tab, drag and drop a button onto the newly created empty page. | ||
| 571 | 1. Select the button and in the **Display** section of the right-hand panel, enter PDF in the **Text** field. | ||
| 572 | 1. In the **Actions** section, click the **Add** button. | ||
| 573 | 1. In the **Action** dialog box, select the **Run a PDF {{glossaryReference glossaryId="Glossary" entryId="fabrique de documents"}}document builder{{/glossaryReference}} type {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}}** action and then select the **PDF Report** flow. | ||
| 574 | [[image:Add_PDF_button_FR.png||alt="Ajout bouton PDF"]] | ||
| 575 | |||
| 576 | == Add a Date filter == | ||
| 577 | |||
| 578 | Here we add a Date filter which will allow us to select the desired year for the report. | ||
| 579 | |||
| 580 | 1. As it is not possible to add a filter to a page that does not contain any graphs, add the **Breakdown of turnover by region** graph from the **{{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} information **tab **(Existing graphs) **on the page. | ||
| 581 | [[image:Add_graph_dashboard_FR.png||alt="Ajout graphique"]]\\ | ||
| 582 | 1. From the **Filters/Variables** tab, add a filter on the **Date** dimension. | ||
| 583 | 1. In the filter properties panel, select **Date** and **Year **from the** Hierarchy **and **Level** drop-down lists. | ||
| 584 | 1. The report data will be filtered on a given year. In the **Display** section of the same panel: | ||
| 585 | 1*. Check the **Hide "All" item **box **.** | ||
| 586 | 1*. Check the box **Prohibit empty selection**. | ||
| 587 | 1*. Uncheck the **Multiple selection** box. | ||
| 588 | [[image:Add_filter_date_FR.png]] | ||
| 589 | |||
| 590 | == Generate the PDF report == | ||
| 591 | |||
| 592 | All that remains is to access the Dashboard and generate the PDF report. | ||
| 593 | |||
| 594 | 1. Click on the Dashboard access button [[image:1738571706912-923.png||alt="Accès Dashboard"]] and save your changes. | ||
| 595 | [[image:Save_DB_message_FR.png]] | ||
| 596 | 1. In the dashboard, select a year and then click on the **PDF** button to generate a PDF report. | ||
| 597 | |||
| 598 | For example, if we select 2019, we get the following report [[ tutoriel_rapport_CA_2019_Tous_202502031041.pdf>>attach:tutoriel_rapport_CA_2019_Tous_202502031041.pdf]] . | ||
| 599 | |||
| 600 | If we filter geographically at country level for France for the year 2018, we obtain the following report [[ tutoriel_rapport_CA_2018_France_202502031047.pdf>>attach:tutoriel_rapport_CA_2018_France_202502031047.pdf]] | ||
| 601 | |||
| 602 | = Congratulations! = | ||
| 603 | |||
| 604 | You've successfully created your first PDF {{glossaryReference glossaryId="Glossary" entryId="fabrique de documents"}}document builder{{/glossaryReference}}. | ||
| 605 | Now all you have to do is create your own report using your data! |