Sign in
Language
日本語 English

Articles in this section

  • Docutone Download Page
  • [TECH COLUMN] Output an Excel Form with docutone
  • [TECH COLUMN] Output a Word Form with docutone
  • [TECH COLUMN] Insert Charts in a PowerPoint File (Docutone)

[TECH COLUMN] Insert Charts in a PowerPoint File (Docutone)

Avatar
OPRO Support staff
  • October 08, 2024 05:53
  • Updated

"Chart" is this article's theme. We will introduce to you steps required when you give it a try for outputting a PowerPoint file with charts.

In this article, you use a sample "Opportunity" app,  a zip file of which is attached to this article (you can find it at the bottom), to output a chart indicating monthly sales.

For starters, create a PowerPoint file with chart settings. Let's start creating a template from a blank state!

 

Table of Contents:

1. Add-in Settings

2. Field Settings

3. Docutone Settings

 

1. Add-in Settings

Open a blank PowerPoint file and install an add-in "Document Designer for Office".

Go to the add-in store from "Get Add-ins" in "Insert" tab.
Search for the add-in by "OPRO", then add it.

add_ddo_addin.png

 

Adding this add-in shows the icon of it in "Insert" tab. Click it.
The start screen opens, so choose "OPROARTS".

ddo_addin_choose_oproarts.png

 

2. Field Settings

If you output forms using Docutone, you need to create form templates of "Header-Items" (where detail lines and other parts of a form are configured separately) type. 

Since you will a chart which only includes detail items (multiple records in kintone), set some dummy values for parts other than the detail items.

 

Enter "Dummy" in "Add fields" section in TextDataset1, and click [+] to create a dummy field.

Just creating it is OK because the value in this field won't be displayed in slides in a PowerPoint file.

add_dummy_field.PNG

 

Then, to configure the detail items (charts), click [Add a detail text-dataset] > [Add] to add TextDataset2 to the template file.

add_a_detail_textdataset_button.png

 

Let's move on to chart settings.

Suppose that you want to display total amounts for each month in a column chart.

Choose a column chart from "Chart" menu in "Insert" tab and insert it.
(Choose from charts listed in "Kinds of Charts Available for PowerPoint File Output".)

chart_inserted.PNG

 

"Category Name" is set for the horizontal axis as its default value.
This time, set "Opportunity" app's "Amount" field for the vertical axis and the "Month" of complete plan date for the horizontal axis.

To acquire "Amount" and "Month" data from kintone, enter "Amount,Month" into "Add fields" section of TD2 and click "+" button.

add_amount_month_fields.png

 

All necessary fields are created.
Change the data type of amount to "Number", not "Text". Leave the month field as it is.

change_datatype_from_text_to_number.PNG

 

Click a tab with a chart mark to open the chart settings tab.

Click "Add new definition".

graph_tab_add_definition.png

 

After adding a chart definition, select "TextDataset2" as a quote source.

select_textdataset2_as_source.png

 

Scroll down a little bit and specify "Category" of the chart.

In case of a column chart, which has a horizontal axis (category) and a vertical axis, keep "Do not specify category name" unchecked.

Since "Category" is displayed in the horizontal axis, choose "Month".

select_month_as_category.png

 

"Month" is set as category names (horizontal axis). Go on to select "Amount".
select_amount_as_data.png

 

"Amount" is set as Data1. This makes amount appear in the chart.

Click the clip button to copy a tag that represents this chart settings.

click_clip_button.png

 

Paste the copied tag into the frame of the chart title.

tag_inserted.PNG

 

All setting are done!

Save this PowerPoint file and upload it to Designer.

Click the upload tab in the add-in and click "Open the upload form".

open_upload_form_button.png

 

Name the template, attach the saved PowerPoint file and click "Create" at the lower-right corner to save.

create_template.png

 

* It is possible to reach the same upload menu by the following route.
  In Docutone app, click [START] button > [Create New] button >"PowerPoint">"Upload"

 

After the template is generated, click "Deploy" -> click "Deployment" to deploy the template to OPROARTS server.

template_deploy1.png

template_deploy2.png

 

3. Docutone Settings

Link the template to kintone apps in "Docutone" app.

