Can't select parameter in Jasper reports

Hello,

One of our team members has tried to sent an email to the list but apparently it kept bouncing back. I’m forwarding Laura’s original message in lieu of her. Any help is appreciated.

Basically my take of the issue basically is that there are two parameters in a Jasper report, one of them (Org Units) gets populated, but the other (Reporting Period drop down) does not. Hence you cannot generate reports.

We have gone through underlying XML code to update SQL statement accordingly to reflect the schema changes from 2.4 to 2.13, but apparently there is no SQL snippet(s) that generate(s) reporting periods (or we’ve missed it).

A screenshot of the non-working drop down, and the current Jasper report design of the report are attached.

Thanks,

-Cenk.

D. Cenk Erdil, PhD

HMIS Manager

ICAP at Columbia University

From: Lincks, Laura E.
Sent: Monday, May 05, 2014 12:52 PM
To: DHIS 2 User Group

Subject: Can’t select parameter in Jasper report

We have a version of DHIS 2.13 running. It was upgraded from version 2.4 There are a series of Standard Jasper reports from the old version which do not run in 2.13.

The reports are of the type “Japser report with report table data source”. Most of the reports in question are generated by first selecting a Reporting Period and then an Organisation Unit as parameters. I am able to access the underlying Report table in DHIS 2.13 and I am prompted with the parameter selection screen but I cannot select the Reporting Period. Accessing the pulldown menu produces no list of dates. (The Organisation Unit tree appears and is accessible, but without passing a reporting period parameter, the report fails.)

While I can “Get current design” of the Standard Report I cannot edit or see the source of the associated Report Table which appears to be what passes the parameters to the standard report. I am new at generating Jasper reports in DHIS and don’t know what I am missing. Any help would be appreciated.

TIA.

Laura E. Lincks

Database Developer
ICAP - Columbia University

Mailman School of Public Health
60 Haven Ave, Floor B1

New York, NY 10032
Tel: 212 304 7132

image

CARTX 20 Bar Graph New ART - Gender Age By Quarter.jrxml.xml (20.6 KB)

Hello,

​T

here are two parameters in a Jasper report, one of them (Org Units) gets populated, but the other (Reporting Period drop down) does not. Hence you cannot generate reports.

We have gone through underlying XML code to update SQL statement accordingly to reflect the schema changes from 2.4 to 2.13, but apparently there is no SQL snippet(s) that generate(s) reporting periods (or we’ve missed it).

A screenshot of the non-working drop down, and the current Jasper report design of the report are attached.

Thanks,

Laura E. Lincks

Database Developer

ICAP - Columbia University

Mailman School of Public Health

60 Haven Ave, Floor B1

New York, NY 10032

Tel: 212 304 7132

CARTX 20 Bar Graph New ART - Gender Age By Quarter.jrxml.xml (20.6 KB)

Hi Cenk and Laura,

I think the way standard reports are implemented, and especially the parameters part, have changed a lot between 2.4 and 2.13, so I am quite sure that your old standard reports from 2.4 will not work out of the box in DHIS v. 2.13. And your email confirms that I guess…

I can’t remember exactly how it was changed, but what you can do is to create a new standard report in 2.13, choose “Jasper report with report table data source” under Type, and the click on “Get current design”. That should give you a template of what the xml format supported in 2.13 is. Open that file in a text editor and you will see that there is a section in the beginning where the parameters are listed.

Then I suggest you give it a try to merge the old report design with the new template and make sure you get the new format for parameters correct.

Sorry if this wasn’t very helpful. A search through the email archives for dev and user lists might give you better answers. I remember that at some point it was a rather painful upgrade of the standard reports, but that was a long time ago.

Maybe others have better memory of that than I do…

Ola

···

Ola Hodne Titlestad (Mr)
HISP
Department of Informatics
University of Oslo

Mobile: +47 48069736
Home address: Eftasåsen 68, 0687 Oslo, Norway. Googlemaps link

On 21 May 2014 19:10, D. Cenk Erdil dcerdil@gmail.com wrote:

Hello,

One of our team members has tried to sent an email to the list but apparently it kept bouncing back. I’m forwarding Laura’s original message in lieu of her. Any help is appreciated.

Basically my take of the issue basically is that there are two parameters in a Jasper report, one of them (Org Units) gets populated, but the other (Reporting Period drop down) does not. Hence you cannot generate reports.

We have gone through underlying XML code to update SQL statement accordingly to reflect the schema changes from 2.4 to 2.13, but apparently there is no SQL snippet(s) that generate(s) reporting periods (or we’ve missed it).

A screenshot of the non-working drop down, and the current Jasper report design of the report are attached.

Thanks,

-Cenk.

D. Cenk Erdil, PhD

HMIS Manager

ICAP at Columbia University

From: Lincks, Laura E.
Sent: Monday, May 05, 2014 12:52 PM
To: DHIS 2 User Group

Subject: Can’t select parameter in Jasper report

We have a version of DHIS 2.13 running. It was upgraded from version 2.4 There are a series of Standard Jasper reports from the old version which do not run in 2.13.

The reports are of the type “Japser report with report table data source”. Most of the reports in question are generated by first selecting a Reporting Period and then an Organisation Unit as parameters. I am able to access the underlying Report table in DHIS 2.13 and I am prompted with the parameter selection screen but I cannot select the Reporting Period. Accessing the pulldown menu produces no list of dates. (The Organisation Unit tree appears and is accessible, but without passing a reporting period parameter, the report fails.)

While I can “Get current design” of the Standard Report I cannot edit or see the source of the associated Report Table which appears to be what passes the parameters to the standard report. I am new at generating Jasper reports in DHIS and don’t know what I am missing. Any help would be appreciated.

TIA.

Laura E. Lincks

Database Developer
ICAP - Columbia University

Mailman School of Public Health
60 Haven Ave, Floor B1

New York, NY 10032
Tel: 212 304 7132


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi Cenk,

there is no link between the jasper reports format and the dhis version per
se, rather the jasper reports version, so it should not be necessary to
re-create the report design itself (unless there has been some breaking
changes in jasper lately).

By the way from your screenshot it seems this is version 2.15 and not 2.13.

Can you try to edit the standard report (click "edit" on the report in the
list of reports) and verify that type is set to "jasper report with jdbc
data source", and check that i) some relative periods are checked under
"relative periods" and that ii) both "reporting period" and "organisation
unit" are checked under "report parameters".

regards,

Lars