[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Writing SQR Reports to HTML?



> I understand that SQR Workbench V4 will be supporting writing reports to HTML
> but was wondering if anyone is already doing this with earlier versions of the
> product?
>
> If so, do you have any suggestions or sample  code on how to implement writing
> text and numeric columns to HTML.

Ben,

We're using SQR to do two things with the WEB:

1) generate static pages for browsing based on the contents of a database,
2) provide dynamic pages using SQR to implement CGI (Common Gateway
Interface, a mechanism to allow programs to be invoked on the web
server, usually in response to a page form being submitted).

In both cases, we use off-the-shelf SQR and use SHOW or WRITE
to produce the output.  We have a collection of routines that
we use to parse input for our cgi programs, but other than that,
we simply embed the HTML tags directly in SHOW and WRITE statements.

It's worth noting that we decided NOT to use PRINT to write the
HTML to a .LIS file.  Since HTML has its own formatting mechanisms,
we felt that it would be easier to use WRITE to generate to a file,
and SHOW to generate to stdout (needed for the cgi). (Too bad WRITE
doesn't allow you to open stdout).

Ray
----------------------------------------------------------------------
Ray Ontko       |  Ray Ontko & Co  |  "Ask me about SQR and the WEB"
rayo@ontko.com  |  Richmond, In    |  See us at http://www.ontko.com/