# Downloading DHIS2 Reports as PDF

**URL:** <https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165>\
**Category:** Support - Assistance technique\
**Created:** [31 August 2021 19:34 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165 "2021-08-31T19:34:41Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kibahila](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/k/47e85d/32.png) [@Kibahila](https://community.dhis2.org/u/Kibahila)\
**Post date:** [31 August 2021 19:34 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/1 "2021-08-31T19:34:41Z")

</div>

Hi All,  
I am currently facing some problems upon downloading my DHIS2 Dataset report as PDF in DHIS2 version 2.36, it displays the css styling which alters the structure of the report created,I need assistance on how i can download DHIS2 report without css styling. Thank you.

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [1 September 2021 09:14 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/2 "2021-09-01T09:14:00Z")

</div>

@Kibahila may I ask which app are you using to download the report? Is it through the Data Entry app, Maintenance app, or another app? Would you take a screenshot to show how it’s being downloaded and what’s expected? Thank you!

---

<div class="post-metadata">

**Author:** ![Kibahila](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/k/47e85d/32.png) [@Kibahila](https://community.dhis2.org/u/Kibahila)\
**Post date:** [2 September 2021 10:28 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/3 "2021-09-02T10:28:41Z")

</div>

@Gassim the app which i was using to download is in the Reports app \>Data set report \> Get Report (after defining the period and organization unit of the report) the report to expected to be viewed and the reports viewed is shown in the attachments

 ![image](https://dhis2.b-cdn.net/uploads/default/original/3X/2/6/26e5bc923ddec4bb0e513b2f1e73b9c276e95b71.png)

 ![image](https://dhis2.b-cdn.net/uploads/default/original/3X/f/2/f208df3c57ed629880670d5b4b26a463705b0542.png)

Expected report view

 ![image](https://dhis2.b-cdn.net/uploads/default/original/3X/a/0/a03b944a34d5ee706b83384d5a63a4d6588bf5b4.png)

How the report is viewed after downloading the pdf

 ![image](https://dhis2.b-cdn.net/uploads/default/original/3X/f/6/f6275840a0ba267d6f7fddce7b09bb3fc2aa1509.png)

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [2 September 2021 10:40 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/4 "2021-09-02T10:40:24Z")

</div>

Thank you for your quick response! Personally, I would use the browser’s Print as PDF (with selection only after selecting the form) as a temporary solution.

I think this is a bug so feel free to create a Jira issue while I FWD this! Thank you! (:

**UPDATE:** One question, please @Kibahila, is this a custom form or section form? If it’s a section form then this is a bug; however, if it is a custom form then I don’t think printing custom forms in PDF is supported “unless it’s a valid HTML table” (either way I’d still suggest creating a bug issue for the frontend developers). @Lars? Thanks!

---

<div class="post-metadata">

**Author:** ![Kibahila](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/k/47e85d/32.png) [@Kibahila](https://community.dhis2.org/u/Kibahila)\
**Post date:** [2 September 2021 11:07 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/5 "2021-09-02T11:07:52Z")

</div>

Thanks @Gassim for your response , actually the form is a custom form and upon downloading and viewing the form using the browser it still shows the same result, and yes i will do what is required on creating the Jira issue Thanks…

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [2 September 2021 11:11 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/6 "2021-09-02T11:11:44Z")

</div>

Sure thank you! And if you try to edit the HTML code of the form and make sure it’s a valid HTML table then it should work.

---

<div class="post-metadata">

**Author:** ![Kibahila](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/k/47e85d/32.png) [@Kibahila](https://community.dhis2.org/u/Kibahila)\
**Post date:** [3 September 2021 03:31 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/7 "2021-09-03T03:31:33Z")

</div>

Okay @Gassim so where do i edit the HTML of the report before downloading it.

PS: Here is the link of the Jira issue i created for this problem [[DHIS2-11705] - Jira](https://jira.dhis2.org/browse/DHIS2-11705)

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [3 September 2021 07:18 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/8 "2021-09-03T07:18:23Z")

</div>

@Kibahila thank you for the Jira issue, I added my vote and a comment with link to this topic! 👍

To answer your question I will copy the basic instructions from the docs, but I’d recommend you read through it! [Metadata- manage\_customform | DHIS2 Documentation](https://docs.dhis2.org/en/use/user-guides/dhis-core-version-master/configuring-the-system/metadata.html#manage_customform)

#### To create a custom form:

> 1. Open the **Maintenance** app and click **Data set**.
> 2. In the list, find the data set you want to add a custom form to.
> 3. Click the options menu and select **Design data entry form**.
> 4. In the editing area, create the custom form.
> 
> - Double-click on a object in the left-hand list to insert it in the form.
> - If you already have the HTML code for your form, click **Source** and paste the code.
> 
> 1. Select a **Form display style**.
> 2. Click **Save**.

---

<div class="post-metadata">

**Author:** ![Ulanbek](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/ulanbek/32/30685_2.png) [@Ulanbek](https://community.dhis2.org/u/Ulanbek)\
**Post date:** [2 November 2022 10:24 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/9 "2022-11-02T10:24:48Z")

</div>

Hi there,

I have the same problem with 2.37.8. Moreover there is another error shown while exporting to the Excel : Failed - Server problem

![image](https://dhis2.b-cdn.net/uploads/default/original/3X/a/5/a5c5fbd53bbfbee1b0b63951ac665445b5fffda8.png)

Yes it was reported a year ago but the issue has not been resolved yet:  
[https://dhis2.atlassian.net/browse/DHIS2-11705](https://dhis2.atlassian.net/browse/DHIS2-11705)

---

<div class="post-metadata">

**Author:** ![ahmed685](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/ahmed685/32/30073_2.png) [@ahmed685](https://community.dhis2.org/u/ahmed685)\
**Post date:** [7 February 2023 08:19 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/10 "2023-02-07T08:19:34Z")

</div>

Problem exists in 2.38 , please need help in this regard.

---

<div class="post-metadata">

**Author:** ![sele](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/sele/32/27970_2.png) [@sele](https://community.dhis2.org/u/sele)\
**Post date:** [6 March 2023 13:31 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/11 "2023-03-06T13:31:57Z")

</div>

I am facing the similar problem on downloading Validation rule results. On my testing server works fine, but failed on production. Two instance run on different containers but both are using the same version of war file.

---

<div class="post-metadata">

**Author:** ![sele](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/sele/32/27970_2.png) [@sele](https://community.dhis2.org/u/sele)\
**Post date:** [6 March 2023 13:35 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/12 "2023-03-06T13:35:42Z")

</div>

The war file version is 2.38.2.1

---

<div class="post-metadata">

**Author:** ![sele](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/sele/32/27970_2.png) [@sele](https://community.dhis2.org/u/sele)\
**Post date:** [6 March 2023 14:23 UTC](https://community.dhis2.org/t/downloading-dhis2-reports-as-pdf/44165/13 "2023-03-06T14:23:10Z")

</div>

In my case, after inspecting the API url, I have came to realize that the API url has double // after version 38. If I manually modify the URL by removing one of / it works fine.

[https://domainname/api/38//dataAnalysis/validationRules/report.xls?t=1678111001045](https://domainname/api/38//dataAnalysis/validationRules/report.xls?t=1678111001045)

I wonder, how can I solve the problem? Because my clients (end-users) will not be able to through the manually process!
