473,805 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get Total Number Of Pages

Hi,

Given that I have an two integers - firstly the total number of items
and secondly the number of items per page what is the syntax to give me
the total number of pages. For example if there were 10 items and a
page size of 3 then 4 pages are required.

Thanks,

Paul

Dec 9 '05 #1
1 1435
You mean something like Math.Ceiling(to talCnt/perPageCnt);

<pa********@hot mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Hi,

Given that I have an two integers - firstly the total number of items
and secondly the number of items per page what is the syntax to give me
the total number of pages. For example if there were 10 items and a
page size of 3 then 4 pages are required.

Thanks,

Paul

Dec 9 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1788
by: krystoffff | last post by:
Hi I would like to paginate the results of a query on several pages. So I use a query with a limit X offset Y to display X results on a page, ok. But for the first page, I need to run the same query with a count(*) to know how many pages I will get (number total of rows/ X). The problem is my query is very slow (maybe 5s) because there is much
2
4542
by: L Mehl | last post by:
Different users of the app will want or not want to see report footer ( appears as a separate page). I can make the section invisible with a DLookup of a Y or N value from a 'parameters' table Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer) Reports!rptValuationDetail.Section(acFooter).Visible = _ DLookup("", "sysparms", " = " & Chr(34) & "printReportGrandTot" & Chr(34)) = "Y"
1
3879
by: Martin | last post by:
Does anyone know how to create the total number of pages? I am using the printpreview, pagesetup, and printdocument. I am printing contents from a richtextbox. I have it already printing but I need to know the amount of pages to print to be included with the printing of the document. Any help would be of great help. I have scrubed the net for this info with no avail. -martin
0
1868
by: Ray | last post by:
Hi all, Is there any method for getting the total no of pages of the Crystal Report before previewing the report? For my project, I would like to use different crystal report for different number of pages. Thanks a lot, Ray
3
16440
by: Amelyan | last post by:
I need to get the total number of items/records returned into GridView. If I just do myGridView.Rows.Count, then it just returns me the total number of items on the page. But if I have, 10 pages (10 records per page) and 98 records total, Rows.Count will return me 10 on the first 9 pages, and 8, on the last page. But, I need to somehow get access to total record count which is 98. What is the proper/easy way to accomplish that?
1
1437
by: fbouabcha | last post by:
Hi, My pb is to know the total pages to print, because I want to print each pages this format "page n of M". Thanks. Nass
1
1119
Dash Dad
by: Dash Dad | last post by:
I have a button on a form that will open a label report and print ALL the labels without filtering. I want to be able to put the total number of pages that will be printed inside a MsgBox (so that the user can add the correct number of Label Sheets to the printer). Thanks!
0
1049
by: PZMW8ANrathibha | last post by:
Hai I can suggest me a function that returns the total number of pages in a odp file. Waiting for reply Thank You.
1
3049
by: deshaipet | last post by:
Hi friends - I created a automatic storage tablespace with a pagesize of 16 K and initial size of 64 MB. create large tablespace test_tbsp1 pagesize 16k managed by automatic storage autoresize yes initialsize 64 M increasesize 64 M maxsize 2 G no extent size 16 prefetchsize 16 bufferpool test_bp1 file system caching dropped table recovery on so, the number of pages should be (initialsize/pagesize)= (64 MB /16 K) = 4096 pages ========
0
10614
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.