Category: | Bug report |
Priority: | High |
Status: | New |
Project: | Severity: | Major |
Resolution: | Open |
|
Component: | Reproducibility: | N/A |
Assigned to: |
Hi, friends.
I want to reopen issue, because we forced stay in old JR (3.6.0) version.
In my opinion, problem is not in ordering (table contain one row and columns have value 1,2,3,4 accordingly).
Problem appears when column header have same (repeated) value.
History:
The following issue requires your FEEDBACK.
======================================================================
http://jasperforge.org/plugins/mantis/view.php?id=5281
======================================================================
Reported By: blosser
Assigned To: lucianc
======================================================================
Project: JasperReports Library
Issue ID: 5281
Category: Bugs
Reproducibility: always
Severity: major
Priority: high
Status: feedback
Add CC to mail:
======================================================================
Date Submitted: 06/22/2011 16:35
Last Modified: 11/16/2011 16:06
======================================================================
Summary: crosstab different behaviour 3.6.1 vs 3.6.2 and more
Description:
use crosstab with DataPresorter=true.
I think, that crosstab header can has same value in different colums. JR
3.6.1 works fine (in my opinion), but 3.6.2 was change calculation crosstab
header.
datasoure:
select '' gr, 'a' attr1, 'c1' h1, 'h1' h2, '1' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h2' h2, '2' val from dual union all
select '' gr, 'a' attr1, 'c1' h1, 'h1' h2, '3' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h2' h2, '4' val from dual
attach result 3.6.1 and 4.0.0 version
======================================================================
----------------------------------------------------------------------
(0010563) lucianc (administrator) - 11/16/2011 16:06
http://jasperforge.org/plugins/mantis/view.php?id=5281#c10563
----------------------------------------------------------------------
isDataPreSorted="true" requires that the data is presorted by a specific
order as explained at
http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/schema...
Are you sure your data is sorted accordingly? If that's not the case, the
outcome is unspecified.
Regards,
Lucian
Issue History
Date Modified Username Field Change
======================================================================
06/22/2011 16:35 blosser New Issue
06/22/2011 16:35 blosser Assigned To => teodord
06/22/2011 16:35 blosser File Added: s.jpg
11/16/2011 16:06 lucianc Note Added: 0010563
11/16/2011 16:06 lucianc Assigned To teodord => lucianc
11/16/2011 16:06 lucianc Status new => feedback
======================================================================
6 Comments:
Might be the same problem as the one in http://community.jaspersoft.com/ireport-designer/issues/2584
Might be, but don't understand what can i do? Do you plan fixed this problem in future version? File "report3.jrxml" to debug attached. Thanks.
That was mainly a note to myself. We do plan to fix that problem.
But I took a look at your report, and it doesn't meet the requirement of isDataPreSorted. See at http://jasperreports.sourceforge.net/schema.reference.html#crosstabDataset
Your data should be presorted by attr1, h2 and h1 but it's not. Switch the second and third selects in the query to have the proper presorting and the result will be fine.
before
select '' gr, 'a' attr1, 'c1' h1, 'h1' h2, '1' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h2' h2, '2' val from dual union all
select '' gr, 'a' attr1, 'c1' h1, 'h1' h2, '3' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h2' h2, '4' val from dual
after (change the second and third selects)
select '' gr, 'a' attr1, 'c1' h1, 'h1' h2, '1' val from dual union all
select '' gr, 'a' attr1, 'c1' h1, 'h1' h2, '3' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h2' h2, '2' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h2' h2, '4' val from dual
In result we have only two columns with val '1' and '3'. I think, that column header must be unique, else incorrect header.
For example, if we change h2 value for unique, all will be fine.
select '' gr, 'a' attr1, 'c1' h1, 'h1' h2, '1' val from dual union all
select '' gr, 'a' attr1, 'c1' h1, 'h2' h2, '3' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h3' h2, '2' val from dual union all
select '' gr, 'a' attr1, 'c2' h1, 'h4' h2, '4' val from dual
lucianc, what do you think, what result set i must have, that result will be as attach file (with isDataPreSorted=true)?
I don't understand the exact result you expect. Do you want each record to produce a crosstab column? And how should the columns be ordered?
I want to get final result as attached file in my previous message. Different column header can have same value. What do you think, what result set i must have, that result will be as attach file (with parameter isDataPreSorted=true)?