## Using JSPs to print report sets

JReport Enterprise Server provides the following demo JSPs which enable you to print a report set without any view in the client side, and they are contained in the zip file printDemo.jsp.zip in `<install_root>\help\server\en\samples`.

- printDemo.jsp
  Provides frames to load printCustomerlist.jsp and printReport.jsp.
- printCustomerlist.jsp
  Shows how to set parameters for printing the demo report set CustomerAnalysis.cls by using the ViewerApplet. This JSP calls printReport.jsp. If you want to print the other report sets, you can follow this JSP file as an example to write your own JSP. In your own JSP, you should modify the values of "cat" and "rptName".

  `String cat = "/SampleReports/SampleReports.cat"; //request.getParameter(APIConst.TAG_CATALOG);
  String rptName = "/SampleReports/CustomerAnalysis.cls"; //request.getParameter(APIConst.TAG_REPORT);`

- printReport.jsp
  Shows how to print report sets by using the ViewerApplet. The example JSP printCustomerlist.jsp calls this JSP.

Before running the JSPs, you should unzip and copy them to `<intall_root>\public_html\jinfonet`. Then, start JReport Enterprise Server and access printDemo.jsp using the URL `http://localhost:8888/jinfonet/printDemo.jsp`. The following page appears:

PrintInCurrentFrame

Set to call printReport.jsp and load applet of JReport Viewer Frame.

PrintInHiddenFrame

Set to call printReport.jsp without loading applet of JReport Viewer Frame.

Reset

Reset the previous options.

View

View this report set.

Interactive

If checked, you could specify the print setup in the Print dialog.

Background

If checked, the print job will run in the background.

UseJDK11

If checked, you will use instance PrintJob of JDK11 to print the report set.

Wait

If checked, you have to wait until the print job is finished.

SeparateLargePage

If checked, the large page will be separated into several pages automatically.

NotifyComplete

This parameter is used with the parameter wait. After the print job is finished, a box will pop up to note you, and you could do any other work instead of keep on waiting.

Printer

Specify the printer to implement the print job.