× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: Rich Text Format
  • From: DReid@xxxxxxxxxxxxxxxxxx
  • Date: Wed, 28 Mar 2001 12:32:42 -0500
  • Thread-Index: AcC3pe3C0GkrMOBvTRya8cjox1EPdwABnhaA
  • Thread-Topic: Rich Text Format

Thanks Scott
This is exactly what I was looking for. 
It seems so easy, it is hard to believe that I did not think of it
myself.
Thanks again.
Whatever the negative discussions. This site rocks.

-----Original Message-----
From: Scott Mildenberger [mailto:Smildenber@Washcorp.com]
Sent: Wednesday, March 28, 2001 11:29 AM
To: 'JAVA400-L@midrange.com'
Subject: RE: Rich Text Format


We are working on an application that use rich text format to allow
users to
view spool files in a browser.  It uses Net.Data and RPG/CL but you
could
use the same techniques.  We created a rtf header file by creating a
document in word and saving it as a rtf file and then using Notepad to
delete from where the document text starts to the end of the file.  We
create the document in Word as landscape with 1" top and bottom margins
with
a font of Lucinda Console 8 point.  Then when outputting the output you
copy
this header file then append your text with the rtf formatting codes.
Below
is the Net.Data function (we got it from Ignite400's forum) that reads a
PF
created from CPYSPLF with the *FCFC option and outputs the data in a rtf
format retaining the formatting.  If you need any help interpreting the
function below you can e-mail me privately.

Scott Mildenberger

%function(dtw_sql) tblget() {
SELECT * from $(LIB).$(RTFFILE)
 %report {
    %if (WIDTH == "80") @dtw_assign(rcdlen,"80")
    %else @dtw_assign(rcdlen,"132") %endif
    @dtw_tb_setcols(Table1,"1") @dtw_assign(Row1,"0")
  %row {
        @dtw_substr(V1, "1", "1", " ", PrtCtl)
        @dtw_substr(V1,"2",rcdlen," ",PrtData)
        %if (PrtCtl == "1")
            %if (FirstPage == "1") @dtw_assign(FirstPage,"0")
            %else @dtw_assign(CtlData,"\par \page") %endif
        %elif (PrtCtl == "+")
            @dtw_assign(y,"0")
            %while (y < rcdlen) { @dtw_add(y,"1",y)
              @dtw_substr(PrtData,y,"1"," ",Chr)
              @dtw_substr(SavData,y,"1"," ",Sav)
              %if (Chr == " " && Sav != " ")
                 @dtw_delstr(PrtData,y,"1",PrtData)
             @dtw_insert(Sav,PrtData,@dtw_rsubtract(y,"1"),"1",PrtData)
              %endif
            %}
        %elif (PrtCtl == " ")
             @dtw_assign(CtlData,"\par ")
        %elif (PrtCtl == "0")
             @dtw_assign(CtlData,"\par \par")
        %elif (PrtCtl == "-")
             @dtw_assign(CtlData,"\par \par \par")
        %endif
        %if (CtlData != " ") @dtw_concat(CtlData,PrtData,PrtLine)
        %else @dtw_assign(PrtLine,PrtData) %endif
        @dtw_assign(SavData,PrtData)
        %if (PrtCtl != "+")
           @dtw_tb_appendrow(Table1,"1") @dtw_add(Row1,"1",Row1)
        %endif
        @dtw_tb_setv(Table1,PrtLine,Row1,"1")
  %}
        @dtw_tb_appendrow(Table1,"1") @dtw_add(Row1,"1",Row1)
        @dtw_tb_setv(Table1,"\par }}",Row1,"1")
 %}

> -----Original Message-----
> From: DReid@capitalfactors.com [mailto:DReid@capitalfactors.com]
> Sent: Wednesday, March 28, 2001 7:57 AM
> To: JAVA400-L@midrange.com
> Subject: Rich Text Format
> 
> 
>       Hi. 
>       I am new to Java and have been a RPG programmer. A group of us
> wrote a servlet application that archives our AS400 reports and allow
> for printing. I have recently added email capability, this is ideal
> since some of our clients will require pages of our reports emailed to
> them. 
>       The report is sent in the email as a .txt file attachment.
> Viewing the attachment is great, however, printing is another thing.
> Most of our reports are 132 columns. 
>       Is there any way to format the attachment to print in landscape
> and have the form feed done at the correct place without user
> manipulation.  Someone told me about RTF. My investigations 
> only show a
> swing class that allows the user to edit such a file. 
>       Is there any way to send the necessary report format that will
> allow editing. 
> 
> Thanks.
> 
> 
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to
JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---




The information transmitted by the following E-Mail is intended only for the 
addressee and may contain confidential and/or privileged material. Any 
interception, review, retransmission, dissemination, or other use, or taking 
any action upon this information by persons or entities other than the intended 
recipient is prohibited by law and may subject them to criminal or civil 
liability. If you received this communication in error, please contact us 
immediately at 954-730-2900 ext. 3600 and delete the communication from any 
computer or network system.


+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.