Hide Connection String from report designers

Stimulsoft Reports.NET discussion
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Hide Connection String from report designers

Post by jay@bplogix.com »

Actually the connection is named "BUILTIN" ... the DataSource names do not have any designators.

So I want to "remap" the connection (or drop and re-add) named BUILTIN (and datasource children) from an XML connection into a SQL Server connection. But there does not appear to be any "link" from the DataSource to the connection so when I iterate through the DataSources, I have no idea if a DataSource is "under" the connection named BUILTIN.

Thanks!
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Hide Connection String from report designers

Post by Jan »

Hello,

Unfortunately you can't use data sources from one type of connection to other type of connection. You need recreate datasources again. But you can use one trick. You can open your report file in any xml editor. After then you can replace string "DataTableSource" to "Stimulsoft.Report.Dictionary.StiSqlSource".

Thank you.
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Hide Connection String from report designers

Post by jay@bplogix.com »

I can delete and then re-create the data sources ... that is not a problem. The problem I have is that I do not know which datasources to delete. I cannot find any "pointer" back to the Connection. The connection is named BUILTIN so that I know which one to delete. I ONLY want to delete/re-add the datasources that are for the specific connection named BUILTIN. Is there any way to to this? Is there any way to know the name of the connection for a partcular datasource? Or is there some way to put "context" information into the connection or datasource so I know which ones they are at runtime?
thanks!
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Hide Connection String from report designers

Post by Jan »

Hello,

Each data source have NameInSource property. In your case you will see in this property something like: "BUILTIN.Table1".

Thank you.
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Hide Connection String from report designers

Post by jay@bplogix.com »

Perfect, thanks!

Perhaps in the future you could add that property to StiDataSource (it is in StiDataTableSource, etc) ... but I have a great solution now, thanks!
Post Reply