Jump to content
We've recently updated our Privacy Statement, available here ×

tech_sb

Members
  • Posts

    3
  • Joined

  • Last visited

tech_sb's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I'm new to Ireport (v4.7.1). I want to store database data retrieved with SQL commands in a two dimmensional array where the "x-axis" must be one of the DB fields and the "y-axis" must be the remaining fields according to a field grouping. After this "first run", the data array will be used as a summary data source at the end of the report. I think the best explanation for my requirement is an example: DB data: field1 | field2 | field3 | field4 | --------|---------|---------|--------| 2011 | G1 | X1 | 21 | 2012 | G1 | X2 | 22 | 2013 | G1 | X3 | 23 | 2014 | G1 | X4 | 24 | 2015 | G2 | X1 | 25 | 2016 | G2 | X3 | 26 | 2017 | G3 | X1 | 27 | 2018 | G3 | X2 | 28 | 2019 | G3 | X3 | 29 | 2020 | G3 | X5 | 30 | ---------|---------|---------|--------| I want to store the above data in a 2-dim array so the Report Output must read: ---------|--------|--------|--------| label1 | G1 | G2 | G3 | ---------|--------|--------|--------| X1 | 21 | 25 | 27 | X2 | 22 | 0 | 28 | X3 | 23 | 26 | 29 | X4 | 24 | 0 | 0 | X5 | 0 | 0 | 30 | ---------|--------|--------|--------| Note that field2 (G1,G2,G3...) becomes the Heading Label for the Report. Note that not all DB records have data for a particular combination (G1,G2..) and therefore its value must be '0' or 'blank'. Any help to define, populate and read this array will be appreciated.
  2. Hi liw, Would you be so kind to post the code for the first part of your question? That is, the scriplet to populate the array and how to display the array contents in the detail band and on the summary band as well? I am new to iRepor and it will be great to get your help.
  3. I'm new to Ireport (v4.7.1). I want to store database data retrieved with SQL commands in a two dimmensional array where the "x-axis" must be one of the DB fields and the "y-axis" must be the remaining fields according to a field grouping. After this "first run", the data array will be used as a summary data source at the end of the report. I think the best explanation for my requirement is an example: DB data: field1 | field2 | field3 | field4 | --------|--------|--------|--------| 2011 | G1 | X1 | 21 | 2012 | G1 | X2 | 22 | 2013 | G1 | X3 | 23 | 2014 | G1 | X4 | 24 | 2015 | G2 | X1 | 25 | 2016 | G2 | X3 | 26 | 2017 | G3 | X1 | 27 | 2018 | G3 | X2 | 28 | 2019 | G3 | X3 | 29 | 2020 | G3 | X5 | 30 | --------|--------|--------|--------| I want to store the above data in a 2-dim array so the Report Output must read: ---------|--------|--------|--------| label1 | G1 | G2 | G3 | ---------|--------|--------|--------| X1 | 21 | 25 | 27 | X2 | 22 | 0 | 28 | X3 | 23 | 26 | 29 | X4 | 24 | 0 | 0 | X5 | 0 | 0 | 30 | ---------|--------|--------|--------| Note that field2 (G1,G2,G3...) becomes the Heading Label for the Report. Note that not all DB records have data for a particular combination (G1,G2..) and therefore its value must be '0' or 'blank'. Any help to define, populate and read this array will be appreciated.
×
×
  • Create New...