| 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. 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 - 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 - 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:
Points to notice:
|
||||||||||
|
||||||||||