IReport Plugin Full Documentation
Interactive Reports create a text-based window in Understand to display information of your choosing. They can reference the entire Project, a given Architecture, or a specific Entity, and they can be as simple or complex as your imagination. Here is an IReport that ships with Understand that shows all the API information available for the selected entity. To see it yourself just right click on an entity in your Understand project and select Interactive Reports->API Info
Creating your own IReport Plugin
All IReport Plugins are python scripts just like the graph plugins in the previous tutorial. How to start a plugin script was covered in Tutorial 5 so we will skip that part and jump right into the logic.
An IReport must have a function called generate(report, target). This is where the report generation logic will be placed. A basic template for this report would look like the following:
The report parameter being used by generate() is an IReport object, this is how we will access various methods for our IReport. The target parameter is what the user has selected in Understand.
The rest of the function is easily explained by the comments contained in the code itself.
For more examples of what IReports can do, like checking your code complexity, grouping parameters by value, and finding all macro uses in a file, check out our Github plugin repository.
We also have some real world IReport uses on our blog: Custom Report: Finding Parameter Values
Continue to API Tutorial 7: Retrieving Violations ->
<- Return to API Tutorial 5: Graphs
Need help? Contact [email protected] or visit our About the Understand Python API page.