UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Custom Sort Data In Report., Access 2010    
 
   
hafsarabic
post May 24 2016, 04:20 AM
Post#1



Posts: 130
Joined: 28-April 15



Hi,
Suppose I have 500 data in a table. I can print 4 data in every page. So to print 500 data it will need 125 pages. Generally if I sort data using Ascending system the first page contain record no. 1-4, the 2nd page contain record no 5-8 and so on. But I want to sort that data in another system. So that it sorts data row basis instead of page basis. Such as the first data of the table will print in the first row of the first page, the 2nd data of the table will print in the first row of 2nd page, the 3rd data of the table will print in the first row of 3rd page .............. the 125th data of the table will print in the first row of 125th page. Then the second row the first page will print 126th no. record of the table, the second row the 2nd page will print 127th no. record of the table and so on.
Thanks
Go to the top of the page
 
cheekybuddha
post May 24 2016, 04:36 AM
Post#2


UtterAccess VIP
Posts: 9,393
Joined: 6-December 03
From: Telegraph Hill


Hi,

Do you have a field in the table that gives a contiguous order, eg ID field that runs 1 -> 500 ?

If not, you will need to create one - search UA for 'ranking query'.

Then you can use an ORDER BY clause like:
CODE
SELECT *
FROM YourTableOrQuery
ORDER BY ((ID - 1) MOD 4), ID;


If ID is not contiguous from 1 -> total number of records then replace it with the ranking field.

hth,

d
Go to the top of the page
 
ScottGem
post May 24 2016, 07:10 AM
Post#3


UtterAccess VIP / UA Clown
Posts: 32,188
Joined: 21-January 04
From: LI, NY


Records are not numbered in Access. A table has not inherent order. Its just a bucket of data. Sorting in reports is based on the sort order you specify.

The only way you will get the sort you want is if there is some field that sorts what you refer to as the 126th record as the second record in the sort order. If there is no field that can do this, you can add a field and manually number the records.
Go to the top of the page
 
hafsarabic
post Dec 18 2017, 10:49 AM
Post#4



Posts: 130
Joined: 28-April 15



CheekyBuddha has written,
QUOTE
Do you have a field in the table that gives a contiguous order, eg ID field that runs 1 -> 500


What does "contiguous order" mean?

Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    19th January 2018 - 02:46 AM