473,387 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Decimals in Access Reports

hi,

how can I change the number of decimals appeared in access reports... I put a formula in query and its giving three to four decimals in the output of report. I want to change the number of decimals to zero. can anybody guide me in this .
Oct 1 '07 #1
13 2985
missinglinq
3,532 Expert 2GB
You have inadvertently posted your question in the Articles section rather than in the Forum section of our site, so I have moved it across to the Forum for you.

Linq ;0)>
Oct 1 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
hi,

how can I change the number of decimals appeared in access reports... I put a formula in query and its giving three to four decimals in the output of report. I want to change the number of decimals to zero. can anybody guide me in this .
Can you post the SQL of the query you are using and we can help you adapt it to format the result correctly.
Oct 1 '07 #3
Expand|Select|Wrap|Line Numbers
  1. SELECT [Pay slip - sep].EmployeeNo, [Pay slip - sep].Month, [Pay slip - sep].[Name of the Member], [Pay slip - sep].[Basic Pay], [Pay slip - sep].[Basic Pay], [Basic Pay]*0.12 AS Expr4, [Pay slip - sep].[Professional Tax], [Pay slip - sep].TDS, [Expr4]+[Professional Tax]+[TDS] AS Expr1, [Pay slip - sep].[Welfare Fund], [Pay slip - sep].[Benvolent Fund], [Pay slip - sep].[CCC Contribution], [Welfare Fund]+[Benvolent Fund]+[CCC Contribution] AS Expr2, [Expr1003]-[Expr1]-[Expr2] AS Expr3
  2. FROM [Pay slip - sep];
This is the sql of the database... because i calculated 12% pm basoc fof PF the net amount coming 4835.76.. this 0.76 should become nill and paise should add to the total amount and it should become 4836.
Oct 3 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
OK try this ...

