logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Awards - with Beam Heading
vk4iu
#1 Posted : Thursday, December 5, 2013 6:32:24 PM(UTC)
VK4IU

Rank: Advanced Member

Groups: Moderator, Registered, Administrators
Posts: 404
Man
Location: Hodgleigh QLD

Thanks: 6 times
Was thanked: 77 time(s) in 68 post(s)
G'Day,

Today, I was interested in what DXCC entities I had not worked and the bearing to them. So I ran the "AWARDS with Beam Heading" report using the DXCC award data.

Against my log, this report displayed an error ...

Awards - with beam heading

So I added LOTW_ONLY to the report variable list, and while examining the definition I noticed this report is still wanting to use the prefix table to obtain "direction" for the DXCC entity relative to my QTH. It is guaranteed to fail in Logic9.

I understand "direction" in Logic9 is calculated dynamically and obtained from the global structure "whereitis" - after the structure has been populated from the Lat and Lon in the prefix table for the DXCC entity. See this topic

So I updated the Beam Heading field expression from

Quote:
LEFT( TRANSFORM( getprefixinfo(call, DATE()) ), 0) + padl(TRANSFORM(prefix.direction),3) + " " + padl(TRANSFORM(adj_360(prefix.direction+180)),3)


to

Quote:
LEFT( TRANSFORM( getprefixinfo(iif(call="(unworked)",trim(value),call), DATE()) ), 0) + LEFT( TRANSFORM( whereitis.setcoords(prefix.lat, prefix.lon)), 0) + padl(TRANSFORM(whereitis.bearing),3) + " " + padl(TRANSFORM(mod(whereitis.bearing+180,360)),3)


Please note that, for "unworked" entities, I have used the "award value" to access the prefix table. The report now functions in a basic way. Clearly,for "unworked" entities, there is no call sign from which to retrieve the Lat and Lon, and the report does not make much sense for awards whose award value does not translate to a valid entry in the prefix table.

The professional programmers should stop reading here. Your blood pressure will rise if you read further.

For those of you interested in "how it works" - note the use of the functions that have "side effects" returning "nothing" to the expression. The side effects being to position the prefix table, and populate the "whereitis" structure, but return nothing to the output of the expression. Such is the skill of programming relational database reports.

Quote:
LEFT( TRANSFORM( getprefixinfo(iif(call="(unworked)",trim(value),call), DATE()) ), 0)

and

LEFT( TRANSFORM( whereitis.setcoords(prefix.lat, prefix.lon)), 0)


I have attached my report. The reports has been renamed by adding an "underline" to the name. Just download and put it in the report sub-directory in your Logic installation - it should appear at the top of your list of reports.

I am interested in any feedback you may offer.

File Attachment(s):
report.zip (7kb) downloaded 19 time(s).
Peter VK4IU
You can help by posting images of any errors and including your Logic version.
Sponsor
Note: We receive a commission from Amazon when you purchase via this link. It does not affect your cost. Thank you!
Users browsing this topic
Guest
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.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.021 seconds.