agoldchleger Posted September 2, 2022 Share Posted September 2, 2022 Hi there,I have data that looks like this:AnimalClassAnimalQtyClassQtyDogMammal5080CatMammal3080ParrotBird2030HummingbirdBird1030So basically ClassQty is calculated in the database as a window function over the Class filed. I have the data above in the detail band of my report, and would like to have the animal class totals at the end of the report (I tried the summary band), such as:ClassClassQtyMammal80Bird30However, the naive approach of just placing the fields in the Summary band does not work, as I get a single row for the animal class of the last row in the detail band:ClassClassQtyBird30I tried to fiddle with evaluation time properties, but to no avail. I figure that I could just stick a subreport and be done with it, but I wonder if there is a cleaner solution that I might be overlooking. Link to comment Share on other sites More sharing options...
Solution yama818 Posted September 3, 2022 Solution Share Posted September 3, 2022 I know this is not a smart solution, but it could be accomplished by using a wrist component for the summary band.* Preview* Design * SQLTo use the list component, a sub-dataset is required.The SQL for this sub-dataset should be written as followsselect class,sum(animalqty) as classqtyfrom test.t27group by class Link to comment Share on other sites More sharing options...
agoldchleger Posted September 5, 2022 Author Share Posted September 5, 2022 Thank you, it works and it is better than adding a subreport just for that. 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