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 .
13 2985
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)>
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.
- 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
-
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.
OK try this ... -
SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay],
-
([Basic Pay]*0.12) AS Tax, [Professional Tax], TDS,
-
[Tax]+[Professional Tax]+[TDS] AS TaxPaid,
-
[Welfare Fund], [Benvolent Fund], [CCC Contribution],
-
([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs, Format([BasicPay]-[Contrs]-[Tax], "###,##0") AS NetPay
-
FROM [Pay slip - sep];
-
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
Sorry I left the space out of Basic Pay in the Format. Try it now ... -
SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay],
-
([Basic Pay]*0.12) AS Tax, [Professional Tax], TDS,
-
[Tax]+[Professional Tax]+[TDS] AS TaxPaid,
-
[Welfare Fund], [Benvolent Fund], [CCC Contribution],
-
([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
-
Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
-
FROM [Pay slip - sep];
-
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 ... -
SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay],
-
([Basic Pay]*0.12) AS Tax, [Professional Tax], TDS,
-
[Tax]+[Professional Tax]+[TDS] AS TaxPaid,
-
[Welfare Fund], [Benvolent Fund], [CCC Contribution],
-
([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
-
Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
-
FROM [Pay slip - sep];
-
OK Try this -
SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay],
-
([Basic Pay]*0.12) AS Tax, TDS,
-
IIf([Basic Pay] <= 1500, 0,
-
IIf([Basic Pay] >1500 And [Basic Pay] <= 2000, 16,
-
IIf([Basic Pay] >2000 And [Basic Pay] <= 3000, 25,
-
IIf([Basic Pay] >3000 And [Basic Pay] <= 4000, 35,
-
IIf([Basic Pay] >4000 And [Basic Pay] <= 5000, 45,
-
IIf([Basic Pay] >5000 And [Basic Pay] <= 6000, 60,
-
IIf([Basic Pay] >6000 And [Basic Pay] <= 10000, 80,
-
IIf([Basic Pay] >10000 And [Basic Pay] <= 15000, 100,
-
IIf([Basic Pay] >15000 And [Basic Pay] <= 20000, 150, 200))))))))) As ProfTax,
-
[Tax]+[ProfTax]+[TDS] AS TaxPaid,
-
[Welfare Fund], [Benvolent Fund], [CCC Contribution],
-
([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
-
Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
-
FROM [Pay slip - sep];
-
query is not saving the code
OK Try this -
SELECT EmployeeNo, Month, [Name of the Member], [Basic Pay],
-
([Basic Pay]*0.12) AS Tax, TDS,
-
IIf([Basic Pay] <= 1500, 0,
-
IIf([Basic Pay] >1500 And [Basic Pay] <= 2000, 16,
-
IIf([Basic Pay] >2000 And [Basic Pay] <= 3000, 25,
-
IIf([Basic Pay] >3000 And [Basic Pay] <= 4000, 35,
-
IIf([Basic Pay] >4000 And [Basic Pay] <= 5000, 45,
-
IIf([Basic Pay] >5000 And [Basic Pay] <= 6000, 60,
-
IIf([Basic Pay] >6000 And [Basic Pay] <= 10000, 80,
-
IIf([Basic Pay] >10000 And [Basic Pay] <= 15000, 100,
-
IIf([Basic Pay] >15000 And [Basic Pay] <= 20000, 150, 200))))))))) As ProfTax,
-
[Tax]+[ProfTax]+[TDS] AS TaxPaid,
-
[Welfare Fund], [Benvolent Fund], [CCC Contribution],
-
([Welfare Fund]+[Benvolent Fund]+[CCC Contribution]) AS Contrs,
-
Format([Basic Pay]-[Contrs]-[Tax], "###,##0") AS NetPay
-
FROM [Pay slip - sep];
-
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.
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.
Thank you... I updated the query now its working
thanks for your support
can u guide me in writing SQL codes
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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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)
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
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...
|
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,...
|
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,...
|
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...
| |