473,396 Members | 2,004 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,396 software developers and data experts.

Problem in a report?

HI all,

I've several fields in a report which datatype is Date/Time.

Day WorkedHours
Monday 8:00
Tuesday 8:00
Wednesday 8:00
Thursday 7:00
Friday 8:30
Saturday 5:30

The Problem is that I want to add the Total Workedhours per week in a
report. I used this expression in the COntrol Source=
sum([Workedhours]), but it doesn't work. I was told that maybe because
my fields were Date/time won't add up. Does anybody have any
suggestions?
Nov 13 '05 #1
1 1208
christian wrote:
HI all,

I've several fields in a report which datatype is Date/Time.

Day WorkedHours
Monday 8:00
Tuesday 8:00
Wednesday 8:00
Thursday 7:00
Friday 8:30
Saturday 5:30

The Problem is that I want to add the Total Workedhours per week in a
report. I used this expression in the COntrol Source=
sum([Workedhours]), but it doesn't work. I was told that maybe because
my fields were Date/time won't add up. Does anybody have any
suggestions?


Well, you could create an IIF string in your recordsource
WH : Hour([DateField]) + IIF(Minute([DateField]) = 30,.50,0)
This would convert 8.30 to 8.5. So you could have a column in your
report query, put this column in the report and set the visible
problerty to false, and sum it up. However, the value would be in
decimal, not hh:mm.

Otherwise, break out the hour and minutes;
WorkHours = Hour([DateField])
WorkMinutes = Minute([DateField])
and sum them up n the footer. Then you need to divide tot minutes by 60
to get the number of hours and mod the minutes by 60 to get the
remainder of minutes.

Or something on that order.


Nov 13 '05 #2

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

Similar topics

3
by: Spacy | last post by:
Am creating a HTML Report in asp.net. To save this report to excel on client-side, i write this code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition",...
3
by: ChrisWinterscheid | last post by:
We are running DB2 8.1 on AIX 5.2. DB2level shows: DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08016" with level identifier "02070106". Informational tokens are "DB2...
0
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and 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...
0
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
12
by: Brad Baker | last post by:
I am trying to write a simple ASP.net/C# page which allows users to select some values and produce a report based on a SQL query. I have a self posting dropdown form which allows users to select...
0
by: Aryan | last post by:
Hi, I am doing "Export to Excel" functionality, but while doing this I am getting error. Like I have two types of Report, each type has many sub reports inside. So I am opening new window for Each...
0
by: Aryan | last post by:
Hi, I am doing "Export to Excel" functionality, but while doing this I am getting error. Like I have two types of Report, each type has many sub reports inside. So I am opening new window for Each...
0
by: Aryan | last post by:
Hi, I am doing "Export to Excel" functionality, but while doing this I am getting error. Like I have two types of Report, each type has many sub reports inside. So I am opening new window for Each...
8
by: sara | last post by:
I have a report that runs fine with data. If there is no data, I have its NO Data event sending a MsgBox and cancelling the report. Then it seems I still get the 2501 message on the Open Report...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.