Web Services

R

Robert J

Hi All,

I am developing an App in VB.Net that will be run in several Domains.
Using Wireless handheld devices running .Net Compact Framework

The application also has to print some Reports, and we use Crystal Reports,
which are not available for the CF.

So I turned to Web Services, and got over the localhost hurdle.

The Web Service will run on the Server at each site, which will have access
to Network Printers in the Domain.

Are there limitations on what you can do in a Web Service, I thought I could
pass a Report Filename and other Parameters to the Web Service and then
have it Print the Reports, but it seems to Fail on:

crReport.Load(strReportFile)

Would I have more luck using the CrystalReportVeiwer within the Web Service
?

So far I have a work around where the Web Service writes a file on the
Server
with all the Report Details and another Program Prints the Reports from the
file
details.

This leads to another Question becuase the address of the Web Service is
hard coded
in the application, is there a way of changing it at Runtime ?

eg. within the Namespace you have the constructor

Public Sub New()

MyBase.New

Me.Url = "http://myserver/HandheldPrint/ReportService.asmx"

End Sub

Can I change "myserver" here becuase there are also references to it in
ReportService.disco

Or would I have to add a Web Reference to every Server I am running the app
on and then
call the appropriate one.

Cheers

Robert
 
W

William Ryan eMVP

Robert J said:
Hi All,

I am developing an App in VB.Net that will be run in several Domains.
Using Wireless handheld devices running .Net Compact Framework

The application also has to print some Reports, and we use Crystal Reports,
which are not available for the CF.

So I turned to Web Services, and got over the localhost hurdle.

The Web Service will run on the Server at each site, which will have access
to Network Printers in the Domain.

Are there limitations on what you can do in a Web Service, I thought I could
pass a Report Filename and other Parameters to the Web Service and then
have it Print the Reports, but it seems to Fail on:

crReport.Load(strReportFile)
Where is this report supposed to run?
Would I have more luck using the CrystalReportVeiwer within the Web Service
?

So far I have a work around where the Web Service writes a file on the
Server
with all the Report Details and another Program Prints the Reports from the
file
details.

This leads to another Question becuase the address of the Web Service is
hard coded
in the application, is there a way of changing it at Runtime ?
eg. within the Namespace you have the constructor

Public Sub New()

MyBase.New

Me.Url = "http://myserver/HandheldPrint/ReportService.asmx"

End Sub

Can I change "myserver" here becuase there are also references to it in
ReportService.disco

Or would I have to add a Web Reference to every Server I am running the app
on and then
call the appropriate one.

Cheers

Robert
--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
 
C

casey chesnut

for the filename that you are passing to the web service,
where does that file live?
if its on the device, then that will not work.
you will have to pass the file to the server to print.

you can change the url for the web service at runtime.
the syntax is something like:
MyProxyObject.Url = "http://WHATEVER/HandheldPrint/ReportService.asmx"
so you only have 1 web reference, and you can change the Url multiple times.
it just has to be the same web service interface at each server.

dont worry about the DISCO file.
that happens at design time, and not run time.

casey
http://www.brains-N-brawn.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top