When you call the GetReportParameters() method and the report contains hierarchical parameters, the SOAP API fully populates valid values in the parent parameter. For the child parameter, however, the API populates only values that are valid for that parent parameter value. In this particular report, the ReportParameters object returned from the server would list all regions but only the states that belong to the first region. Listing 6 shows how you can iterate through all possible combinations of parent-child parameters by using multiple calls to GetReportParameters().The code at callout A first calls this method to retrieve all parameters and sets the name of the parent parameter in the paramValues object. Then it iterates through the values of the parent parameter (Region), populates the paramValues property with the region code, and calls the GetReportParameters() method again. Because the paramValue variable is now populated with the name and value combination of the parent parameter, the SOAP API returns a list of child parameters related to the parent value passed into the method.
Using Report Generation
I've introduced you to the SOAP API interface and shown you the basics of rendering reports programmatically, including how to retrieve, process, and display report parameters. Using the concepts I've discussed and the demo application, you can see how easy it is to incorporate report generation into your applications for report delivery, report archiving, unattended report generation, and other types of reporting.
End of Article
Prev. page
1
2
[3]
next page -->