Display multiple column tab

  • Hi All,

    My source is like

    Id Name

    1 A

    2 B

    3 C

    4 D

    5 E

    6 F

    7 G

    8 H

    9 I

    10 J

    . .

    . .

    . .

    I have display like:

    ID Name ID Name

    1 A 6 F

    2 B 7 G

    3 C 8 H

    4 D 9 I

    5 E 10 J

    After end with this page, Values go to the next page.

    Thanks,

    Basee

  • I think you are talking about pagination here. this can be done at application and sql server both.

    search google for "row_number()"

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • This what they designed in crystal report. If the column reaches the end on one side the next values is goes to the right side. After ending the page it goes to the new page.

  • i am not a .net guy, you should search in .net forums like codeproject for this .

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • It's actually not that hard...

    Step 1. You need your dataset to include a few extra columns

    ;with data as

    (

    select GroupName,ArticleNumber,Subject,row_number() over(PARTITION BY GroupName order by ArticleNumber) as rn

    FROM Articles

    where Subject <>''

    )

    select TOP 200

    GroupName,

    ArticleNumber,

    Subject,

    rn, -- used for sorting the output

    ((rn-1) / 10) %2 as col_no, -- works out which column to put the data into : 0 or 1 (based on page size of 10 - this could /should be a parameter )

    ((rn-1) / 10) /2 as page_break -- works out which "page" within the group to put the data on (based on page size of 10 - this could /should be a parameter )

    from data

    Step 2. Create a Tablix report with "GroupName" on the Page section and ArticleNumber and subject on the details section (you can include the other columns for now so you can see it is working, but remove them later for production)

    Step 3. You now need to tell the report how to paginate, so go into the outermost group properties (you would have an outer grouping called list1_GroupName if you were doing this with my data) and add the dataset column "page_break" to the group expressions so you are grouping by GroupName and page_break.

    Step 4. put a filter on the "detail" tablix so that it only displays where "col_no" = 0

    Step 5. Select any textbox that could expand due to overflow of data and uncheck the "Allow height to increase ?" setting. (otherwise your report will not line up nicely)

    Step 6. Select the outer Tablix (called List1 if you used the wizard) and make it twice as wide.

    Step 7. Copy the inner/details Tablix and paste it into List1, then position it right next to existing one (side by side)

    Step 8. Edit the filter on the new (2nd) details tablix so that it only displays where "col_no" = 1

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

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

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