Downloading DHIS2 Reports as PDF

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.

@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!

@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

Expected report view

How the report is viewed after downloading the pdf

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!

1 Like

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…

1 Like

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.

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 Log in - DHIS 2 JIRA

1 Like

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

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

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.
1 Like

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

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

1 Like