Before programming with the Result Viewer Bean, you need to import the classes of the Result Viewer Bean by adding the following import statements to the beginning of your program. The first import statement is added to import the bean class:
|
Then, you need to create an instance.
To run with the JReport Result Viewer Bean, you should first create an instance of it. The constructor of the Result Viewer Bean has no parameter. After the object has been created, you should then set the report name and temp path (if not set, the current path will be used).
|
With the JReport Result Viewer Bean object, you can show the report result and export it to other formats or to printer. You do not need to create a bean for each report. The Result Viewer Bean provides many useful methods.