Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can send print output as HTML or PDF windows terminal server

Status
Not open for further replies.

savita

Programmer
May 19, 2002
6
HK
We have foxpro 2.6a applications running on Windows 2000 Terminal Server. I need help if its possible to use or link thrid party tools to send Report Form Output in HTML or PDF format.

Your help advise would be highly appreciated.

 
You could simply print to a PDF printer driver. There are a number of variants available, but most all licenses are priced per user.

Rick
 
From DOS foxpro can not print into virtual win.printer directly. If html is enough, you can print report into file and then wrap around him by some tags.
<html><pre> ...report... </pre></html>.
 
I use the following for creating XML files - however, it will work very nicely for HTML as well
Code:
*======================================
store fcreate(fname) to _TEXT
IF _TEXT = -1	&& Can't create low-level file 
                && then exit program
  WAIT WINDOW 'Cannot create the Client Contact XML file, press a key to exit'
  RETURN
ENDIF
  
SET TALK OFF
SET TEXTMERGE ON NOSHOW       && Enable text merge, 
                              && with no output to screen
SET TEXTMERGE DELIMITERS TO   && Default text merge
                              && delimiters <<,>>

TEXT
<?xml version="1.0" encoding="UTF-8"?>
<PdfUpload xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xsi:noNamespaceSchemaLocation="D:\xsd\PdfUpload.xsd">
  <PhpFileName>pdf</PhpFileName>
  <URL><<alltrim(o_catalog('domain eval', 'client', 'website', '"' + client.website + '"'))>></URL>
  <PDF>Submit</PDF>
  <jobno><<alltrim(str(jmast.jobno))>></jobno>
  <pdfname><<alltrim(m.cWebFile)>></pdfname>
  <pdfdate><<xmldate(date())>></pdfdate>
  <pdfnote><<m.cWebStat>></pdfnote>
</PdfUpload>
  
ENDTEXT
=FCLOSE(_TEXT)
*========================================
everything between the << and >> are interpreted by FP
everything else is output to the file literally
so you could to something like this
Code:
<table>
  <tr>
    <td><<alltrim(table1.field1)>></td>
    <td><<alltrim(table1.field2)>></td>
  </tr>
</table>
Hope this is helpful

Kevin P Hall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top