Failed to print the multi-row dataset in XReports

I set the XReport PDF Renderer. When I select the range from 2016 to 2017 and then click on “Request Report” button. A PDF file is downloaded which has only one row.

https://modules-refapp.openmrs.org/openmrs/xreports/reportParameter.page?reportId=2

Although if i select the “Web Preview” renderer then a list of hundreds of patients is listed there.

@hpardess can you try again now?

Logged in but I see NPE in home page.

Can you try again now?

Thank you so much. now it is working.

Is there a property to be set in report designer to render multiple rows?

Under “Design Items”, you need to double click each item to bring the properties dialog. Then on the “Data Type” row change from “Point Pos” to “X Pos”. You will also need to use version 1.10.0 of the module.

1 Like

which renderer should i select to display the report like this,

That would be the XReports (PDF) renderer.

I don’t think so becuasuse the URL for XReprt renderer is https://modules-refapp.openmrs.org/openmrs/moduleServlet/xreports/reportDownloadServlet?renderer=true&formId=2

while for another renderer the URL is different based on my local http://localhost:9999/openmrs/xreports/reportRunner.page?reportId=3&groupId=3

therefore, following URL will render the report as i need, but dont know which renderer is this. I tried many https://modules-refapp.openmrs.org/openmrs/xreports/reportRunner.page?reportId=2

Oh, do you mean just displaying the report without exporting it to PDF?

Want to display the report as PDF without downloading it.

For what purpose?

The users want to see the report before it automatically get downloaded to in their local machine. If they want they can directly print or just save the PDF locally.

I checked and found that previous behavious of default XReport render is changed in this commit which is made in Mar 24 2017

return new ModelAndView(“redirect:/xreports/reportRunner.page?reportId=” + id + group);

is replaced with

return new ModelAndView(new RedirectView(“…/reporting/reports/reportHistoryOpen.form?uuid=” + rr.getUuid()));

that is the reason the report is displayed in legacy UI.

Should i give you a global property to set in order to revert to old behaviour?

//return new ModelAndView(“redirect:/xreports/reportRunner.page?reportId=” + id + group);

above line is commented in new release. I would prefer to have this type in drop-down to be to able select it. So i will have option either see the report in PDF window or Legacy UI or auto download the PDF.

I mean the renderer type should be passed as parameter.

Can you create a ticket for this?

here I have created the ticket : https://issues.openmrs.org/browse/XREP-4

Can you test the module that i have attached on the ticket? For the default behaviour, you will need to select the “XReport” renderer. For direct PDF download, you need to select the “XReport (PDF)” renderer.

I have tested the attached module and Now I can render the report as I used to do when I select the XReport renderer.

here is the renderer dropdown from two different reports,

<select name="selectedRenderer">
    <option value="org.openmrs.module.reporting.web.renderers.DefaultWebRenderer">Web Preview </option>
    <option value="org.openmrs.module.xreports.web.XReportRenderer!8cdc700e-e9a0-4eca-b93f-7ad7629aa3b2">XReport </option>
</select>

<select name="selectedRenderer">
<option value="org.openmrs.module.reporting.web.renderers.DefaultWebRenderer">Web Preview </option>
<option value="org.openmrs.module.xreports.web.XReportRenderer!6573a637-eaf6-4877-8f44-47c6342bc932">XReport PDF (Download) </option>
<option value="org.openmrs.module.xreports.web.XReportRenderer!0abe77ab-309f-4884-981f-379f0223dd83">XReport </option>
</select>

Why do we have UUID at end of the renderer type? That UUID is also not similar based on renderer type and neither it is report UUID.

org.openmrs.module.xreports.web.XReportRenderer !0abe77ab-309f-4884-981f-379f0223dd83