Hi

For few days I'm trying to create a report using JasperReports and I'm stucked.

Basically I want to mix fixed number of columns with some dynamically generated.
Fixed columns are taken from a standard query:
SELECR field1, field2... id1 FROM Table1
I also have a second table with pairs Name:Value (these are mine
dynamic columns):
SELECT Name, Value FROM table2 where id1 = id2

What I'm trying to build is:

header: field1_name | field2_name | Name1 | Name2 | Name3
deatils: field1_value  | field2_value | Value1 | Value2 | Value3...

I have to somehow merge those names with fields from first query. I
could select it in one query and group it later but I still don't know
how to dynamically create those columns.

I tried it with crosstabs but (as far as I understood them) it can do
just some grouping and measurements and I can't create few columns .
Is it possible?

I was thinking about creating some custom data source which will
automatically translate values from second query into fields and merge
it with first query. However the problem is that I do not know how
many records I will return and I can't define static jasper template
for it. I will have to probably generate that template on the fly for
each query.

I'm really struggling with this report and I think I'm stucked now. Do
anyone know how to resolve such a problem and if it's even possible in
JasperReports?

best regards,
Radek


_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to