SqlReport
---------


NOTE:  This is unsupported code for example purposes only.



What is it?
----------

This module implements a form of server side includes where you can
include the result of an SQL select statement in the output of a page.



How do I load it?
----------------

To load on Unix, compile and link the module using the included
Makefile.  Then, move the sqlreport.so file to the ~nsadmin/bin
directory and add the following to the [Modules] section of your
nsd.ini file:

Load=sqlreport.so(SqlReportInit)

To load on NT, compile and link the module using the included
sqlreport.mak Visual C++ project file.  Then, move the sqlreport.dll
file to the ~nsadmin/bin directory and add the following to the
[Modules] section of your nsd.ini file:

Load=sqlreport.dll(SqlReportInit)



How do I use it?
---------------

To use the module, you first must create a page that has a <SELECTSQL>
tag.  You can do this in NaviPress with the "Special Tag" feature.  For
example, here's how you would create a page to report the list of
NaviServer users:

1.  Open NaviPress.
2.  Create a new page by selecing "New Page" from the File menu.
3.  Enter some text, perhaps "Here's a list of users:".
4.  Select "Special Tag..." from the Element menu.
5.  Enter the following in the Special Tag entry box:

	SELECTSQL SRC="select * from ns_users;" MAX=40

6.  Press OK to insert the special tag.
7.  Save the page to the server by selecting "Save As..." from the
File menu.  Save it to an URL such as "http://yourserver/usersrep.htm".
8.  Open the page, prepending SqlReport to the URL filename, e.g.,:

	http://yourserver/SqlReport/usersrep.htm

You'll get a page with the list of users where the special tag was
inserted with NaviPress!  If you have more than 40 users, you can
increase the MAX= attribute.  Note that if you open the real URL
(http://yourserver/usersrep.htm), you won't get the list of users but
just the text and, hidden on the page, the special tag.
