[[reporting-getting-started]]
= Reporting and sharing

[partintro]

--
:frontmatter-description: {kib} provides you with several options to share *Discover* saved searches, dashboards, *Visualize Library* visualizations, and *Canvas* workpads with others, or on a website.
:frontmatter-tags-products: [kibana]

{kib} provides you with several options to share *Discover* saved searches, dashboards, *Visualize Library* visualizations, and *Canvas* workpads.

You access the options from the *Share* menu in the toolbar. The sharing options include the following:

* *PDF Reports* &mdash; Generate and download PDF files of dashboards, visualizations, and *Canvas* workpads. PDF reports are a link:https://www.elastic.co/subscriptions[subscription feature].

* *PNG Reports* &mdash; Generate and download PNG files of dashboards and visualizations. PNG reports are a link:https://www.elastic.co/subscriptions[subscription feature].

* *CSV Reports* &mdash; Generate and download CSV files of saved searches. <<csv-limitations,Certain limitations apply>>.

* *CSV Download* &mdash; Generate and download CSV files of *Lens* visualizations.

* *Get links* &mdash; Share direct links to saved searches, dashboards, and visualizations.

* *Download as JSON* &mdash; Generate and download JSON files of *Canvas* workpads.

* beta[] *Share on a website* &mdash; Download and securely share *Canvas* workpads on any website.

* *Embed code* &mdash; Embed fully interactive dashboards as an iframe on web pages.

[[reporting-on-cloud-resource-requirements]]
NOTE: For Elastic Cloud deployments, {kib} instances require a minimum of 2GB RAM to generate PDF or PNG reports. To
change {kib} sizing, {ess-console}[edit the deployment].

For more information on how to configure reporting in {kib}, refer to <<secure-reporting,Configure reporting in {kib}>>

[float]
[[manually-generate-reports]]
== Create reports

Create and download PDF, PNG, or CSV reports of saved searches, dashboards, visualizations, and workpads.

[[reporting-layout-sizing]]
The layout and size of the report depends on what you are sharing.
For saved searches, dashboards, and visualizations, the layout depends on the size of the panels.
For workpads, the layout depends on the size of the worksheet dimensions.

To change the output size, change the size of the browser, which resizes the shareable container before the report generates. It might take some trial and error before you're satisfied.

In the following dashboard, the shareable container is highlighted:

[role="screenshot"]
image::user/reporting/images/shareable-container.png["Shareable Container"]

. Open the main menu, then open the saved search, dashboard, visualization, or workpad you want to share.

. From the toolbar, click *Share*, then select the report option. 

* If you are creating dashboard PDFs, select *Optimize for printing* to create printer-friendly PDFs with multiple A4 portrait pages and two visualizations per page.
+
NOTE: When you create a dashboard report that includes a data table or saved search, the PDF includes only the visible data.

* If you are creating workpad PDFs, select *Full page layout* to create PDFs without margins that surround the workpad.

. Generate the report.

. When the report generates, a message appears. On the message, click **Download report**.

. To view and manage reports, open the main menu, then click *Stack Management > Reporting*.

NOTE: Reports are stored in {es} and managed by the `kibana-reporting` {ilm}
({ilm-init}) policy. By default, the policy stores reports forever. To learn
more about {ilm-init} policies, refer to the {es}
{ref}/index-lifecycle-management.html[{ilm-init} documentation].

[float]
[[csv-limitations]]
=== CSV reports limitations

include::reporting-csv-limitations.asciidoc[]

[float]
[[share-a-direct-link]]
== Share direct links

Create and share direct links to saved searches, dashboards, and visualizations. To access the shared object, authentication is required.

. Open the main menu, then open the saved search, dashboard, or visualization you want to share.

. From the toolbar, click *Share*, then select *Get links*.

. Specify how you want to generate the link:

* To display only the current state of the object, select *Snapshot*.

* To display up-to-date changes, select *Saved object*.

* To generate a shortened link, select *Short URL*.

* To automatically log in anonymous users when you have multiple authentication providers enabled, select *Public URL*.
+
[role="screenshot"]
image::images/permalink-public-url.png[Permalink share menu with Public URL option highlighted]
+
NOTE: *Public URL* is available only when anonymous access is configured and your anonymous service account has privileges to access what you want to share. For more information, refer to <<anonymous-authentication,Anonymous authentication>>.

. Click *Copy link*.

[float]
[[download-as-json]]
== Create JSON files

Create and share JSON files for workpads.

. Open the main menu, then click *Canvas*.

. Open the workpad you want to share.

. From the toolbar, click *Share*, then select *Download as JSON*.

[float]
[[add-workpad-website]]
== Share workpads on a website

beta[] Create and securely share static *Canvas* workpads on a website. To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.

. Open the main menu, then click *Canvas*.

. Open the workpad you want to share.

. Click *Share > Share on a website*.

. To customize the workpad behavior to autoplay the pages or hide the toolbar, use the inline parameters.
+
To make sure that your data remains secure, the data in the JSON file is not connected to {kib}. *Canvas* does not display elements that manipulate the data on the workpad.
+
NOTE: Shareable workpads encode the current state of the workpad in a JSON file. When you make changes to the workpad, the changes do not appear in the shareable workpad on your website.

. To change the settings, click the settings icon, then choose the settings you want to use.

[float]
[[embed-code]]
== Embed code

Display your dashboards on an internal company website or personal web page with an iframe. To embed other {kib} objects, manually create the HTML code.

For information about granting access to embedded dashboards, refer to <<kibana-authentication>>.

. Open the main menu, then open the dashboard you want to share.

. Click *Share > Embed code*.

. Specify how you want to generate the code:

* To display the current state, select *Snapshot*.

* To display up-to-date changes, select *Saved object*.

* Select the dashboard components you want to share.

* To generate a shortened link, select *Short URL*.

* To automatically log in anonymous users when you have multiple authentication providers enabled, select *Public URL*.
+
[role="screenshot"]
image::images/embed-code-public-url.png[Embed code share menu with Public URL option highlighted]
+
NOTE: *Public URL* is available only when anonymous access is configured and your anonymous service account has privileges to access what you want to embed. For more information, refer to <<anonymous-authentication,Anonymous authentication>>.

. Click *Copy iFrame code*.

--

include::automating-report-generation.asciidoc[]
include::reporting-troubleshooting.asciidoc[]
