Product How-To: Creating Parameretized Reports

While simple replets such as the one in the previous example are very useful, the replet API enables the building of much more powerful and flexible replets. An important concept is that of parameterized reports. Parameterized reports allow the replet to collect user input before or after report creation. It is up to the replet to use the parameter values to customize the final report.

There are multiple entry points for parameters to be passed to a replet: replet creation time, replet initialization, user-initiated customization, replet-initiated parameter prompting, etc. We cover the first two types of parameter passing in this chapter. The last two forms of parameterization are covered in subsequent chapters.

As a general mechanism for collecting user information and facilitating user interaction, the parameterization support in Style Intelligence can be used for any purpose a user chooses.

It is highly recommended that parameters be declared at the template level. This gives the designer the added functionality of creating a customized parameter dialog. InetSoft products also provide support for staged and cascaded parameter prompting

Read how InetSoft saves money and resources with deployment flexibility.

Creation Parameters

When a replet is called to create a report (ReportSheet), a set of user parameters is passed to the BasicReplet.createReport() method. There are two types of creation parameters.

• If creation parameters are declared for a replet, an input dialog is presented to the user to prompt for parameter values by default. The replet is not responsible for providing the visual dialog for collecting the information. Instead, the replet declares the types of the parameters it expects and the replet environment translates that specification into appropriate input components on the dialog.

• For the second type of creation parameter, the parameters are declared at deployment time and therefore entered in the Enterprise Manager and stored in the replet XML repository. If the parameters are specified in the configuration file in this way, then users will not be prompted when opening the replet. In the documentation, we refer to this second type of parameter as a default parameter and discuss this in the next chapter, Default Parameters. A default parameter is exactly the same as a creation parameter, except that the value of the parameter is sent when the report is created and no user interaction is required.

Notice that the API itself does not specify the visual presentation of the values. It is up to the implementation of the replet environment to choose an appropriate visual component to handle the input and presentation of each type of object. The components may be different depending on the availability of the viewer platform.

Read why choosing InetSoft's cloud-flexible BI provides advantages over other BI options.