Last Updated: 03 Jul 2020 11:03 by ADMIN
Created on: 03 Jul 2020 11:03
Type: Feature Request
Make IDataItem interface public


I'm not reporting an issue here, just making a suggestion about a minor change that I would consider as an improvement.

I'm loading at runtime a report template that was created using the standalone report designer. I'm dynamically replacing all the 'DataSources' of the report, and thus I have to go through all the items of the report to find them all.

The first step is to flatten all the items with a recursive call, starting from the 'Report'. I get a list of ReportItem, and I can cycle through this list and find those that inherits from 'DataItem'. From there, I just have to pick all the distinct DataSources from these DataItems.

And it almost works, except that I'm missing the DataSource from the Report itself, as the Report class does not inherit from DataItem but implements IDataItem.

If IDataItem was public, I could simply use it instead of 'DataItem', but as it is internal I have to handle a special case. And I don't like that.

Maybe I'm missing a good reason to keep this interface internal, but if not my suggestion is to make it public.