The template you created in the previous chapter has both "Header" (like a parent, not-repeatable area) and "Items" (like children, repeatable area).
While "Opportunity" app should be linked to "Items", there is no kintone app which is supposed to be linked to "Header" part.

So you need to create a dummy app for a header part and to prepare a field in "Opportunity" app which links itself to the dummy header app.

 

(1) Add two fields to your target app.

* If you're trying steps using "Opportunity" app attached as a ZIP file in this article, this step is unnecessary.

1. Add a Calculated field to the app.

Enter "1" for the formula to make sure the returned value is always 1.

calculated_field_formula.PNG

 

2. Create a field that converts date values into strings in YYYY/MM format.

Put a text field and check "Calculate automatically", then enter this formula.

DATE_FORMAT(CloseDate, "YYYY/MM", "Etc/GMT")

text_field_formula.PNG

 

Just adding those fields doesn't change each record's value, so edit & save a record to display calculation results.

Calculation results are like below.

calculated_results_shown.png

 

(2) Create an App for Form Headers

Create an app for form headers (not displayed, dummy data) from scratch.
Then create a formula field on the app so that the calculation result is always "1".

parent_app_record.PNG

 

(3) Create a Form Output Button

Create a form output button on the header app you created in step (2).

Check the id of the app. In an example below, the id of the header app is "62".

Also check the id of "Opportunity" app in the same way.

header_app_id.png

 

So, let's create the button.

1. Open a "LAD" record in "Docutone" app or "OPROARTS Connector for kintone" app.

2. Click "Sync" to get the latest template information.

3. Click "Add" and enter the id of the header app.(In an example above, "62")

4. Check "Enable" and select the PowerPoint template.

select_ppt_template.png

 

5. Click "Mapping" button in Page Mapping section and link a field (whatever field is OK) to the dummy field.

Once you're done, click "x" to close the popup.

page_mapping.png

 

6. Click "Mapping" button in Repeatable Mapping section, check "Use Related Records" and click "Setting", and related-record-settings screen (settings for the apps other than the one you specified in step 3.) will open.

Enter the id of "Opportunity" app and set this condition.

Opportunity's "Parent ID" = "Parent ID"

repeatable_related_record_settings.png

Once you've set the condition formula, click "Close".

 

7. Click "Auto Mapping".

If the names of fields specified in the PowerPoint add-in are matched to the field names of "Opportunity" app, they are automatically linked to each other.

Close this popup with "x" button.

automapping_repeatable.png

 

8. Scroll down to the bottom and click "Save".

 

9. In the header app, open "Settings" > "Apps Settings" tab and select "Plug-ins".
From "Add plug-in" at upper-left corner, select "Docutone" or "OPROARTS Connector for kintone" plug-in and click "Add".

plugin_setting_link.png

add_plugin_button.PNG

add_docutone_plugin.png

 

10. Click the gear icon of the app you added in step 9, and an settings screen will open.

plugin_setting_gear_icon.png

 

Select "Docutone" or "OPROARTS Connector for kintone" app, click "Add" and select the PowerPoint output button you created.

add_created_buttons_plugin_settings.png

select_buttons_to_add.PNG

 

Configure so that the button is put on a record detail screen (which is default), save the settings.

save_plugin_settings.png

 

11. Go back to the setting screen of the header app and click "Update App".

update_app_button.png

 

Open a record of the app for form headers (any record is OK), click the output button, then you can output a PowerPoint file!

powerpoint_output.png

 

This time, we used a simple chart as an example.

You can also insert a line chart, a pie chart, etc.
* Another service "ViewFramer" of ours can be used to aggregate amounts by category name.

 

The template sample introduced in this article is attached to the bottom of this article.
You can use it freely, so don't hesitate to use it if you want to.

 

 

  • GraphSample.pptx
    50 KB Download
  • ChartSample_en.pptx
    50 KB Download
  • Opportunity_App_Template.zip
    3 KB Download
Return to top

Related articles

  • [TECH COLUMN] Output a Word Form with docutone
  • [TECH COLUMN] Output an Excel Form with docutone
  • [TECH COLUMN] Insert Charts in a PowerPoint File (Salesforce)
OPRO Co., Ltd.