<a href="/"><img src="http://www.scibit.com/assets/title.gif" border="0" alt="SciBit 2005 Flash"></a>
MyReporter Examples

Following are some examples of working with the MyReporter CGI using a couple of reports designed with Mascon or MyCon.

NOTE:  The samples pass all form data using GET in order for you to see the final full URL and thus all the parameters passed to the MyReporter CGI.  It is of course just for the sake of an example, as you can pass many of the form variables using a POST in order to hide the variables.  Furthermore, it goes without saying that you need either Acrobat, MSExcel and/or MSWord installed for some of these examples to display their output correctly.

Example #0:

This sample is the simplest format of using the MyReporter.  It opens a new browser for you, then loads a template report from a file, generates the report by querying the MySQL database live and output the report to the new browser in PDF format.  NOTE: This specific example report contains images and the resulting PDF is thus ~160Kb in size which might take a few seconds to load depending on your connection speed.  Following examples are much smaller, with reports ranging from ~5Kb to ~20Kb in size.
Report

Example #1:

The following report template includes an embedded search parameter on the Company Name.  Thus the same template can then be used interactively with the end-user, ex. supply a value for the Common Name, ex. B, to see all the companies of which the name starts with a B:

 Just pick a format and click the Report button -

Company:
Report

Example #2:

This is the same report as in example #1, but this time it will email the report to an email address of your choice as an attachment.  The report is again filtered for only companies starting with a "B", thus generating only a one page report. So, please feel free to email yourself.  The attachment is only about 5Kb in size if PDF is selected:

 Just pick a format, supply an email address and click the Report button -

Email To:
Report

Example #3:

This last example displays the password encryption function of the MyReporter.  What you will do, is to take your MySQL or SMTP password while you still develop your website, give it to this function. The encrypted password will then be displayed to you.  This new encrypted password can then be put in the MyReporter INI file.  When you call MyReporter for reporting or emailing, it will read the encrypted password, decrypt it and use it as your real password for MySQL or SMTP.  This is just in case your INI-file gets exposed or if you can't hide it from anonymous browsers on your website.  As said before, these are all just additional security measures on top of MySQL's already complete security, because you can limit the user/password you use for your MySQL connection to READ only privileges on top of limiting the user to only certain databases, tables and columns, as well as limiting the user/password to be only able to login from the web server and not all IP's, all in MySQL's own security settings (see your MySQL Manual for more on this):

Password to encrypt:
Encrypt

Points to notice:

  • The main settings, i.e. MySQL host/port/database/username/password and SMTP server etc, of the MyReporter is in a hidden INI file which is not accessible anonymously.  Thus, only the minimum information needs to be passed to the MyReporter CGI via a GET or form POST.  Even your report templates can reside in a MySQL table's blob column, which then voids the need for the report templates to reside in physical files on this web server.
  • The INI file format supports multiple usernames, databases and servers.
  • Emailing a report is setup by default in such a manner that you can redirect the CGI to a result page of your choice using the "respond" parameter. It is also important to understand that you don't have to save your report templates to a file, but that you can save them to a MySQL database "report" table in a BLOB/MEMO column and then instruct the MyReporter to fetch the templates from the record instead of a file, for more details on this please see the MyReporter Help documentation.

Home •  Forum •  Campus •  Help •  Secure •  Contact •  Network •  About
MyCon •  MyReport •  MyLook •  Mascon •  Sepix •  LibraryGen •  MirrorMaster
MyComponents •  MyX •  AsciiDataset •  OnDemand Install

Copyright © SciBit - Scientific Bitware
Google
Web SciBit.com