Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Summaryze Hours Post Reply Post New Topic
Author Message
josant83
Newbie
Newbie
Avatar

Joined: 16 Aug 2011
Location: Ecuador
Online Status: Offline
Posts: 2
Quote josant83 Replybullet Topic: Summaryze Hours
    Posted: 16 Aug 2011 at 6:33am
Hello,

I'm new in this forum. I'm using crystal reports for showing a reports that has summaryze the hours of working from people. For example

              A          B      SUM
Usuario 1    10:00     9:00     19:00
Usuario 2     2:00     8:00     10:00
Usuario 3     3:00     1:00      4:00
        SUM 15:00    18:00     33:00

I don't know how to bring the data from the database, If the format datetime, timespan, etc.

Pleas help me, because I tried in differents way and I can't. I use table combined (the second opcion) in crystal reports 2008. I've tried to convert the datatipe in "Time" but in the dialog summary the option sum dessapear, inteasd only we can see is resume.

Thanks a lot
Developer Web
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 17 Aug 2011 at 4:28am

are you trying to format you formula to display as date time?

what is the formula you are using, you should use datediff('H',field1,field2)
that will give you the hours worked, then right click format field
select date time
sharona
IP IP Logged
josant83
Newbie
Newbie
Avatar

Joined: 16 Aug 2011
Location: Ecuador
Online Status: Offline
Posts: 2
Quote josant83 Replybullet Posted: 17 Aug 2011 at 6:00am
Thanks for answering Sharona, I'm using crosstab table. The only format that summarized is numeric, but don't time. I fixed the problem with the rows, but I have the problem with the row of totals. Because the resume field is sum, the crosstab sum like numeric, but don't like time. I attached a table showing the problem:

                        column a
Base de Datos       |     1:30
Desarrollo          |     2:30
Infraestructura     |     0:30
        TOTALS     |     3:90

As you can see the totals is 3:90 insted of 4:30. The data I got from two fields of the database: qnHorasT and qnMinutosT and the formula for showing like the table is:

if {dsDepartamentoServicio.qnMinutosT} >= 60 then
    CDBL({dsDepartamentoServicio.qnHorasT} + Int({dsDepartamentoServicio.qnMinutosT} / 60) + {dsDepartamentoServicio.qnMinutosT} mod 60 * 0.01)
else
    CDBL({dsDepartamentoServicio.qnHorasT} + ({dsDepartamentoServicio.qnMinutosT} * 0.01))

And I simmulated the : insted of the . for decimals.

I hope that I have explained, my Enlighs is poor, jeje.

Resume, this I'm looking for: Cross-tabs that show totals as formatted time

Thanks so much

Developer Web
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.