Hi Stuart,
In the code behind in the plugin defining the indicator panel, you'll see this line:
- Code: Select all
IndicatorPanelSalesOrdersWithBackorders.StoredProcName = "usp_JIWA_Dashboard_Indicator_CRM_MySalesOrdersWithBackorders"
That stored procedure is called when the dashboard is read to display the panel data -
but the results from that stored procedure also includes a stored procedure name to use when the panel is clicked (usp_JIWA_NavigationList_MySalesOrdersWithBackOrders).
The indicator panel control we use will, on click, create a new instance of a NavigationList type form, and we set the stored procedure that NavigationList form to use the usp_JIWA_NavigationList_MySalesOrdersWithBackOrders stored procedure - that stored procedure returns two result sets - one defining the column schema, and another the data. The NavigationList form will call a method of the JiwaGrid control to build it's grid based on the 2 result sets of that stored procedure.
Just like magic!
The sample plugin
Simple Performance Metrics also uses a NavigationList type form which can be loaded from a menu to automagically load a form with a single grid populated from a stored procedure - in case you don't want or need to use an indicator panel, but just simply want to load a form.
You can also control the background colour used per cell - take a look at the stored procedure usp_JIWA_NavigationList_MyCustomers to see how we did that (also used by the CRM dashboard to make sales figures RED or GREEN based on a comparative to the budget figure).
Mike