vasu016 Posted April 8, 2009 Share Posted April 8, 2009 Hi, Jan Feb Hard 20 30 Soft 10 40 Rows names are static:Columns are dynamic based on Month FieldData Fields are sum of HardLimit, sum of SoftLimit (group by customerId Field). Is it possible to place static text as rows and data fields should different fields, I am able to replace groupname field with static text in one row (ex: customerId group, replaced with Hard), but I am not able to place one more row with static text. Thanks in advance Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted April 8, 2009 Share Posted April 8, 2009 no, you have to keep in mind that the crosstab is data driven, so I assume your data is organized like that:type, month, limit sumHard, Jan, 100Soft, Jan, 101Hard, Feb, 102Soft, Feb, 103....If the data is not in that form, you need to force it to be like that.A solution could be a custom datasource (implementation of net.sf.jasperreports.engine.JRDataSource) that takes your data and reorganize it.Another solution could be a better query:select "Hard" as type, HardLimit as limit, month from limitsunionselect "Soft" as type, SoftLimit as limit, month from limits;Giulio Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now