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

clearfacts

Members
  • Posts

    6
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by clearfacts

  1. I don't think there is a 'native' way of achieving this. If your datasource is an SQL query which you may edit yourself, pre-calculating the AVG subtotals and adding them to the resultset will certainly work. Query based on your example dataset: SELECT summary.*, detail.myscoreFROM(SELECT myset, AVG(myscore) AS avg_scoreFROM ( SELECT 'Set_1' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_1' AS myset, 80 AS myscore FROM dual UNION ALL SELECT 'Set_1' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 75 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 20 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 95 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 80 AS myscore FROM dual ) aliasGROUP BY myset) summary left join ( SELECT 'Set_1' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_1' AS myset, 80 AS myscore FROM dual UNION ALL SELECT 'Set_1' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 75 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 20 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 90 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 95 AS myscore FROM dual UNION ALL SELECT 'Set_2' AS myset, 80 AS myscore FROM dual ) detail ON summary.myset = detail.myset[/code]
  2. Don 't know whether there is a native 'json' datasource solution to this. Arrays are indeed more 'natural' for your result set. Another (hard) way of doing this (like I did for my project) is to write a custom QueryExecuter(Factory), JRDataSource and JRFieldsProvider that parses your JSON result set and provides your required fields and values to iReport... There's plenty of (not so very good) documentation on how to do this but to make all the pieces fit together is not straightforward.
  3. I fear the answer is no. You can 't access the crosstab variables outside the crosstab. Would be a nice feature though (eg. for calculating running totals based on calculated crosstab cells). See: http://stackoverflow.com/questions/11715857/ireports-creating-charts-using-crosstab-total-variables "As per my understanding for reporting with iReports, it is not possible to use those variables that are defined in the crosstab in charts. Crosstab is a seperated component from charts. All the variable that are defined in the crosstab are defined in the scope of the Crosstab only."
  4. Hi, Is it possible to make Jasper calculate a running total for the detail cells in my Crosstab? I've got one fixed 'Dummy' Row Group and one real Column group (Month) and several financial measures within th e detail cells. For a financial (accounting) report a running total is unmissable. BTW, I can't do this calculation in SQL as I'm using a custom JRDataSource which doesn 't support this. I spent half a day searching for this and can 't find it so I suppose this is not possible? I thought about implementing a JRExtendedIncrementer(Factory) but I guess that won 't make this possible either? Any suggestions? Thanks for the help! Thomas.
  5. Its the latin characters (é, ö, ...) causing the problem. Open the northwind.json file in notepad and save with UTF-8 encoding.
  6. Hi, I only seem to get this working with simple field names (eg. title) and not with a json path (eg. GlossDiv.title). It then just shows an empty result (not 'null') and no errors are thrown. When I use glossary.GlossDiv as my report query I can show its titles... I'm working with iReport version 4.7. Any ideas?
×
×
  • Create New...