Sub-Queries in Jasper reports

I have a unique scenario here. I have a report which is supposed to list monthly data BUT one of the columns will be a percentage of the quarterly figures.

See Below sample data

ANC Visits Percentage of Quarter

Facility 1 January 100 100/(100+150+123)

Facility 1 February 150 150/(100+150+123)

Facility 1 March 123 123/(100+150+123)

Facility 2 January 112 112/(112+156+145)

Facility 2 February 156 156/(112+156+145)

Facility 2 March 145 145/(112+156+145)

Facility N

From the above data, column Percentage of Quarter should use data from the other three columns (January+February+March) and I guest I need a sub-query for this. How do I go about this.

Regards,

Moses Marimo

Hey apologies. I just send an email from a colleague's computer. Anyway, a
bit of more information. I need all columns to be in the detail section. I
could used sub totals to get the total for the three months but them, the
design of the report becomes distorted. Is this practical???

···

On Thu, Nov 27, 2014 at 9:28 AM, Morina Matasi <morena.motsieng@gmail.com> wrote:

I have a unique scenario here. I have a report which is supposed to list
monthly data BUT one of the columns will be a percentage of the quarterly
figures.

See Below sample data

                                        ANC Visits
Percentage of Quarter
Facility 1 January 100
100/(100+150+123)
Facility 1 February 150
150/(100+150+123)
Facility 1 March 123
123/(100+150+123)
Facility 2 January 112
112/(112+156+145)
Facility 2 February 156
156/(112+156+145)
Facility 2 March 145
145/(112+156+145)
....
....
....
Facility N

From the above data, column Percentage of Quarter should use data from the
other three columns (January+February+March) and I guest I need a sub-query
for this. How do I go about this.

Regards,

Moses Marimo

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

--
ICT Warehouse (Pvt) Ltd - "The Stockist of *e*-nnovation"
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: *www.ict.co.zw <http://www.ict.co.zw>*

Innovative solutions in Web Design and E-Commerce, Software Engineering,
Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT
Solutions and Consultancy.

Hi Moses,

See this link. It is possible to do multiple queries within ireport using sub datasets and tables.

http://www.oodlestechnologies.com/blogs/Using-Jasper-Reports-Part-3-(Datasets–and-Table-component-in-Jasper-Reports).

Good luck.

Alex

···

On Thu, Nov 27, 2014 at 10:38 AM, Moses Marimo marimo@ict.co.zw wrote:


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

Hey apologies. I just send an email from a colleague’s computer. Anyway, a bit of more information. I need all columns to be in the detail section. I could used sub totals to get the total for the three months but them, the design of the report becomes distorted. Is this practical???

On Thu, Nov 27, 2014 at 9:28 AM, Morina Matasi morena.motsieng@gmail.com wrote:

I have a unique scenario here. I have a report which is supposed to list monthly data BUT one of the columns will be a percentage of the quarterly figures.

See Below sample data

ANC Visits Percentage of Quarter

Facility 1 January 100 100/(100+150+123)

Facility 1 February 150 150/(100+150+123)

Facility 1 March 123 123/(100+150+123)

Facility 2 January 112 112/(112+156+145)

Facility 2 February 156 156/(112+156+145)

Facility 2 March 145 145/(112+156+145)

Facility N

From the above data, column Percentage of Quarter should use data from the other three columns (January+February+March) and I guest I need a sub-query for this. How do I go about this.

Regards,

Moses Marimo


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

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

Alex Tumwesigye

Technical Advisor - DHIS2,
Ministry of Health/AFENET

Kampala

Uganda

IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya

IT Specialist (Servers, Networks and Security, Health Information Systems - DHIS2 ) & Solar Consultant

+256 774149 775, + 256 759 800161

"I don’t want to be anything other than what I have been - one tree hill "