Printing to a file
John Esak
john at valar.com
Thu Sep 9 19:08:35 PDT 2004
> -----Original Message-----
> From: Jim Fry [mailto:jimfry at cnx.net]
> Sent: Thursday, September 09, 2004 9:03 PM
> To: john at valar.com
> Subject: Re: Printing to a file
>
>
> John:
>
> This worked famously.... I now have headings too!!!!! I'm
> beginning to look
> far to professional! Thank you.
>
> Now that I'm on a roll, may I ask you a couple more related questions?....
>
> I would like to put a blank line between the headings & the body of the
> report.
Okay, that's real easy notw that you have the hang of it. Change your
processing to look like this.
TOP if:
then: export WORD col=C:\myexport.csv
if: fl eq ""
then: fl(1,*,g)="1"; gosub heading; goto TOP
if: fl eq "1"
then: fl="2"; gosub blnk_ln; goto TOP
if:
then: col(1)=14; col(2)=15; col(3)=9
if:
then: col(4)=11; col(5)=295; col(6)=3
if:
then: end
heading if:
then: col(1)="Title_of_column_1"; col(2)="Title_of_column_2" ...
if:
then: col(4)="Title_of_column_4"; col(5)="Title_of_column_5' ...
if:
then: return
blnk_ln if:
then: col(1)=""; return
>
> Also, some of my headings are two words... like "Total Sales" & I
> would like
> the word 'Total' to be on the top line & the word 'Sales' right
> below it on
> the next line... is that possible?
>
Okay, now that you see the technique from the above addition of a blank
line. You could use this method to put two title lines first... and then the
blank line as follows. (look at these two sets of processing closely to see
the subtle differences and fully understand the technique being used to get
the extra lines.)
TOP if:
then: export WORD col=C:\myexport.csv
if: fl eq ""
then: fl(1,*,g)="1"; gosub heading; goto TOP
if: fl eq "1"
then: fl="2"; gosub head2; goto TOP
if: fl eq "2"
then: fl="3"; gosub blnk_ln; goto TOP
if:
then: col(1)=14; col(2)=15; col(3)=9
if:
then: col(4)=11; col(5)=295; col(6)=3
if:
then: end
heading if:
then: col(1)="Title_of_column_1"; col(2)="Title_of_column_2" ...
if:
then: col(4)="Title_of_column_4"; col(5)="Title_of_column_5' ...
if:
then: return
head2 if:
then: col(1)="Sales"; col(2)="YTD"; ...
if:
then: return
blnk_ln if:
then: col(1)=""
if:
then: return
> Thirdly, I notice that the words in my heading seem to be left justified &
> the numbers in my report seem to be right justified... is there any way to
> get the headings to be right justified too?
Oops... we've just jumped out of simple exporting of data to Excel... and
into the font/style frying pan.... more stuff you would do _inside_ Excel
itself. My suggestion is to design an Excel spreadsheet that has the
formatting you like... and then read this data into it. I know this can be
done in various ways... but honestly, I don't do it, so I haven't really
investigated it. What I'm saying is I can help you with almost anything
about filePro ('ceptin fpGI stuff) and all the other stuff needs to come
from others. Sorry Jim.
John
More information about the Filepro-list
mailing list