Report design

Discussions about Diving Log 6.0 - questions and hints
Post Reply
Dive Houg
Posts: 18
Joined: Sun Mar 23, 2008 03:11
Location: Denmark

Report design

Post by Dive Houg »

Hi

I'm working on a report design to fit my log book, and I've got a few things that I can't sort out.

1) Dive end time:
I would like to have a time for the end of the dive "hh:mm". I've got the start time and the dive time, but how do I add those times, so that I get my end time?

2) 2 sided printing:
I'm trying to get the layout designed to prin on both sides of the paper. I can get it to work like in an other post, by using the odd page feature. But this only works if you print a single log, I want the possibility to print several logs. I've tried to make a layer for even pages, like the one for odd pages, but alle the even pages just remain blank when I do a print preview :?
Also the layout is designed to fit A5 format, and the page setup is made for A4 so that I can get 2 logs on each paper.
70% of our planet surface is covered by water ......
Do I need to say more ??
.... Dive! Dive! Dive!
fatuus
Posts: 36
Joined: Sat Apr 07, 2007 14:53
Location: Sweden
Contact:

first

Post by fatuus »

dive time end in hh:mm

Code: Select all

str$(hour(juliantodate(datetojulian(locdatetime("1 "+LogEntrytime)) + (val(str$(LogDivetime,4))/24/60))),2,0) + ":" + (if(len(atrim$(str$(minute(juliantodate(datetojulian(locdatetime(LogEntrytime)) + (val(str$(LogDivetime,4))/24/60))),1,0)))=1,"0","") + atrim$(str$(minute(juliantodate(datetojulian(locdatetime(LogEntrytime)) + (val(str$(LogDivetime,4))/24/60))),2,0)))
maybe there is a shorter more efficient code.
Dive Houg
Posts: 18
Joined: Sun Mar 23, 2008 03:11
Location: Denmark

Post by Dive Houg »

Thanks Erik

Actually I already solved this problem, I got a code exactly like yours, by using report template I downloaded as a guide. Maby it was yours??

Now I just need to solve the isue with 2 sided printing .... it's starting to bug the hell out of me. :x
70% of our planet surface is covered by water ......
Do I need to say more ??
.... Dive! Dive! Dive!
fatuus
Posts: 36
Joined: Sat Apr 07, 2007 14:53
Location: Sweden
Contact:

Post by fatuus »

maybe its mine :)
i will try to help you tonight, but now i have to go to sleep.
Dive Houg
Posts: 18
Joined: Sun Mar 23, 2008 03:11
Location: Denmark

Post by Dive Houg »

Hi

Now I have a new issue.

I can't print the user fields for some reason. When I use them in the layout it just comes out as a blank field when I print. I can get it to print the name field but not the value field ????

Any suggestions
70% of our planet surface is covered by water ......
Do I need to say more ??
.... Dive! Dive! Dive!
divinglog
Site Admin
Posts: 5224
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Hi

Make sure that you have a dive selected during the design time, which contains all the data you want to include in your report. E.g. when you open the print dialog, the dive range is from dive 1 to your last dive. The first dive of the range (in this case dive 1) will be used as example data during the design time. If this dive does not contain any user defined field data, the designer will just show a blank field. So make sure you have selected a start dive number in the print dialog which contains data in the user fields.

I just tried it and it should work (make sure you have the field LogUserDefValue01 for the content and LogUserDefName01 for the field name).

Kind regards,
Sven
Dive Houg
Posts: 18
Joined: Sun Mar 23, 2008 03:11
Location: Denmark

Post by Dive Houg »

Got it to work just like you described ... thankz

Now I just need to solve the issue with the 2-sided printing, do you have any jints on that one ?
70% of our planet surface is covered by water ......
Do I need to say more ??
.... Dive! Dive! Dive!
bowlofpetunias
Posts: 25
Joined: Tue Apr 08, 2008 10:49
Location: Sydney, Australia

Calculating dive exit time

Post by bowlofpetunias »

this is how i have done it ... probably a bit more convoluted but i understand this way.

Code: Select all

"Dive exit time = " + StrSubst$(Fstr$(Int(Int(Int(Val(StrSubst$ (LogEntrytime,":","."))) + Frac(Val(StrSubst$ (LogEntrytime,":",".")))*100/60)     +     Frac(Int(Val(StrSubst$ (LogEntrytime,":","."))) + Frac(Val(StrSubst$ (LogEntrytime,":",".")))*100/60) + LogDivetime/60)           +          ( Frac(Int(Int(Val(StrSubst$ (LogEntrytime,":","."))) + Frac(Val(StrSubst$ (LogEntrytime,":",".")))*100/60)     +     Frac(Int(Val(StrSubst$ (LogEntrytime,":","."))) + Frac(Val(StrSubst$ (LogEntrytime,":",".")))*100/60) + LogDivetime/60)*60)/100, "&&.&&"), ".", ":")
Take dive entry time and substitute "." for ":" then convert it to a value
convert this to decimal hours and add dive time converted to decimal hours then convert it back to HH.MM

the rest is just formatting ... always the most difficult part.

If i knew how to attach a file i have done a report file with it explained a bit better[/list]
divinglog
Site Admin
Posts: 5224
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

You can send me the file and I'll link it here in the forum, because attachments are not possible.

Regarding the 2 side print: Can you send me your report file, maybe I can get it working.
divinglog
Site Admin
Posts: 5224
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Here is the report file from bowlofpetunias: Diveexittime.zip
divinglog
Site Admin
Posts: 5224
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Is this the layout you want to produce?

Image

This is currently not possible, because the print engine prints one dive after another. In this case it must print the first part of dive 1, then the first part of dive 2, then start a new page (back) and go back to dive 1 to print the 2nd part of it and go to dive 2 and print the rest of it.

For this case I would have to extend the print code inside of Diving Log so it sends the data of dive 1 and dive 2, and then again dive 1 and dive 2 to print the back. I'm not 100% sure, but this should be possible but some effort.

Duplex printing is only possible at the moment with one dive per page, I'm sorry.
No Waiting
Posts: 19
Joined: Thu Apr 19, 2007 09:58

Post by No Waiting »

Surely you could do this with manual Duplex, and two report files. One report that prints the front, then turn & replace the paper and print the other report for the backs...
divinglog
Site Admin
Posts: 5224
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Yes, this is possible, but you could print only 2 dives at a time. But it would work, of course.
Dive Houg
Posts: 18
Joined: Sun Mar 23, 2008 03:11
Location: Denmark

Post by Dive Houg »

This is what I wanted to do:

Image

Two A5 prints on a single sheet of A4 paper
and then I want to have a back side in the same way as the front.

I thing the sugestion from No Waiting, is the best solution at the moment.
70% of our planet surface is covered by water ......
Do I need to say more ??
.... Dive! Dive! Dive!
Post Reply