sql server - Birt filter data set -
i have sql code
select id1, ' ' id2, balance1, 0 balance2 table 1 union select ' ' id1, id2, 0 balance1, balance2 table 2
table 1 , table 2 have no relations, cannot use join.
in report template have created table binded data set columns sql code outputs.
i have put 2 detail rows in table this
head: id balance detail1: [id1] [balance1] detail2: [id2] [balance2]
i need filter out data table2 in detail1 , filter out data table1 in detail2. how do this?
also table report results crossing data this:
[id1] [balance1] [id2] [balance2] [id1] [balance1] [id2] [balance2]
and need 1 detail reuslt on top , 1 on bottom :
[id1] [balance1] [id1] [balance1] [id2] [balance2] [id2] [balance2]
how should set report template?
i think need query this:
select * ( select id1, ' ' id2, balance1, 0 balance2, 1 ord table 1 union select ' ' id1, id2, 0 balance1, balance2, 2 ord table 2 ) dt order ord, id1, id2
Comments
Post a Comment