[Logic] Printing Log Fields
[email protected]
[email protected]
Tue, 06 Jan 2004 04:04:13 +0000
I recently needed help in printing some different log fields onto my QSL label than those that are found as standard on the labels that come with Logic. I thought I'd share of couple of the expressions that I use to print these fields. First, I'd like to thank Dennis for a wonderful product in Logic and for all his personal help over the years and recently to Art, AB4RL, for his recent response to my query. Second, I am in no way a database expert so these expressions are really foreign to me but being inquisitive and having persistence has helped.
First an expression which prints a QSL mgr's info from the regular log field of QSL via (or the "via" field) onto a QSL card if there is info in the log entry. The following expression will print the words QSL via followed by the info and will print nothing if there is no info in that field.
iif(empty(via),""," (QSL via "+alltrim(via)+")")
Next, I've developed a User Field named SATNAME which I use on my log form to enter the name of the satellite I've used when I'm working stations via the satellites. Art responed back with the following expression which will print only the name of the satellite from the SATNAME field onto the label if there is data in the field. Nothing prints if there is no info.
iif("SATNAME:"$userfields,tag_val("SATNAME:",userfields),"")
But of course I wasn't happy with just the satellite's name, I wanted the following to print if there was info: Sat QSO via: SATNAME
So I tinkered with Art's expression and after getting the ( and the + and the , and the " signs all correct (any one in the wrong place generates an error msg) I came up with the following expression which seems to work well.
iif("SATNAME:"$userfields," (Sat QSO via: "+tag_val("SATNAME:",userfields)+")","")
Feel free to copy these verbatim and use them at your pleasure and if you take note of the expressions' formats you'll kinda see the method behind the madness of this database language. Oh, just to brag a little more, here's a printout of my QSL label; I can send the file to anyone who asks. It's setup for a 15/16 by 1 inch label, single across ( I print with an old dot matrix printer with tractor fed single across label stock).
ARS K6YK Cfm our 2-way QSO
Date UTC Freq Mode RST QSL
31 Dec 03 0100 2M FM 59 Pse
QSL via K6YK Sat QSO via: AO27
Tnx for the bandwidth and tnx agn Dennis and Art.
Gd Logging folks, Phil KB9CRY