[LOGic] Re: Limitation - LOGic or FoxPro?
PDA
pdainc at hosenose.com
Wed Mar 15 08:38:34 EST 2006
Hi Bill:
The expression length is a limitation of the language.
But no sweat.
Copy these lines into a text file in the LOGIC8 folder. Name the file
IS_AIRMAIL.PRG
********************
* Do we print AIRMAIL?
Do Case
* VIA is domestic
Case Inlist(Left(VIA,1), "K", "W", "N") Or ;
Between(Left(VIA,2), "AA", "AN")
Return .F.
* VIA is empty, but DXCC is domestic.
Case Empty(VIA) And Inlist(DXCC, "K ", "KH6 ", "KL7 ")
Return .F.
endcase
Return .T.
*****************
go to tools/advanced/database commands. Type
compile is_airmail
The PRINT WHEN expression is now simply
IS_AIRMAIL()
Note that a call that starts with N isn't necessarily US.
What I need to do is provide a function in LOGic that returns the
political entity from the DXCC and call.
I'm glad to see some usage of custom reports! Let me know of any ???
Tnx for using LOGic.
73,
Dennis WN4AZY
>
> Hello Dennis,
>
> Is the expression length limit in LOGic8 report writer a limitation of FoxPro or LOGic?
> Specifically, this is with regards to a Label´s Properties and the "Print when" tab´s "Print only
> when expression is true" field has a long expression entered.
>
> To give you an idea of what I want to accomplish is with regards to when "AIR MAIL" gets
> printed.
> There are two variable fields: DXCC and VIA (QSL via). Currently AIR MAIL prints OK unless
> the QSL manager is, for example, outside the USA.
>
> The DXCC USA variables are "K", KH6", and "KL7"
> The VIA variables are `K´, `A´, `W´, `N´
>
> The two OR conditions would therefore be:
> if dxcc = k and via <> k, print AIR MAIL
> if dxcc <> k and via <> k, print AIR MAIL
> and when either is not TRUE, then AIR MAIL does not print.
> Both are necessary to meet the possible field entries into DXCC and/or VIA.
>
>
> Here is current expression which works except when there is a non-US manager for a US prefix:
> dxcc <> "K" and DXCC <>"KH6" and dxcc <> "KL7" and left(via, 1) <> 'K' and left(via, 1) <> 'W'
> and left(via, 1) <> 'A' and left(via, 1) <> 'N'
>
> This is a working expression, limited to "K" in order to test:
> ((dxcc = "K" and left(via, 1) <> 'K') or (dxcc <> "K" and left(via, 1) <> 'K'))
>
>
> This expression is too long, and it is also incomplete as I do not yet have everything for DXCC, it
> does however cover the VIA possibilities:
> ((dxcc = "K" and left(via, 1) <> 'K' and left(via, 1) <> 'W' and left(via, 1) <> 'A' and left(via, 1) <>
> 'N') or (dxcc <> "K" and DXCC <> "KH6" and dxcc <> "KL7" and left(via, 1) <> 'K' and left(via, 1)
> <> 'W' and left(via, 1) <> 'A' and left(via, 1) <> 'N'))
>
> So if I complete the above expression to cover DXCC, it too will be too long.
>
> So, is there a way to make the expression more concise? Or allow the "Print only when
> expression is true" field to accept a longer expression?
>
> Thanks for assistance and any advice you can offer.
>
> Attached is the applicable report.
>
>
> Regards, Bill K1UQ
>
> Ps - are you still using FoxPro? Visual FoxPro? Version??
>
>
================================
WHEN REPLYING, PLEASE INCLUDE A COPY OF
THIS MESSAGE IN YOUR REPLY. THANK YOU.
Personal Database Applications
1323 Center Dr.
Auburn, GA 30011-3318 USA
770-307-1511
770-307-1496 tech support
Check out our web page! Tell others about it! Thanks.
http://www.hosenose.com/
More information about the LOGic
mailing list