|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Today @ 3:52 AM
Points: 20,
Visits: 94
|
|
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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
|
|
I think you are talking about pagination here. this can be done at application and sql server both. search google for "row_number()"
-------Bhuvnesh---------- While 1 = 1 (Learning SQL....) Click to get fast response of your post
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Today @ 3:52 AM
Points: 20,
Visits: 94
|
|
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.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 4:28 AM
Points: 1,296,
Visits: 3,875
|
|
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
|
|
|
|