How to get total bottom time in the report designed

Discussions about Diving Log 6.0 - questions and hints
Post Reply
kbrunham
Posts: 9
Joined: Thu Aug 17, 2006 12:38

How to get total bottom time in the report designed

Post by kbrunham »

In another thread, it was mentioned that it is possible to display the total bottom time in a printed report.

What variable do you use to display the total bottom time in the report designer?

Thanks.
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

If you want to get the total bottom time of the dives you currently print, you can look at the report file Logbook.lst. At the bottom of each page is the overall divetime. For this you must add a sum variable in the menu "Project > Sum Variables" of the report designer. You can then use this new variable in the report.

If you want the total bottom time of all your dives on a report even if you print only the last 10 dives for example, I must add this data with the next update. At the moment this data is only available in the statistics print function.
kbrunham
Posts: 9
Joined: Thu Aug 17, 2006 12:38

Post by kbrunham »

As a feature request, if it would be possible to have the sum of all dive times as a variable in the logbook report designer, that would be great!!

BTW: Is there anywhere which lists all of the variables currently available in the logbook report designer?
olafkn
Posts: 37
Joined: Tue May 16, 2006 08:09
Location: Ratingen

Accumulated total diving time

Post by olafkn »

Hello Sven, in my opinion, it would be great, if it's possible, to create a variabel which shows the accumulated diving time of former dives including the actual one. So for example if you decide to print dive nr.4 the variable contains sum of divetime 1-4, Printing dive nr 333 it contains 1-333

sincerely Olaf
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

That's a good idea, I'll add 2 variables with the next update, one containing the total dive time of all dives, and one containing the divetime up to the last dive which is printed.

@kbrunham: You can see all available variables in the treeview on the right side of the report designer.
kbrunham
Posts: 9
Joined: Thu Aug 17, 2006 12:38

Post by kbrunham »

I see in the new version of diving log, there are 3 new variables (StatsDivetimeAll, StatsDivetimeBtSel, StatsDivetimeToSel), but none of these three seem to print the total bottom time to the current being printed.

For example, If i have 2 dives (27 min and 25min) that I am printing, the BtSel and ToSel variables both show as 52 for both dives.

Is this a bug?
@rno
Posts: 29
Joined: Wed Nov 15, 2006 10:58
Location: Wanroij, Holland

Post by @rno »

kbrunham wrote:I see in the new version of diving log, there are 3 new variables (StatsDivetimeAll, StatsDivetimeBtSel, StatsDivetimeToSel), but none of these three seem to print the total bottom time to the current being printed.

For example, If i have 2 dives (27 min and 25min) that I am printing, the BtSel and ToSel variables both show as 52 for both dives.

Is this a bug?
This is not a bug.....
BtSel is the totaltime of the selected dives (27 + 25 = 52).
ToSel is totaltime from dive #1 to last selected dive (this is only 52 in your case if you are printing dive #1 and #2 and those values will differ if you select i.e. dive #2 and #3. The ToSel will include the divetime for dive #1.......
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

I see in the new version of diving log, there are 3 new variables (StatsDivetimeAll, StatsDivetimeBtSel, StatsDivetimeToSel), but none of these three seem to print the total bottom time to the current being printed.

For example, If i have 2 dives (27 min and 25min) that I am printing, the BtSel and ToSel variables both show as 52 for both dives.

Is this a bug?
To get the total bottom time to the current printed you need a sum variable. Open the "Logbook.lst" report file in the designer to see how a sum variable works. See also this posting:

viewtopic.php?t=372#1419
kbrunham
Posts: 9
Joined: Thu Aug 17, 2006 12:38

Post by kbrunham »

With the sum variable I can get Diving log to produce the sum of the dive times for all log book pages being printed but not for all log entries.

What I mean is if I have 3 dives (25min, 27min, 10min) and print all three, the sum variable works fine reporting 25, 52, 62, but if I only print dives 2 and three it reports 27 and 37.

How can I create a variable that represents the total of all dive times entered in the database up to and including the current entry so that I can only print new log entries as needed?
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Ah, now I know what you mean. This is a little bit tricky but this value can be calculated. I've created a report file where this is shown. The red line should contain the value you want. Click here to download the report file

And with this formula you get the value:

Code: Select all

StatsDivetimeToSel - StatsDivetimeBtSel + @Sum01 + LogDivetime
@Sum01 is a sum variable over the field LogDivetime. Is this what you meant?
kbrunham
Posts: 9
Joined: Thu Aug 17, 2006 12:38

Post by kbrunham »

Awesome, that's exactly what I was looking for.


Thanks!
phillik
Posts: 37
Joined: Tue Mar 27, 2007 08:06
Location: Farnborough, Hampshire, UK

Post by phillik »

Hello. Getting to grips now. I am still trying to just get total accumulated time into my report. I have found the following in the Statisics.lst designer:

"Total Divetime:" + "÷" + StatsDivetimeAll
Which displays Hours:Mins (perfect!)

But when I try this in my report designer I get:
Argument Error: Wrong type of data on right side of "+" (expected String)?

Is there a difference beween .crd and .lst?

Thanks
|/
|\enny
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Hi Kenny

The problem is not between *.crd and *.lst, the problem is the data which is available behind the report. The report file Statistics.lst is made for printing the general statistics data and Diving Log presents this report file the data which is available in the general statistics window, e.g. the accumulated dive time as string variable.

If you want to print your logbook data you don't have this data available, so there must be some calculation and formatting to display it. Here you can download another report file, on the right side you can see how to calulate the accumulated dive time and display it in hours and minutes. Make sure you setup the dive time sum variable "@Sum01" variable in your report file and then copy the formula from this report into yours:

Accumulated.zip

Best regards,
Sven
Post Reply