Page 1 of 1

Hide connection string in Report Designer

Posted: Thu Jun 04, 2009 8:52 am
by robinpearce
Hiya,

Is there any way to hide the Connection String inside the Report Designer ?

This is required because we have wrapped the designer up in our own application and we automatically make the connection to the database for the operator, but we really do not want the customer to see the logon details.

Any ideas would be gratefully received.

Many thanks
Robin


Hide connection string in Report Designer

Posted: Mon Jun 08, 2009 5:24 pm
by Edward
Hi Robin,

Yes, there is a way how to hide a Database connection with a certain name from Dictionary.

Use the special Restrictions class. For example:

report.Dictionary.Restrictions.Add("Demo", StiDataType.Database, StiRestrictionTypes.DenyShow);

Here is the definition of the StiRestrictionTypes enumeration:
public enum StiRestrictionTypes
{
None = 0,
DenyEdit = 1,
DenyDelete = 2,
DenyMove = 4,
DenyShow = 8
}

Thank you.

Hide connection string in Report Designer

Posted: Tue Jun 09, 2009 7:11 am
by robinpearce
Thank you very much Edward.

That is exactly what I needed

Thanks
Robin

Hide connection string in Report Designer

Posted: Thu Jun 11, 2009 7:19 pm
by Edward
Hi Robin,

You are welcome :)

Please let us know if you need any help.

Thank you.