Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put Row SubTotals at Bottom Instead of Top #12

Open
j8lp opened this issue Sep 21, 2016 · 31 comments
Open

Put Row SubTotals at Bottom Instead of Top #12

j8lp opened this issue Sep 21, 2016 · 31 comments

Comments

@j8lp
Copy link

j8lp commented Sep 21, 2016

Is there a way we can put the row subtotals at the bottom of its parent row instead of at the top of its parent row. For example:
http://nagarajanchinnasamy.com/subtotal/examples/

Is there a way we can get the total number of Female Voters to appear at the bottom of the Female row instead of at the top?

@nagarajanchinnasamy
Copy link
Owner

Hi, Currently its not possible to put the subtotals as the last row of the parent. I will take this as an enhancement request and if it doesn't impact the performance, I will try to implement it. If implemented, I will make it configurable through an option.

Thanks for the feedback.

@Dams591
Copy link

Dams591 commented Dec 28, 2016

Hey @nagarajanchinnasamy
Any progress on this ? any idea how I could do that easily ? Been trying for quite a long time and I have to say I'm struggling. Also any idea how to not display subtotals when expanding ?
Thanks.
Damien.

@Dams591
Copy link

Dams591 commented Dec 28, 2016

To me the secret is inside buildRowHeaders, but can't modify it easily.

@nagarajanchinnasamy
Copy link
Owner

Hiding subtotals when expanding is addressed in #26

@nagarajanchinnasamy
Copy link
Owner

@j8lp @Dams591 When I started writing this plugin, unknowingly :( I have made a strong assumption that the subtotal row goes on top. This will need major refactoring of the code.

I will keep this in my TODO list definitely. But will need more time.

@nagarajanchinnasamy
Copy link
Owner

As @Dams591 put it rightly, the secret is in buildRowHeaders. But it shouldn't be that difficult :)

One of you want to give it a try? Otherwise, i will come to this after completing work on "Hide On Expand" feature.

@Dams591
Copy link

Dams591 commented Feb 2, 2017

I'm still integrating the hide on expand into my solution, since I have the multiple values on and some other things I'm having a tough time but I'm getting there. Once I have it I'll give it a try. Let me come back to you in 2-3 days.

@nagarajanchinnasamy
Copy link
Owner

I guess, we just need to alter the way recursion is done. No other changes may be needed.... hopefully :)

@nagarajanchinnasamy
Copy link
Owner

Just played around changing the method of recursion. It does not help. It is tough!!!

@nagarajanchinnasamy
Copy link
Owner

Points to remember are:

  • Current logic makes use of row-span, which is always upper-row-to-lower-row expansion in HTML
  • Expand and Collapse operations affect the parent header's row-span values

So, the secret is in buildRowHeaders, collapseRow and expandRow functions :)

@Kishan1824
Copy link

Repsected

I just tried to modified buildRowHeaders function to bind subtotal below the row, but nothing happened.
So please try on that to resolve this issue.

Thanks

@Kishan1824
Copy link

Respected

Is there any way to display sub-total below the row.
If possible then please suggest.

Waiting for positive reply.

Thanks

@Dams591
Copy link

Dams591 commented Aug 14, 2017

Hey @nagarajanchinnasamy
Did you have the time to work on this ? Still can't figure it out :(

@nagarajanchinnasamy
Copy link
Owner

Sorry for the delayed response. I am working on it. Scheduled for release v1.11.0.. May take couple of more weeks minimum.

@hkbeer
Copy link

hkbeer commented Sep 20, 2017

Yes please create this Subtotal at the bottom option. It is very important. Thanks

@nagarajanchinnasamy
Copy link
Owner

Column Collapsing, Row collapsing and showing row subtotals at the bottom implemented. Please check latest v1-11.0 branch. Pending: Row expansion when displaying subtotals at the bottom.

Am using examples/210_collapse_rowscols.html to test and debug.

@Kishan1824
Copy link

Kishan1824 commented Oct 4, 2017 via email

@nagarajanchinnasamy
Copy link
Owner

nagarajanchinnasamy commented Nov 26, 2017

@KishanManali1824 and friends,

Please check the latest version at v1-11.0 branch. I will merge this branch into master after your confirmation.

Thanks :)

@Kishan1824
Copy link

Kishan1824 commented Nov 27, 2017 via email

@Kishan1824
Copy link

Respected @nagarajanchinnasamy

Its working fine for Row Sub-Total Display Below Property.
Thanks for great work.
Now can i achieve this below requirement in same updation.
Please check my below issue.

I want demo1.png image report type Row & Column Sub-Total Label in our new demo2.png report.
Please check both images.
demo1
demo2

@Kishan1824
Copy link

Respected @nagarajanchinnasamy

I found one issue in updation.
See my attachment.
Waiting for reply.
demo3

@nagarajanchinnasamy
Copy link
Owner

@KishanManali1824 Thanks for testing :)

Thats not an issue. Its an enhancement implemented to show the details in the same line when the number of children is one. In your case, RAIL has only one child NORTH. So, the details of NORTH and RAIL will be same. Instead of repeating the same details for RAIL and NORTH, we now show the details in one single row. Hope that explains.

@Kishan1824
Copy link

Kishan1824 commented Nov 28, 2017 via email

@nagarajanchinnasamy
Copy link
Owner

@KishanManali1824

Thats not addressed in this version. Please create a new issue to track it separately.

One small request :) Please feel free to address me as @nagarajanchinnasamy 👍

@Kishan1824
Copy link

Kishan1824 commented Nov 29, 2017 via email

nagarajanchinnasamy added a commit that referenced this issue Dec 3, 2017
* [#38] Initial Expand/Collapse Behavior

* [#38, #12] Initial Expand/Collapse Behavior, Row subtotal at bottom

* rowSubtotalDisplay.displayOnTop: true/false introduced

* subtotal at bottom - row collapse implemented

* bug fixes when using combinations of options

* complete rewrite

* code cleanup

* code cleanup

* code cleanup

* code refactoring

* code refactoring

* Code refactoring

* code re-factoring

* code cleanup

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* code refactoring
@Kishan1824
Copy link

Kishan1824 commented Dec 7, 2017 via email

@nagarajanchinnasamy
Copy link
Owner

@KishanManali1824

In the latest v1.11.0-alpha.0 release now we show subtotal when a parent number of children is 1. Please check and let me know if there are any issues.

Thanks for your feedback 👍

@Kishan1824
Copy link

Kishan1824 commented Dec 7, 2017 via email

@nagarajanchinnasamy
Copy link
Owner

Pls create a separate issue regarding download. Thanks :-)

@Kishan1824
Copy link

Kishan1824 commented Dec 8, 2017 via email

@Kishan1824
Copy link

Kishan1824 commented Dec 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants