Introduction
It is possible to generate reports using an HTML format. There are probably as many ways to do it as there are stars in the sky. One way to manage it is to create a hook in your ClearQuest schema that is attached to an action in order to generate the report. This is a way to avoid the dependency on Crystal Reports to produce a "print defect" function.
Content
Hook to execute the report.
Q: How do I create a html report executed from a form?
Create a record hook to generate the html report. (See attachments for a perl example)
Create a button on your form to execute your hook code.
On the properties tab of the button select the hook you created to execute on button press.
Tricks
You may need to create a temporary file on disk to display from the browser. To do this there is code in the example hook in the attachments that will read the users environment variables to create a path.
The execution of the report in the browser may be a little goofy. The way it's coded in the example hook executes an instance of the browser that in most cases will not hang.
The formatting can be done a number of different ways. The example code uses a template system but there are probably many better ways to execute the formatting of the report. Some of the links below can provide you with examples.
See also
http://perldoc.perl.org/perlform.html
http://www.xav.com/perl/site/lib/HTML/FormatText.html
http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html