Expand|Select|Wrap|Line Numbers
  1. SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay], 
  2. ([Basic Pay]*0.12) AS Tax, [Professional Tax], TDS, 
  3. [Tax]+[Professional Tax]+[TDS] AS TaxPaid, 
  4. [Welfare Fund], [Benvolent Fund], [CCC Contribution], 
  5. ([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs, Format([BasicPay]-[Contrs]-[Tax], "###,##0") AS NetPay
  6. FROM [Pay slip - sep];
  7.  
Oct 3 '07 #5
Its working but asking for basic pay while opening the query... if i give a number it will display but with wrong calculations depending upon the number i have given while opening the query
Oct 3 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
Sorry I left the space out of Basic Pay in the Format. Try it now ...

Expand|Select|Wrap|Line Numbers
  1. SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay], 
  2. ([Basic Pay]*0.12) AS Tax, [Professional Tax], TDS, 
  3. [Tax]+[Professional Tax]+[TDS] AS TaxPaid, 
  4. [Welfare Fund], [Benvolent Fund], [CCC Contribution], 
  5. ([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
  6. Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
  7. FROM [Pay slip - sep];
  8.  
Oct 3 '07 #7
Thank you its working..
i have one more doubt...
as you observed there is one field professional tax in the query..
for this field tax is fixed depending upon the basic

upto 1500/- Nil
1500 to 2000 16/-
2000 to 3000 25/-
3000 to 4000 35/-
4000 to 5000 45/-
5000 to 6000 60/-
6000 to 10000 80/-
10000 to 15000 100/-
15000 to 20000 150/-
Above 20000 200

can i describe the column to take the value automatically

Sorry I left the space out of Basic Pay in the Format. Try it now ...

Expand|Select|Wrap|Line Numbers
  1. SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay], 
  2. ([Basic Pay]*0.12) AS Tax, [Professional Tax], TDS, 
  3. [Tax]+[Professional Tax]+[TDS] AS TaxPaid, 
  4. [Welfare Fund], [Benvolent Fund], [CCC Contribution], 
  5. ([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
  6. Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
  7. FROM [Pay slip - sep];
  8.  
Oct 3 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
OK Try this

Expand|Select|Wrap|Line Numbers
  1. SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay], 
  2. ([Basic Pay]*0.12) AS Tax, TDS, 
  3. IIf([Basic Pay] <= 1500, 0, 
  4. IIf([Basic Pay] >1500 And [Basic Pay] <= 2000, 16,
  5. IIf([Basic Pay] >2000 And [Basic Pay] <= 3000, 25,
  6. IIf([Basic Pay] >3000 And [Basic Pay] <= 4000, 35,
  7. IIf([Basic Pay] >4000 And [Basic Pay] <= 5000, 45,
  8. IIf([Basic Pay] >5000 And [Basic Pay] <= 6000, 60,
  9. IIf([Basic Pay] >6000 And [Basic Pay] <= 10000, 80,
  10. IIf([Basic Pay] >10000 And [Basic Pay] <= 15000, 100,
  11. IIf([Basic Pay] >15000 And [Basic Pay] <= 20000, 150, 200))))))))) As ProfTax, 
  12. [Tax]+[ProfTax]+[TDS] AS TaxPaid, 
  13. [Welfare Fund], [Benvolent Fund], [CCC Contribution], 
  14. ([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
  15. Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
  16. FROM [Pay slip - sep];
  17.  
Oct 3 '07 #9
query is not saving the code

OK Try this

Expand|Select|Wrap|Line Numbers
  1. SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay], 
  2. ([Basic Pay]*0.12) AS Tax, TDS, 
  3. IIf([Basic Pay] <= 1500, 0, 
  4. IIf([Basic Pay] >1500 And [Basic Pay] <= 2000, 16,
  5. IIf([Basic Pay] >2000 And [Basic Pay] <= 3000, 25,
  6. IIf([Basic Pay] >3000 And [Basic Pay] <= 4000, 35,
  7. IIf([Basic Pay] >4000 And [Basic Pay] <= 5000, 45,
  8. IIf([Basic Pay] >5000 And [Basic Pay] <= 6000, 60,
  9. IIf([Basic Pay] >6000 And [Basic Pay] <= 10000, 80,
  10. IIf([Basic Pay] >10000 And [Basic Pay] <= 15000, 100,
  11. IIf([Basic Pay] >15000 And [Basic Pay] <= 20000, 150, 200))))))))) As ProfTax, 
  12. [Tax]+[ProfTax]+[TDS] AS TaxPaid, 
  13. [Welfare Fund], [Benvolent Fund], [CCC Contribution], 
  14. ([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
  15. Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
  16. FROM [Pay slip - sep];
  17.  
Oct 3 '07 #10
MMcCarthy
14,534 Expert Mod 8TB
query is not saving the code
The query is not meant to save it just to retrieve it.

You would have to run a separate update query to update all the records and it would not automatically change if the Basic pay changed etc.
Oct 3 '07 #11
NeoPa
32,556 Expert Mod 16PB
Thank you its working..
i have one more doubt...
as you observed there is one field professional tax in the query..
for this field tax is fixed depending upon the basic
...
can i describe the column to take the value automatically
Mary's answer is quite right, but I would use an extra table with the tax information in it to do the job.
Oct 3 '07 #12
Thank you... I updated the query now its working
thanks for your support

can u guide me in writing SQL codes
Oct 4 '07 #13
NeoPa
32,556 Expert Mod 16PB
That sounds like a separate question vsts2007.
What I suggest that you do in that case is create a new thread for this question (you will need to phrase it clearly enough to make sense of course) and if you like, you can post a link to that new thread in a post in here. That way those of us who are already involved and registered in this thread will get the heads-up when your new one has been posted.
This is, of course, assuming that you particularly want a continuation from this thread (same experts involved). If not then simply avoid the linking bit.
Oct 4 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
3
by: trustme1 | last post by:
I am wanting to be able to write reports against an ms-access database that is part of another package. I only want to report from the database. What I need is a package that will allow me to...
1
by: Bilal Iqbal | last post by:
Hi. Currently i have database MS Access. In the database there are some Reports already designed. i am developing interface in VB and linking to MS Access database. My Problem is to access/Link...
2
by: eskil | last post by:
Hi, I am running a pivot table based on a query. I need to be able to display decimal precision for on a calculated field (in the query). The query returns the values correctly (i.e. with the...
2
by: B.Newman | last post by:
I've got some VB.NET code that *should* get a list of reports from an Access MDB and populate a list box with them. It doesn't detect any of the reports at all. oAccess.Reports.Count comes up as...
6
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as...
16
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report,...
1
by: Capn Stoobie | last post by:
I have a database that I regularly import data into from a text file. The text file is produced by payroll software, and it is always the same format. Most of the time my acImportDelim command...
3
by: Mario Pais | last post by:
I have a problem with the decimals in a report I created in Access Database. In a table I have two fields. One is the "price" the second one is "quantity". When I develop a report I would like to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.