QTP in AXIANT 4GL
Joe Boyle
atla38 at dsl.pipex.com
Mon Aug 8 12:37:27 CDT 2005
Hi Syed,
I found some old source code for the 3 quizs in my earlier email and thought
you might find them interesting - they allow quiz reports to print columns
vertically rather than horizontally as below,
2005/08/0 18:31 Page: 4
818 75 1,071 100
820 76 1,077 101
851 77 1,082 102
868 78 1,093 103
883 79 1,117 104
889 80 1,125 105
912 81 1,128 106
926 82 1,132 107
931 83 1,135 108
938 84 1,136 109
943 85
972 86
982 87
990 88
991 89
993 90
994 91
996 92
999 93
1,006 94
1,037 95
1,051 96
1,057 97
1,060 98
1,065 99
110 of 1,232
can cle
set rep nolim
SET BLANK
set page LEN 26 wid 30 images 3
set nostatistics
define ddate_start_p date cent included = parm
define ddate_end_p date cent included = parm
define ddate_start date cent included = ddate_start_p &
if ddate_start_p gt 1000 else 01000101
define ddate_end date cent included = ddate_end_p &
if ddate_end_p gt 1000 else sysdate
define ddate_null char*1 = parm
set sub keep name c:\joetop\phwork\SKIP_PAGE_1
rep summ ddate_start ddate_end ddate_null
BUILD SKIP_PAGE_1
can cle
set nostatistic nowarn
set rep nolim
SQL IN example_4gl DECLARE mydb_cnt CURSOR FOR &
SELECT count (*) mytot FROM &
Orders where ( ( order_date between :ddate_start and :ddate_end )
or &
( ( order_date is null ) and ('N' = :ddate_null ) ) )
SQL IN example_4gl DECLARE dbquery CURSOR FOR &
SELECT * FROM &
Orders where ( ( order_date between :ddate_start and :ddate_end )
or &
( ( order_date is null ) and ('N' = :ddate_null ) ) ) &
order by Sales_Rep_Id ,order_no
ACCESS * c:\joetop\phwork\SKIP_PAGE_1 link to mydb_cnt link to dbquery
define d1 = 1
define d0 = -1
sorted on Sales_Rep_Id ,order_no
set sub name c:\joetop\phwork\SKIP_PAGE_9 keep
rep summ mytot Sales_Rep_Id order_no d1 subtotal reset at Sales_Rep_Id init
d0
BUILD SKIP_PAGE_3
can cle
set rep nolim
SET noBLANK nowarn
set page LEN 34 wid 30 images 3
ACCESS * c:\joetop\phwork\SKIP_PAGE_9
define dpage = floor(d1/75)
define dline = mod (d1,25)
define dcol = mod (d1,3)
sort on Sales_Rep_Id , dpage, dline , d1
page head tab 1 sysdate tab 10 systime tab 70 "Page:" syspage &
skip 2 Sales_Rep_Id mytot dpage skip 2
HEAD AT Sales_Rep_Id SKIP PAGE ;
foot AT Sales_Rep_Id SKIP 2 count " of " mytot reserve 3
head AT dline skip
report order_no d1 reserve 5
BUILD SKIP_PAGE_4
Regards, Joe.
-----Original Message-----
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Joe Boyle
Sent: 08 August 2005 16:16
To: 'Syed Shahul Hameed Mustaffa'; powerh-l at lists.sowder.com
Subject: RE: QTP in AXIANT 4GL
Hi Syed,
the report viewer is simply the blue icon for quiz within Axiant, and you
execute a compiled report for example by calling a designer proc from a
command button as below ( there are many alternatives); also, if you create
a subfile in one of the report viewer quiz's, you can allow the user to
print a copy by accessing the original subfile and creating a report file on
disk which you can then print,
PROCEDURE des dqz2
BEGIN
run command "quiz auto=SKIP_PAGE_1.qzc"
run command "quiz auto=SKIP_PAGE_3.qzc"
run command "quiz auto=SKIP_PAGE_4.qzc"
END
As for the QTP problem, you will probably find that you have to specify
which items link to which as below, otherwise you will get a cross product
of all rows in all tables,
can cle
run n1
req q1
ACCESS Orders link Order_No to Order_No of Order_Dets
output orders update
item order_date final sysdate
output order_dets update
item Prod_Price final Prod_Price + 1000
BUILD batch1
Also, it's usually much faster to use cursors as in the example below,
can cle
run n1
req q1
SQL IN example_4gl DECLARE dbquery CURSOR FOR &
SELECT order_no FROM Orders where not order_date &
between '0001-01-01' and '2005-08-08'
access dbquery
output orders update
item order_date final sysdate
BUILD do_order_dates
Regards, Joe.
-----Original Message-----
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Syed Shahul Hameed Mustaffa
Sent: 08 August 2005 14:53
To: powerh-l at lists.sowder.com
Cc: Joe Boyle
Subject: QTP in AXIANT 4GL
Dear Gurus,
Quick Intro: I'm migrating PH/MPEIX application to AXIANT-4GL/WINDOWS.
The following QTP statement,
access TRANSFER-D in cwdb &
link to COW-D in cwdb &
link to COW-LOC-D in cwdb &
link UNIT-NO of COW-LOC-D to UNIT-M in cwdb
select TRANSFER-D if &
TRNFR-DATE ge TRAN-DT-FR and &
TRNFR-DATE le TRAN-DT-TO and &
TRNFR-TYPE eq "U" and &
TRNFR-SUB-TYPE eq "U" and &
TRNFR-NEW-NO ge UNIT-NO-FR and &
TRNFR-NEW-NO le UNIT-NO-TO
is retrieving all the records of all the tables linked first and
then select specific records out of the entire set. I am have a
relational db (SQL SERVER). Is there any way stop this sequential
access of all records and only select those records I need.
Thanks & Best Regards,
SYED
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
More information about the powerh-l
mailing list