Jump to content


Photo
- - - - -

How to format text file in pro-iv


23 replies to this topic

#16 mmeneses

mmeneses

    Member

  • Members
  • PipPip
  • 43 posts
  • Gender:Male

Posted 11 March 2004 - 01:55 PM

Vol, Joe Prystal had a small stroke two weeks ago and he was home last Friday and he’s doing well.

I have CRON that runs every night and call a scheduler program written in pro-iv. This Scheduler is a recursive program that calls a bunch of report function. Every morning my user prints this report and forwarded these to the supervisors, managers and customer service.

There are 16 reports and each report average of 5 pages so we are talking here an average of 80 pages. Currently the total recipients of these reports are 6 people and could be more in the future, so there are 480 pages every morning spent on this report. Not all recipient are reading the status they just want a copy.

To reduce this paper works I come up with this idea of automatic email and attach the reports. The current system will stay the same but the user doesn’t need to print all the reports.

I’m done with all the coding, testing and debugging… in short it’s finished. The problems arise when I print the attachment because it’s not the same as the actual report. The spacing was short and the font size was not the same as the pro-iv report. The page was overlapping.

I was able to make a work around and it was okay for me but not for the user. They don’t want to setup the report. They just want to open the attachment and print it… NO MORE EXTRA ACTIVITY.

Right now I’m working on a solution and I’m doing it in VB.net. Basically the process was transferring this text file to a word document. I try the RTF yesterday but I cant find the properties for a landscape. In WORD object this property is available.


So that’s my story and that what keep me busy…

#17 Rick San Soucie

Rick San Soucie

    Member

  • Members
  • PipPip
  • 36 posts
  • Gender:Male
  • Location:Dallas, United States

Posted 11 March 2004 - 03:13 PM

On our HP-UX box, I have been using a little utility called mpack. This allows me to email a file as a MIME attachment. We use it primarily to email pdf files our system generates, although it could easily attach text files as well.

This can be found:

mpack, version 1.5

The actual package resides in ftp://ftp.andrew.cmu.edu/pub/mpack or from a mirror, like ftp://ftp.uu.net/networking/mail/mpack.

#18 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 12 March 2004 - 01:05 AM

Mike,

Yes I know about what's happening to Joe. He will be in Hospital next week....

In your case, wonder if your users accept to PRESS ONE MY BUTTON in MS Word? You can create a MACRO for them to format all reports with proper font size and font type after open up the attachment before print?

Regards,

Vol

#19 Guest_Josef Derflinger_*

Guest_Josef Derflinger_*
  • Guests

Posted 19 April 2004 - 07:48 PM

I had a similar problem with vms. I changed all my ftp transfer to asciii. Ftp took care of the formatting for windows.
Hope same will work for you.

#20 Kevin Bruss

Kevin Bruss

    Expert

  • Members
  • PipPipPipPip
  • 113 posts
  • Gender:Male
  • Location:Oklahoma City, OK

Posted 29 April 2004 - 06:49 AM

I'm guessing a bit here, but isn't there a @[$~] variable that could dynamically set
in the logic-in of the report function for when the batches run?
ie, to 66 by default, and 58 for batch ?

#21 Guest_Rudi_*

Guest_Rudi_*
  • Guests

Posted 29 April 2004 - 11:00 AM

Hi mmeneses,
you may create the printfile as html file.
Add the following lines to the page header:


Your report title



Add the following as last line to the end of report header:



Blank out page size and print only first page header.
Count the currently printed lines with @LINE.
After each x lines (i.e. 66) add the new html command "page-break-after" with the following syntax:

space


Your text line



Note: Internet Explorer 4.x or higher is required. This command will not work with other browsers.

As you are using html as output file, you may also specify a font (i.e. courier 8)

Boot the outputfile to Internet Explorer, you may use the SYSTEM() command.
Within Internet Explorer you simply print the entire page.
"Page-break-after" invokes proper page-breaks on your printer.
Kind Regards

Rudi

#22 Guest_Rudi_*

Guest_Rudi_*
  • Guests

Posted 29 April 2004 - 11:07 AM

Oops,
forgot to enclose html tags:
Page header:
""
""
"Your report title"
" "
""

End of report:
""
""

Page Break after "x" lines:
"

space

"
"

your text lines

"

#23 Guest_Guest_mmeneses_*

Guest_Guest_mmeneses_*
  • Guests

Posted 29 April 2004 - 12:39 PM

Hi Rudi,

Thanks for your reply... I'm not familiar with directing output file to an html. Do you have sample code for this ? thanks and I appreciate it.

#24 mmeneses

mmeneses

    Member

  • Members
  • PipPip
  • 43 posts
  • Gender:Male

Posted 23 August 2004 - 06:52 PM

our unix guy found a shareware program that works for me. The application name is "Ascii2Pdf" what it does is to convert my ascii file to a pdf format. Instead of sending a txt file to the user I send it as a pdf file. Here is my sample command that converts my txt file to a pdf with the following format.

- landscape
- 8.0 point

ascii2Pdf -l -p8 /raid0/glovia/prod/userdata/bude_shop.txt

thanks,
Mike



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users