Report MERGE (AREV Specific)
At 12 NOV 1998 03:01:55PM Terry Rainville wrote:
Trying to do a report with MERGE processor
1st page has a FOOTER on it
on the 2nd page i would like to modify the FOOTER length
so i need to change the Bottom Paramter on the fly
WHERE DO I FIND THIS PARAMTER IN MEMORY
AS MERGE IS RUNNING AND CAN I CHANGE IT.
At 14 NOV 1998 10:38AM Larry Wilson wrote:
I've never used FOOTING much, but after looking around, the only place I could find it was in SYSCOM. (system common). RTI has kept that to themselves so that we (??? Hmm… I don't know whay.).
Larry Wilson
tardis@earthlink.net
P.S. if it helps, it's variable 114 in SYSCOM, but some that come before are DIMmed, so I'm not sure how you'd find that using PEEK.
Larry Wilson
tardis@earthlink.net
At 14 NOV 1998 02:15PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:
Could you change the report so that instead of using a footer you used a symbolic of sorts, such that it would be recalced on each 'page'?
On the other hand, REVSOURCE has the source to MERGE and I don't see any syscom references in there, just in FOOTER.TXT, which appears to be a standard variable. I don't recall anything from SYSCOM being in merge, except maybe the get current printer stuff, if that was even there.
akaplan@sprezzatura.com
At 15 NOV 1998 07:06AM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)" [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Ltd[/url] wrote:
Doesn't use SysCom to the best of my knowledge - all standard Merge common. We did have a REVMEDIA article on it but I'm at home so not here. Feel free to post.
amcauley@sprezzatura.com
World Leaders in all things RevSoft
At 15 NOV 1998 01:07PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:
As requested:
From Revmedia V1I5A4:
As the sophistication of our user base grows, so does the sophistication of
their demands. A recent case in point was a client who had a twin-bin feeder
on their laser printer and who wanted a MERGE document to print first page
on headed paper and then second page (and all subsequent pages) on
continuation paper.
This obviously involved swapping printer bins with the appropriate escape
sequence using a ] and a ] command. (Just in case you hadn't
noticed, pressing F10 when in the MAKEMERGE window gives you the MERGE menu
and allows you to configure your printer etc.). The only problem with this
approach was that issuing a swap bin command to the laser printer caused a
form feed. This in itself was not a problem, but AREV was not aware that a
page throw had occurred and thus continued printing until it reached the end
of its logical page and then performed a form feed itself. Thus if we were
printing an 80 line document with a page length of 60 lines, and we swapped
bins after 40 lines, AREV printed a further 20 lines on the next page and
then form fed to print the final 20 lines on the third page.
This was really inconvenient. What was required was a ] command
to reset the line counter to 0 without printing a CHAR(12). Without access
to source, I can only suggest this as a possible enhancement - so short
term, I developed a solution to work around this problem.
In the object code for MERGE is contained a literal about "to process". By
experimenting I discovered that if you put a subroutine name preceded with
an @ sign into the PRINTER field on the MERGE document (NB @Routine.name NOT
@S Routine.name@), the partially formatted document is sent to your routine
NOT to the printer. The subroutine is passed two parameters, the id of the
record and the formatted text. All of the printer control commands are left
in], ], ] etc. but all paragraph formatting has been
done. We only need to process this data and ignore the form feeds, applying
our own page control logic. In fact this has much wider application. We
could do ANYTHING with the output, write it direct to a WP file, create a
fax file for pickup by JT-Fax - anything.
In addition to the information passed directly to the subroutine we also
need access to an area of system labelled common called MERGE. This labelled
common area has 26 parameters (I.E. COMMON / MERGE / A,B,C,D,E,F,G,H,I,J,K,
L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z) which are as follows (where ??? is a variable
of unknown usage)
A Data File Name B Dictionary File Variable C ??? D Special Text Data File Name E Top Margin F Left Margin G Page Width - (Left Margin + Right Margin) H Page Height - (Top Margin + Bottom Margin) I Default Format (Coded - 0=Noformat, !=Left, 2=filled) J Heading K Footing L Formatted text - identical to second parameter passed M-P ??? Q %FIELDS% of Data File R File Variable of Special Text Data File S,T ??? U Field mark delimited list of command options , ], ] etc. V Field mark delimited list of printer control codes, ], ] etc. W Special Merge Fields, MRG.DATE, MRG.TIME etc. X ] Y ] Z ]Thus our bin change logic could look something like (assuming HP.DESKJET
printer and bin changes in ] and ] and with apologies for
tersity of code)
<code> SUBROUTINE PRINT.MERGE(ID,TEXT) COMMON /MERGE/ A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z EQU PRN$ TO "HP.DESKJET" EQU PAGE.LEN$ TO 60 PRIN.CODES=XLATE("MRG.PRINTER.CONFIG"'PRN$,"","X") * Get control codes for bin changes CODE=]" ; GOSUB GET.CODES ; BIN1=CODES CODE=]" ; GOSUB GET.CODES ; BIN2=CODES CTR=COUNT(TEXT,@FM) + (TEXT#"") FIRST.PASS=1 ; PRINTER ON ; PRINT BIN1 ; LINE.CTR= 0 FOR LINE=1 TO CTR CL =TEXT ; NO.MORE.CHANGES=0 LOOP UNTIL NO.MORE.CHANGES DO QX=INDEX(CL,]" : ]]" ; S.COL2=COL2() IF CODE=]" THEN CODE=" ELSE GOSUB GET.CODES END CL=CL1,QX-1 : CODE : CLS.COL2+1,9999 END ELSE NO.MORE.CHANGES=1 REPEAT PRINT CL ; LINE.CTR += 1 IF LINE.CTR=PAGE.LEN$ THEN IF FIRST.PASS THEN PRINT BIN2 ; FIRST.PASS=0 END ELSE PRINT CHAR(12) LINE.CTR=0 ; *Reset line count END NEXT PRINT CHAR(12) ; PRINTER OFF RETURN GET.CODES: LOCATE CODE IN V USING @FM SETTING POS THEN CODES=" NEW.CTR=COUNT(PRIN.CODES," ") + 1 FOR BX=1 TO NEW.CTR CODES :=CHAR(FIELD(PRIN.CODES," ",BX)) NEXT END RETURN</code>
(Volume 1, Issue 5, Pages 4,9)
At 16 NOV 1998 02:27AM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)" [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Ltd[/url] wrote:
Thanks dude!
amcauley@sprezzatura.com
World Leaders in all things RevSoft