473,320 Members | 1,933 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,320 software developers and data experts.

Report Service calculation

Hi
i am working with report service in sql server 2005.
I have a problem with calculation.
what i want to do is something like this

=IIf Fields!total_spb_week_this_year.Value= 0 then 0
else
100 * (Fields!total_xch_comp_week_this_year.Value +
Fields!total_xch_1_4_1_week_this_year.Value) /
Fields!total_spb_week_this_year.Value

but i dont know what shall i add and wher shall i put.
i put this command in expression in the filed but it didnt work.

thanks alot for any help.
voroojak
Jul 12 '07 #1
4 1418
i just tried this and it seems that it is working, but i dont know how can i round it.
=IIF (Fields!total_spb_week_this_year.Value>0 ,
(Fields!total_xch_comp_week_this_year.Value +
Fields!total_xch_1_4_1_week_this_year.Value) * 100 /
Fields!total_spb_week_this_year.Value,0)

but thre result is 72.256471568124
but i want to get 72
or if it is 72.68545121654 i want to get 73

how is it possible.
i put ROUND at the begining but it didnt work.

thanks
Jul 12 '07 #2
You can use Formatting
Format (value,"N")......
Jul 12 '07 #3
thanks,
i tried to use round and it worked some how, can u please explain this function to me, because i also need to have with one digit decimal. i used round (X,1) but in some rows that it is for example 2.4000001, it dowsnt give me me 2,4 or if it is 2.5.99999 it is not giving me 2.6.
thanks alot for ur help.
Jul 12 '07 #4
This is the formatting options provided in the reporting service.
Format (value,"N") -- two decimal points
Format(value,"N1") -- one decimal point
etc..,
Jul 13 '07 #5

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

Similar topics

1
by: kai | last post by:
Hi, All I use Access2002. I have a report, on each group I have a subtotal (not directly from fields, get from on report calculation) with name txtSubTotal. At report level, I want sum up...
7
by: Jacob Barnett | last post by:
Access 2000 main report does not display subreport data in preview and may or may not print... sometimes. Usually, the entire report is fine. The behavior does not seem to depend on particular...
3
by: CSDunn | last post by:
Hello, I have a situation in which each record on a report has 40 fields, any one of which can contain a value of 'C', or 'I', or 'B'. I need to create one calculated field on the report that will...
2
by: Del | last post by:
Thanks in advance for any help. I have a database that was created in Access 2000. Several users have been upgraded to Access 2003. Since upgrading to 2003 we have noticed that some of the...
4
by: Trevor Best | last post by:
I have a report that's fairly simple, page headers and footers, detail has a subreport in (can vary in length). The customer wanted a signature block for them, their client and 3rd party. This was...
5
by: Mike | last post by:
Hello All, I have a report based upon a query. I have added a control to report footer that calcs the total cost of the inventory: =SUM(). When this total calculation is NOT on the report,...
3
by: Jimmy | last post by:
Is there a way to force access to wait a specified time before making a calculation? On my report there is a subreport with a number of calculation on it. One if which is a count of certain...
4
by: =?Utf-8?B?S2F1c2hhbCBNZWh0YQ==?= | last post by:
Hi, I was reading about asynchronous transfer of control in Real Time Java Specification. I am wondering if there is any way we can do similar thing with Web Services in Service Oriented...
3
by: ebasshead | last post by:
Hi Everybody, I've been building a main invoice report which has a seperate itemised and then summed expenses report inserted on the page. I am then using the summed expenses for a calculation...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.