I have Custom.dll for retriving data from database. I don't want to store
connection string in class. Is it possible to store in some RS config file or
i have to use XML file and read from it?
Thx.Yes, create an appSettings element in the RSReportDesigner.config (design
time), and in the Report Server web.config (runtime). Your custom dll will
be loaded in the host process which will allow you to use
ConfigurationSettings.AppSettings to read its configuration settings.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.prologika.com
<AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
news:F67BB6A4-1ABA-40B0-93FC-0ED1BF6C7BCE@.microsoft.com...
> I have Custom.dll for retriving data from database. I don't want to store
> connection string in class. Is it possible to store in some RS config file
or
> i have to use XML file and read from it?
> Thx.|||I apologize for misleading you about the RSReportDesigner.comfit. It's been
a while since I tried this...so, here is the true story:
1. During runtime the report is generated under the Report Server host
process so the <appSetting> section in web.comfig file should work. Try
rendering a report from the Report which has a textbox with the following
expression:
= System.Configuration.Configuration.Upsetting(<your comfit value>)
. Please note that the web.config file already has a configuration section
so you need to add only the <appSettings> element.
2. During design time it is a bit trickier. Unfortunately, the current
configuration handler of the Report Designer doesn't seem to recognize
<appSettings>. However, you can render the report in debug mode by hitting
F5. This renders the report under ReportHost.exe. To get the config settings
working, create a ReportHost.exe.config in C:\Program Files\Microsoft SQL
Server\80\Tools\Report Designer and place your configuration section there
(the <configuration> element should be spelled with small "c"), e.g.:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="serverUrl" value="http://localhost/reportserver" />
</appSettings>
</configuration>
b) To get the Preview tab working you could either check for Nothing and
replace that with a default value, or wrap the ConfigSettings.AppSettings
call to default to some default constant values. Once again, this is only
needed during design time. Your runtime report generation shouldn't need
this hack.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.prologika.com
<AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
news:3F040589-87F9-44FF-A9A8-06DDD8A65B31@.microsoft.com...
> Doesn't work..
> In put this
> <Configuration>
> <appSettings>
> <add key="KipConnectionString"
>
value="UHJvdmlkZXI9SUJNREFEQjIuMTtNb2RlPVJlYWRXcml0ZTtVc2VyIElEPWFwbGtpcDtEY
XRhIFNvdXJjZT1EQjJIT1NUUjtFeHRlbmRlZCBQcm9wZXJ0aWVzPTtQYXNzd29yZD1hcGxraXA="
/>
> </appSettings>
> <Add Key="SecureConnectionLevel" Value="0" />
> <..
> in RSReportDesigner.config and web.config and i still get an error
> The key 'KipConnectionString' does not exist in the appSettings
> configuration section.
> "Teo Lachev" wrote:
> > Yes, create an appSettings element in the RSReportDesigner.config
(design
> > time), and in the Report Server web.config (runtime). Your custom dll
will
> > be loaded in the host process which will allow you to use
> > ConfigurationSettings.AppSettings to read its configuration settings.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > http://www.prologika.com
> >
> >
> > <AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
> > news:F67BB6A4-1ABA-40B0-93FC-0ED1BF6C7BCE@.microsoft.com...
> > > I have Custom.dll for retriving data from database. I don't want to
store
> > > connection string in class. Is it possible to store in some RS config
file
> > or
> > > i have to use XML file and read from it?
> > >
> > > Thx.
> >
> >
> >|||Of course the my spell check has made a mess :-) Please replace comfit with
config and Upsetting with AppSettings.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.prologika.com
"Teo Lachev" <teo@.nospam.prologika.com> wrote in message
news:eAKIjUWgEHA.1644@.tk2msftngp13.phx.gbl...
> I apologize for misleading you about the RSReportDesigner.comfit. It's
been
> a while since I tried this...so, here is the true story:
> 1. During runtime the report is generated under the Report Server host
> process so the <appSetting> section in web.comfig file should work. Try
> rendering a report from the Report which has a textbox with the following
> expression:
> = System.Configuration.Configuration.Upsetting(<your comfit value>)
> . Please note that the web.config file already has a configuration section
> so you need to add only the <appSettings> element.
> 2. During design time it is a bit trickier. Unfortunately, the current
> configuration handler of the Report Designer doesn't seem to recognize
> <appSettings>. However, you can render the report in debug mode by
hitting
> F5. This renders the report under ReportHost.exe. To get the config
settings
> working, create a ReportHost.exe.config in C:\Program Files\Microsoft SQL
> Server\80\Tools\Report Designer and place your configuration section there
> (the <configuration> element should be spelled with small "c"), e.g.:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <appSettings>
> <add key="serverUrl" value="http://localhost/reportserver" />
> </appSettings>
> </configuration>
> b) To get the Preview tab working you could either check for Nothing and
> replace that with a default value, or wrap the ConfigSettings.AppSettings
> call to default to some default constant values. Once again, this is only
> needed during design time. Your runtime report generation shouldn't need
> this hack.
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.prologika.com
>
> <AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
> news:3F040589-87F9-44FF-A9A8-06DDD8A65B31@.microsoft.com...
> > Doesn't work..
> >
> > In put this
> >
> > <Configuration>
> > <appSettings>
> > <add key="KipConnectionString"
> >
>
value="UHJvdmlkZXI9SUJNREFEQjIuMTtNb2RlPVJlYWRXcml0ZTtVc2VyIElEPWFwbGtpcDtEY
>
XRhIFNvdXJjZT1EQjJIT1NUUjtFeHRlbmRlZCBQcm9wZXJ0aWVzPTtQYXNzd29yZD1hcGxraXA="
> />
> > </appSettings>
> > <Add Key="SecureConnectionLevel" Value="0" />
> > <..
> >
> > in RSReportDesigner.config and web.config and i still get an error
> >
> > The key 'KipConnectionString' does not exist in the appSettings
> > configuration section.
> >
> > "Teo Lachev" wrote:
> >
> > > Yes, create an appSettings element in the RSReportDesigner.config
> (design
> > > time), and in the Report Server web.config (runtime). Your custom dll
> will
> > > be loaded in the host process which will allow you to use
> > > ConfigurationSettings.AppSettings to read its configuration settings.
> > >
> > > --
> > > Hope this helps.
> > >
> > > ---
> > > Teo Lachev, MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > http://www.prologika.com
> > >
> > >
> > > <AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
> > > news:F67BB6A4-1ABA-40B0-93FC-0ED1BF6C7BCE@.microsoft.com...
> > > > I have Custom.dll for retriving data from database. I don't want to
> store
> > > > connection string in class. Is it possible to store in some RS
config
> file
> > > or
> > > > i have to use XML file and read from it?
> > > >
> > > > Thx.
> > >
> > >
> > >
>|||Thank you. It's working.
"Teo Lachev" wrote:
> Of course the my spell check has made a mess :-) Please replace comfit with
> config and Upsetting with AppSettings.
> --
> Hope this helps.
> ---
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> http://www.prologika.com
>
> "Teo Lachev" <teo@.nospam.prologika.com> wrote in message
> news:eAKIjUWgEHA.1644@.tk2msftngp13.phx.gbl...
> > I apologize for misleading you about the RSReportDesigner.comfit. It's
> been
> > a while since I tried this...so, here is the true story:
> >
> > 1. During runtime the report is generated under the Report Server host
> > process so the <appSetting> section in web.comfig file should work. Try
> > rendering a report from the Report which has a textbox with the following
> > expression:
> > = System.Configuration.Configuration.Upsetting(<your comfit value>)
> >
> > . Please note that the web.config file already has a configuration section
> > so you need to add only the <appSettings> element.
> >
> > 2. During design time it is a bit trickier. Unfortunately, the current
> > configuration handler of the Report Designer doesn't seem to recognize
> > <appSettings>. However, you can render the report in debug mode by
> hitting
> > F5. This renders the report under ReportHost.exe. To get the config
> settings
> > working, create a ReportHost.exe.config in C:\Program Files\Microsoft SQL
> > Server\80\Tools\Report Designer and place your configuration section there
> > (the <configuration> element should be spelled with small "c"), e.g.:
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> > <appSettings>
> > <add key="serverUrl" value="http://localhost/reportserver" />
> > </appSettings>
> > </configuration>
> >
> > b) To get the Preview tab working you could either check for Nothing and
> > replace that with a default value, or wrap the ConfigSettings.AppSettings
> > call to default to some default constant values. Once again, this is only
> > needed during design time. Your runtime report generation shouldn't need
> > this hack.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > http://www.prologika.com
> >
> >
> > <AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
> > news:3F040589-87F9-44FF-A9A8-06DDD8A65B31@.microsoft.com...
> > > Doesn't work..
> > >
> > > In put this
> > >
> > > <Configuration>
> > > <appSettings>
> > > <add key="KipConnectionString"
> > >
> >
> value="UHJvdmlkZXI9SUJNREFEQjIuMTtNb2RlPVJlYWRXcml0ZTtVc2VyIElEPWFwbGtpcDtEY
> >
> XRhIFNvdXJjZT1EQjJIT1NUUjtFeHRlbmRlZCBQcm9wZXJ0aWVzPTtQYXNzd29yZD1hcGxraXA="
> > />
> > > </appSettings>
> > > <Add Key="SecureConnectionLevel" Value="0" />
> > > <..
> > >
> > > in RSReportDesigner.config and web.config and i still get an error
> > >
> > > The key 'KipConnectionString' does not exist in the appSettings
> > > configuration section.
> > >
> > > "Teo Lachev" wrote:
> > >
> > > > Yes, create an appSettings element in the RSReportDesigner.config
> > (design
> > > > time), and in the Report Server web.config (runtime). Your custom dll
> > will
> > > > be loaded in the host process which will allow you to use
> > > > ConfigurationSettings.AppSettings to read its configuration settings.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ---
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > http://www.prologika.com
> > > >
> > > >
> > > > <AG>; "NLB d.d." <AGNLBdd@.discussions.microsoft.com> wrote in message
> > > > news:F67BB6A4-1ABA-40B0-93FC-0ED1BF6C7BCE@.microsoft.com...
> > > > > I have Custom.dll for retriving data from database. I don't want to
> > store
> > > > > connection string in class. Is it possible to store in some RS
> config
> > file
> > > > or
> > > > > i have to use XML file and read from it?
> > > > >
> > > > > Thx.
> > > >
> > > >
> > > >
> >
> >
>
>
No comments:
Post a Comment