Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Crystal Reports via WebService Dynamic datasource

Reply
Thread Tools

Crystal Reports via WebService Dynamic datasource

 
 
Ron
Guest
Posts: n/a
 
      10-10-2004
I have a bunch of Crystal Reports (v9) published as WebServices and use a
ReportViewer to display the reports on the ASPNET page. Everytime we move
the reports from dev to production we have to open the reports and manually
change the datasouce to the production database. Is there a way to set the
datasouce on the webserviced reports dynamically?

(A datasource property or something?) cant seem to find anything.

Thanks!


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      10-11-2004
Hi Ron,

From your description, you're using some crystal reports on asp.net pages
and these reports use asp.net webservive to provide the datasource.
However, since the webservice's deployment server will change , you're
wondering how to speicfy the webservice's target url dynamically ,yes?

As for the webservices, how are you consuming them, are you use the add
webreference in vs.net (or use the wsdl.exe) to create the client proxy
class? If so, you can have a look at the proxy class 's "Url" property
which is used to speicfy the webservice's target url such as
"http://servername/virutual dir/service.asmx"
We can change it at runtime programly.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
 
Ron
Guest
Posts: n/a
 
      10-11-2004
Sry, I had a bad explanation of the probelm.

I do have the dynamic url assigned to the proxy on the webserver, but what
I'm tring to do is have the webservice "report" that is called looking at a
dynamic datasource (pulled from the web.config)

Our situation is that when we are deploying from the staging server to the
production. When we're testing, the report is pointing to the developement
database. When the deployment to production is made I have to open up
Crystal Reports (v9) and adjust the datasource through going to
MainMenu ->Database->SetDatasourceLocation. After the reports DataSources
are updated then the reports are "Published as Web Services" and the project
re-compiled and deployed. This method leaves a gap for human error;
forgetting to update the Datasource to the production database. It seems
that a dynamic datasource for a CrystalReport WebService would be there; I
just can't find any info on it.

Thanks!

Ron

"Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Ron,
>
> From your description, you're using some crystal reports on asp.net pages
> and these reports use asp.net webservive to provide the datasource.
> However, since the webservice's deployment server will change , you're
> wondering how to speicfy the webservice's target url dynamically ,yes?
>
> As for the webservices, how are you consuming them, are you use the add
> webreference in vs.net (or use the wsdl.exe) to create the client proxy
> class? If so, you can have a look at the proxy class 's "Url" property
> which is used to speicfy the webservice's target url such as
> "http://servername/virutual dir/service.asmx"
> We can change it at runtime programly.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      10-12-2004
Hi Ron,

Thanks for your response and the further detailed explanation. As for
dynamically retrieving datasource information from web.config file, I think
you can try using the <appSettings> element in the web.config to store
simple custom configuration datas. For example, we store the following
items in web.config file

<configuration>
<appSettings>
<add key="key1" value="value1">
<add key="key2" value="value2">
</appSettings>
<add key="key1" value="value1">
<system.web>

....

</system.web>
</configuration>


Then, we can get the items' value via the following code:

string item1 =
System.Configuration.ConfigurationSettings.AppSett ings["name"];
VB.NET
dim item as string =
System.Configuration.ConfigurationSettings.AppSett ings("name")

And there is tech article in MSDN which has explained detailed on using the
configuration files:

#Application Configuration Files Explained
http://msdn.microsoft.com/library/en...22003.asp?fram
e=true

Hope helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



 
Reply With Quote
 
Ron
Guest
Posts: n/a
 
      10-12-2004
Yes, I understand how to get the values out of the config file but where on
the CrystalReport WebService can I assign the dynamic datasource? Is there
a property to override? Something like a ConnectinoString property or
something

Thanks for your help

Ron

"Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Ron,
>
> Thanks for your response and the further detailed explanation. As for
> dynamically retrieving datasource information from web.config file, I

think
> you can try using the <appSettings> element in the web.config to store
> simple custom configuration datas. For example, we store the following
> items in web.config file
>
> <configuration>
> <appSettings>
> <add key="key1" value="value1">
> <add key="key2" value="value2">
> </appSettings>
> <add key="key1" value="value1">
> <system.web>
>
> ...
>
> </system.web>
> </configuration>
>
>
> Then, we can get the items' value via the following code:
>
> string item1 =
> System.Configuration.ConfigurationSettings.AppSett ings["name"];
> VB.NET
> dim item as string =
> System.Configuration.ConfigurationSettings.AppSett ings("name")
>
> And there is tech article in MSDN which has explained detailed on using

the
> configuration files:
>
> #Application Configuration Files Explained
>

http://msdn.microsoft.com/library/en...22003.asp?fram
> e=true
>
> Hope helps. Thanks.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      10-13-2004
Hi Ron,

Thanks for your followup. From your further description, it seems that
you're looking for some proerpty on the Crystal report which can
dynaimically change the datasource. Since the problem may need some
further researchs on the Crystal Report components, I suggest that you try
asking the Crystal Guys to see whether it is possible to support provide
such as dynamic datasource. Here are two kb articles maybe helpful for you
to contact the crystal supports:


#How To Get Help with Crystal Reports - International and U.S.
http://support.microsoft.com/default...b;en-us;100368

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems using ASP and Crystal Reports 8.5 to create dynamic PDF reports PughDR@gmail.com ASP General 0 10-23-2006 02:50 PM
Is it possible to get Crystal Reports to print multiple reports in ASP.NET? Rod ASP .Net 2 05-25-2006 02:12 PM
How to launch reports (done with Crystal Reports) from a Java application? minjie@excite.com Java 2 03-15-2006 08:40 PM
Calling Crystal Reports in ASP.NET using the rptserver.asp given by Crystal Reports Peri ASP .Net 1 07-21-2005 12:56 PM
Stored Procedure as datasource for crystal reports Versteijn ASP .Net 1 05-07-2004 03:20 AM



Advertisments