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

Notification

Icon
Error

Lists table - access to the description of any value in a report.
vk4iu
#1 Posted : Tuesday, May 6, 2014 8:30:31 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,

In my spare time I keep investigating new techniques for analysing my progress using reports. I look throiugh a lot of the standard reports supplied with LOGic to find interesting techniques.

And a few weeks ago, in the "LOG with Country Name" report I found a new technique - well, new to me. After some research and effort I expanded the idea into something I could really use.

The Lists table holds all the data to report Award progress - the award value, the description, and all the data to report progress towards the award. This table is updated when you run Update Award Progress.

There are also lists in my Lists table that are not awards - my rigs, my antennas, my locations etc.

In many of my reports I would like to see the Description of the list value, not just the code of the list value. That is, I would like to see ...

YUBARI (HOKKAIDO) for JCC rather than the code 0109.
PORT ADELAIDE ENFIELD CITY COUNCIL (VK5) rather than the code AE5 for an Australian shire.
ALASKA rather than AK for the US State.
Kenwood TS440 + Expert 1K-FA instead of 1 for the equipment I used.

Clearly some of these things are easy to remember, US States for example. But, as one gets older ... need I say more.

The shorter codes are a result of the limited room in the USERFIELDS field of the log. A Visual Foxpro limit of 254 characters that cannot be changed. One usually puts a value like "MR:7|" in USERFIELDS for "I used for this QSO my kit built Sierra QRP radio".

To use the technique, have a look at the "Log with Country Name" report. It is a very simple report. Make a copy of it and change the name of both files - the .FPT, and the .REP files using the normal Windows techniques.

Use Reports, Modify report layout in the usual way.

In the Create/Modify report dialogue, note the the VIEW has been set to NONE. One needs to take control of the databases used for the report.

Now look in the Command Scripts panel, the File Open TAB. You will see this code ...
use log
use lists order tag tagvalue in 0

set relation to PADR("DXCC:"+TRIM(DXCC)+"|",30) into lists
The report opens the log and the lists table setting the order for the lists to "tagvalue". A "relationship" is then created between the tables. That is, as the report is processed one log record at a time, when the log database record pointer moves to the next record, the list table is moved to a new record based on the the value of DXCC in the new log record.

One can now access the description for DXCC - the actual country name, rather than just the DXCC code in the report.

And as they say in the TV adds, "wait - there's more".

One can do that for as many "lists" as you want to report in the report. One can open the lists database with an "alias" and set additional relationships from the log into the lists table. The Lists table is the opened multiple times, managed by Foxpro using the alias name. Like this. The Lists table is opened a total of four times.
&& Open the QSL manager table
select 0
use qslman order tag call

&& Extract data from the lists table
select 0
use lists order tag tagvalue

select 0
use lists order tag tagvalue again alias jcc
select 0
use lists order tag tagvalue again alias jcg
select 0
use lists order tag tagvalue again alias waja

&& Open the log for processing and set relations into lists.
&& Allows access to descriptions for list values
select 0
use log

set relation to ;
log.CALL into qslman, ;
"WAJA:" + alltrim(tag_val("WAJA:",log.userfields)) into waja,;
"JCC:" + alltrim(tag_val("JCC:",log.userfields)) into jcc,;
"JCG:" + alltrim(tag_val("JCG:",log.userfields)) into jcg

&& Open the prefix table
&& Prefix table is positioned by OnEntry field of Detail report band.
use pfxndx order tag pfx in 0 share
use prefix in 0 share
One can now process JA calls, and the report will display the descriptions for the JCC, JCG, WAJA codes.

JA Data Check Report

If further information is needed, please ask. If you need help with code to achieve a result, please ask.

My JA Data Analysis report is attached. It is assumed you have an award list for JCC, JCG, and WAJA in the Lists table. And a further example is attached here.

File Attachment(s):
JA Data Analysis.zip (8kb) downloaded 40 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.029 seconds.