Domanda

I am new to the SSRS i have created a web service which has one method which takes the string value and returns image of bar-code of that value method is as below

Image BarcodeText(string textToBarcode,int barcodeWeight,bool isMargin)

i want to call this method in my SSRS report from the web service in the image box expression and pass the value to the method i don't know how to call a method from the web service. I searched for accessing method from the web service but came up as no help so any links or any description would really helpful for,

1) How to reference web service in the report ?
2) How to call method from web service and pass the parameters to the method ?

Thanks in advance.

È stato utile?

Soluzione

I have got same problem some time back so i got a work around for this problem i hope this will work for you too.

1) First i created the web app with the service reference of the created web service suppose Barcode39 is service so add the reference to the web application. 2) Then write the code behind using service client and call the method to create the barcode image in that code by passing the request variables values 3) Now give the link of that page as the URL to the image expression along with setting the image type as "EXTERNAL" and pass the values to the URL as request variables as

 "http:\\localhost:2310\BarcodeImage.aspx?data=" +(Parameters!YourParamtere.Value)

And one thing instead of returning the Image from the service try returning the byte array using stream and .ToArray() method that would be the best practice.Let me know if any problem.

Altri suggerimenti

http://technet.microsoft.com/en-us/library/aa964129.aspx

This webpage give you all the info you need for accessing web service from SSRS.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top