Page 1 of 1

Set Default Connections in Designer

Posted: Sat Jun 30, 2018 2:44 am
by marlofs
Hello, we are on evaluation process on using this report. We will integrate the stiDesignerControl to a WinForms in .net. We are using c#. We will integrate it since we want that our user will design their own report.

I would like to verify if the following:

1. How can I set the default DataSource? meaning, when the users created a new report, the DataSource and Tables were already there.
2. How can I hide some Tables(related above)?
3. How can I hide or disable editing of DataSource?

Thanks.

Re: Set Default Connections in Designer

Posted: Mon Jul 02, 2018 2:26 pm
by Lech Kulikowski
Hello,

> 1. How can I set the default DataSource? meaning, when the users created a new report, the DataSource and Tables were already there.

You can add necessary data sources from code before calling new report. Or add data sources in the default template and then load that report.

> 2. How can I hide some Tables(related above)?

You can add restrictions for the Dictionary:
report.Dictionary.Restrictions.Add();

> 3. How can I hide or disable editing of DataSource?

You can use the following option:
StiOptions.Designer.Panels.Dictionary.ShowDataSourceNewMenuItem = false;

Thank you.