How can I prevent the user from add/modify/remove DataSource/DataSets in the Report Explorer

StackOverflow https://stackoverflow.com/questions/14779309

  •  07-03-2022
  •  | 
  •  

Question

As far as I can tell, the ReportExplorer does not seem to have any properties that will allow me to control this functionality.. I have used reflection to walk through the controls and it seems that the ReportExplorer inherits from UserControl and then has 1 control on it, whose type is protected class member of the ReportExplorer (called GeneralExplorer), I tried looking at the TreeView that the General Explorer contains, and I can get a hold the of the treenodes, but the problem there is I cant seem to figure a way to determine which node I am on and all of the treenodes have a Tag item which again is some protected "General" wrapper class.. I need the report explorer because my users must be able to navigate their document and drag/drop columns etc.. I seems that creating my "own" report explorer tree is out because I can not get the correct drag/drop items to get the designer to behave properly... Any ideas? Am I making this way to hard?

Was it helpful?

Solution

I think writing your own ReportExplorer is your best option in the long run as you'll have the most control over things. Handling drag & drop used to be possible in a much older version of AR. See this article for the details in how it used to work. You might try that approach with this version (i.e. handling DragOver event yourself).

If those events aren't working and Drag & Drop is really important, contact ComponentOne support and see if they will give you the information about exactly what drag & drop data you need to put in the drag event to get the design surface to respond. And/or ask them if they will reinstate the behavior in the article above.

Another option is to add some buttons to your application like "Insert Textbox" and when the user clicks on it, you programmatically add the item to the report. To us geeks this might seem crude at first, but in my experience drag & drop is not all that intuitive for end users so it might be a perfectly acceptable option. That depends on your users though and you know better which approach to take.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top