Divide column data into equal parts

  • drew.allen - Thursday, January 11, 2018 7:33 AM

    Jeff Moden - Wednesday, January 10, 2018 7:11 PM

    drew.allen - Wednesday, January 10, 2018 9:17 AM

    He has a columnar report that fills the columns top-to-bottom then left-to-right.  He wants to change the order of the fill to left-to-right then top-to-bottom.

    This is a presentation issue, as I previously stated, and should be handled in the presentation layer (SSRS).  It's been awhile since I worked with SSRS, so I'm not sure how to handle this in SSRS.

    Drew

    Ah... yeah.  Not enough coffee.  I see it now.  Thanks.

    On the presentation layer thing, you're not sure how to do it in SSRS.  That kind of negates it being a presentation layer problem for you. 😉  I agree that you could use a "Matrix" in SSRS for the final display but I'm thinking that the final display is the easy part.  And, no... I don't know how to do the required unpivot in SSRS but a little integer math in T-SQL does it easily.

    It's a presentation issue, because it's only purpose is to change how the data is presented.  I have a rough idea how to do this in SSRS, but I don't have SSRS installed anywhere to test it.  It involves having nested tablixes.  The outer one would enforce the grouping based on Column0 and the inner one would do the horizontal layout.

    Drew

    Understood and agreed that it's a presentation issue but presentation software would still hit on the database, possibly in a worse fashion depending on the skill level of the person manipulation the presentation level application and the capabilities of that application.

    Also, let's consider that you don't have SSRS installed anywhere and you needed to do something like this.  Would you stand up an SSRS box or install it on your server just to solve this one problem?  I could be wrong but I'm thinking that you wouldn't, unless you wanted to use it as justification for standing up SSRS.

    Also consider that it took me about the same amount of time to write and test the solution code as it did to create the code to convert the test data into something that was readily consumable and it also allowed me to check resource usage for the solution code.  I've little personal experience with SSRS other than riding shotgun while others do the development and, even for the people skilled in it, it does seem to take a fair percentage longer to develop such things and then they also have no convenient way to check for resource usage.

    PLEASE don't mistake any of this as saying that everything that needs to be done for presentation purposes should be done in the database layer.  THAT would be absolutely stupid.  I'm just suggesting that sometimes it may actually be better, faster, easier, less resource intensive to blur the line between the presentation level and the database level and I believe this may be one of those places.

    My other purpose was to challenge all of the people that were making suggestions as to how to solve this problem, whether using a presentation tool or not, to actually provide a solution for the given problem.  Like I said in a different post, it's easy to suggest that to get to the moon, you need to build a rocket ship but no one even offered a link for how the OP could solve this problem.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Thursday, January 11, 2018 8:40 AM

    Also, let's consider that you don't have SSRS installed anywhere and you needed to do something like this.  Would you stand up an SSRS box or install it on your server just to solve this one problem?  I could be wrong but I'm thinking that you wouldn't, unless you wanted to use it as justification for standing up SSRS.

    The OP specifically said that they were using SSRS.  I'm not going to stand up an SSRS box just to help someone else solve their problem.  If I were faced with this situation, I would use the presentation tool that I DO have installed, but it doesn't help the OP for me to tell them how I would solve this using a presentation layer that they don't have access to.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • drew.allen - Thursday, January 11, 2018 9:48 AM

    Jeff Moden - Thursday, January 11, 2018 8:40 AM

    Also, let's consider that you don't have SSRS installed anywhere and you needed to do something like this.  Would you stand up an SSRS box or install it on your server just to solve this one problem?  I could be wrong but I'm thinking that you wouldn't, unless you wanted to use it as justification for standing up SSRS.

    The OP specifically said that they were using SSRS.  I'm not going to stand up an SSRS box just to help someone else solve their problem.  If I were faced with this situation, I would use the presentation tool that I DO have installed, but it doesn't help the OP for me to tell them how I would solve this using a presentation layer that they don't have access to.

    Drew

    No question about that and that's not what I was challenging.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply