Use Crystal Reports for that!
According to the test results, apply your Logic and get the report content. Then pass it as parameters to the Crystal Report.
And then, load the report. Then, you can do whatever you want of that!
Save it / Print it / Just close it after viewing!
For the execution or codes, you have to just
Google Search[
^].
Or just go to this link.