Depending on the kind of update (and objects concerned by the update), you can use either the free craxdrt.dll (Designer Runtime Library.) or the not free craxddrt.dll (Designer Design and Runtime Library). I forgot the details but you will surely find them on the net.
Your questions:
- Filter: it is possible to update the SQLQueryString of the report object at runtime or to update predeclared parameters so that they will be added to the 'Where' clause. I think adding parameters is limited to the craxddrt dll but updating existing ones can be done with the craxdrt dll. You can use the CR interface to update these parameters, or do it through code: one idea would be to update these values in your client interface (from the active form for example) and update them programmatically. Please check here for an example.
- Hidding tables: I don't think that 'hidding tables' makes any sense, as you will need your tables to have all your relations available to calculate your summary values. Thus you can propose to your users the possibility to view/hide details or to view/hide your different grouping levels. This can easily be done with the free craxdrt library and the 'areas' collection/'suppress' method of the report object.
- Once again, playing with the different areas of the report seem to be the best solution here
- I advise you not to think about it! Changing data order can lead to unpredictable results, specially when you calculate intermediate summaries at the group level. Depending on your requests, you could stick to proposal (2), by displaying of not a specific group on the report, or, for simple forms (1 group only), programmatically update at runtime a parameter that will be used in the group definition formula.
- Back to proposal (2): build a complete report will all expected data to be displayed, then hide/show the different sections of the report.
There is another code example available here, showing you how to change the report connection to a different database/different tables at runtime.
Philippe Grondier
2009-01-20 11:17:15