Dynamic columns in ssrs

  • Hello all,

    In my report i column headers are dynamic. the number of columns are 12 in the report. these are dynamic means whne a user selces one period let us say period 1 then it has to dispplay 1 to 12 periods information for each type.

    if the user selects 2 then 2 to 13 like this.

    so the number of columns are fixed(12) but dynamic.

    how can i accomplish this. this is very urgent i reached the deadline alredy and working hard to figure it out.

    my sp returns results like this.

    period type1 type2 type3

    period1 10 10

    period2 20

    period3

    period11

    perios 12

    i need report like this when i select period 1.

    type -period1-period2-period3-period4-period5-period6-period7-period8-period9-period10-period11-period12-

    type1 10 20 so on like this

    type2

    type3

    if i select period 2 then period 2 to period 13.

    can anyone please help me with this.

    i tried pivoting. it did not work.

    please help me.i am approaching deadline.

    thank you

  • Gosh... why do people both bite off more than they can chew and then wait until the deadline is damned near on them? Here's how to do it... good luck. 😉

    http://www.sqlservercentral.com/articles/Crosstab/65048/

    --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)

  • Hi,

    My advice is do this like in the query level like as you need in the report for time saving.And use the feild in the SSRS Matrix column group and display in one of the column group textbox.

    Just like pivot in the Excel.

    All the best.

    Veeren.

    Thanks & Regards,
    Veeren.
    Ignore this if you feel i am Wrong. 😉

  • THANKS FOR REPLYING ME.

    THIS I AHVE ACCOMPLISHED BY WRITING THE QUERY THAT RETURNS THE WAY I WANTED IN THE REPORT.

    Thank you

  • cpinky01 (9/22/2010)


    THANKS FOR REPLYING ME.

    THIS I AHVE ACCOMPLISHED BY WRITING THE QUERY THAT RETURNS THE WAY I WANTED IN THE REPORT.

    Thank you

    Could you post it so we can all see?

    --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)

  • How to display columns which is dynamically generated. I have SP in which sql statements join with dynamically sql view.

    every time view is changed based on filter criteria. I get different columns every time. how can i show those columns on my report ?

Viewing 6 posts - 1 through 5 (of 5 total)

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