How to split cells in table format?

  • Hi Guys,

    I have this table formatting problem; In this report each item has 2 rows. I want to split the send row as shown below. So the results of the report should have the format below.

    rownumber ITEMNUNBER

    1 A

    2 A

    3 B

    4 B

    5 C

    6 C

    i wna display in this way mentioned below:

    A B

    1 2 3 4

    Any help appreciated!

    thanks

    Meghna

  • Not enough info... will you always have a max of 2 items. Also, it may make a difference if we knew why you wanted to do this.

    --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)
    Intro to Tally Tables and Functions

  • hi

    It can be many items also. Actually i wanted to do it in my RDL to make it more comapct and attractive for client but couldnt find a way out about its solution.

    Can you help me to find a way out?

    thanks

    Meghna

  • How many items can you have? Also, should they all be in separate columns or ???

    --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)
    Intro to Tally Tables and Functions

  • At present i have 3 items maximum , and i want all of them in separate columns for the unique item

    For e.g

    for item : A B

    1 2 3 5 6

    Ny idea?

    thanks

  • We're getting there... in the example you just gave, should 1 2 3 be in a single column or 3 columns? If 3 columns, what shall be their names?

    --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)
    Intro to Tally Tables and Functions

  • same names jef , as column name is the row number , if u see the example structure in the first post of mine.

    Sorry for the delay , but this is exactly the scenario.

    thanks

  • Sorry... I'm still not getting it and I want to make sure... you posted the following...

    for item : A B

    1 2 3 5 6

    ... are you saying that the "1 2 3" should all be in one column and the "5 6" should be in another column like this?

    [font="Courier New"] A | B

    ------+------

    1 2 3 | 5 6[/font]

    Thanks...

    --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)
    Intro to Tally Tables and Functions

  • Jeff,

    for item : A B

    1 2 3 5 6

    ... are you saying that the "1 2 3" should all be in three diffrent column and the "5 6" should be in another columns like this?

    A | B

    ----------+------

    1 |2 |3 | 5 | 6

    i dont think its possible in reporting services, what do u say?

    Thanks...

    --Meghna Bhargav

  • I don't know if it can be done in reporting services... header "cells" would need to be "merged" as if on a spreadsheet. I'm sure it can't be done in T-SQL... sorry.

    --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)
    Intro to Tally Tables and Functions

  • Ok , thanks for sspending your time on it!

    Meghna

  • In sql , how it can be done?

    thanks

  • meghna.bhargav (4/7/2008)


    In sql , how it can be done?

    thanks

    Like I said in my previous post, I don't think spreading a single header over 3 columns can be done. I can combine columns to hold the "1 2 3" in a single column...

    --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)
    Intro to Tally Tables and Functions

  • You can manually merge cells in RS (just like Excel), but not dynamically afaik. Probably not what you want...?

    Regards,

    Jacob

  • hi

    that is not the way as 2 nd row elements belong to one column in a table and as per u , if i manually do , 2nd row elements split row after row, they wont come in one line.

    like

    A A

    1 2 3 instead of that 1

    2

    3

    it will dispaly this way.

    Thanks

Viewing 15 posts - 1 through 15 (of 23 total)

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