none
Divide a table into two tables in SSRS

    Question

  • Hi All

    I have created follwing report in SSRS. Page break is based on department.

    Admin Dep

    no        name     res

    1           Aaa       test

    5           Fffff       clear

    8           Cccc       develop

    4           Gggg      debug

    Can I get above table as following table.To create above table I just followed Reporting ervice wizard and then select table.

    no        name           res               no             name          res

    1          Aaa             test              8               Cccc           develop

    5          Fffff             clear             4              Gggg          debug 

    Please advise me.

    Thank You

    Friday, July 06, 2012 4:27 PM

Answers

  • Hi There

    Thanks for your posting again. Please follow the steps below

    1 - Add one rectangle.

    2 - Add 2 List control box inside the rectangle. Put them side by side.

    3 - On the left most list,select details group at set the hidden visibility properties, put expression like: =iif((rownumber(nothing) mod 2)=1,False,True)

    4  On the right most list,select details group at set the hidden visibility properties, put expression like: = the right one =iif((rownumber(nothing) mod 2)=0,False,True)

    =iif((rownumber(nothing) mod 2)=0,False,True) 
    =iif((rownumber(nothing) mod 2)=1,False,True) 

    5- Add fields into the list.

    6 - You would see the result as I have put inside the screenshot

    I hope this will help

    Many thanks

    Syed

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful

    Sunday, July 08, 2012 9:31 PM

All replies

  • You can create two tables and use the filter properties to set one table no 1 & 5 and the other no 8 & 4

    i.e. !Fields.no.value IN (1,5)

    and similarly to the other table

    Friday, July 06, 2012 4:58 PM
  • Hi Erichanson

    Thank you for your reply. I am unable to predict no field values. Its depends on based tables values. Number of rows of table vary from 4 to 20. Do you have any other idea?

    Thank You

    Saturday, July 07, 2012 11:16 AM
  • Can you tell me what your logic is that you want to split the tables on?  Do you just want to divide the tables equally or is there a filter that you want to divide them on?
    Saturday, July 07, 2012 12:29 PM
  • Hi EricHanson

    I want to divide the table equally.

    Thank You 

    Saturday, July 07, 2012 3:06 PM
  • Hi There

    Thanks for your posting. It seems that you want to do a column type report. If that's the case, then follow these steps from this thread

    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/d9f62ba3-9378-4d2b-bd51-1b8156edb347

    I hope this will help

    Many thanks

    Syed Qazafi Anjum

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.

    Sunday, July 08, 2012 12:52 AM
  • Hi Syed

    Thank you for your reply. Yes I read the thread. My expected output also similer to that one. I tried to follow those instructions but not successfull. Still I am studying SSRS. Could you explain step by step how to achieve my requirement.

    Thank You

    Sunday, July 08, 2012 5:06 PM
  • Hi There

    Thanks for your posting again. Please follow the steps below

    1 - Add one rectangle.

    2 - Add 2 List control box inside the rectangle. Put them side by side.

    3 - On the left most list,select details group at set the hidden visibility properties, put expression like: =iif((rownumber(nothing) mod 2)=1,False,True)

    4  On the right most list,select details group at set the hidden visibility properties, put expression like: = the right one =iif((rownumber(nothing) mod 2)=0,False,True)

    =iif((rownumber(nothing) mod 2)=0,False,True) 
    =iif((rownumber(nothing) mod 2)=1,False,True) 

    5- Add fields into the list.

    6 - You would see the result as I have put inside the screenshot

    I hope this will help

    Many thanks

    Syed

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful

    Sunday, July 08, 2012 9:31 PM
  • dukpdk,

    If you are wanting to split up the columns equally, Syed's solution is the best the way to do that.  The function he's using checks for a remainder when dividing by 2, basically a vb way to check for divisibility.  This way your even and odd row numbers will be side by side.

    Thanks,

    Eric

    Monday, July 09, 2012 12:42 PM
  • Hi syed

    Thank you very much for your answer. Yes it works. Your screen shots really help to me. Onceagain many thanks.

    Monday, July 09, 2012 7:16 PM
  • Hi Eric

    Thank you for your comments also. Yes I followed the Syed's solution and then I got the answer.

    Thanks

    Monday, July 09, 2012 7:18 PM