How to use SQL Server Reporting Services with Visual C++

We can render the SQL Server 2000 Reporting/ 2005 Services (SSRS 2000) Reports in Excel/ PDF or any other format that is supported by SSRS by calling the web services exposed by SSRS 2000/ 2005. The SSRS 2000 will use .Net 1.1 at the server end and SSRS 2005 will use .Net 2.0. As far as the application is able to make a successful SOAP API call we can use SSRS 2000 / SSRS 2005 along with any application.

The following KB Article states how to make the calls to the Web Services and render the Report in the required Format like Excel, PDF etc. This KB Article uses C# Language to show that but it gives a clear idea how the calls should be made to the SSRS Web Services.

I am further providing you with some more web links that describes how we can make SOAP Calls to the Web Services from a Native C++ Code. So we can simply make a call to the Web Service and achieve what we want.

KB Article:

https://support.microsoft.com/kb/875447

We can generate the Proxy Class in C++ for calling the Web Services. The Native C++ Code is generated by SPROXY.EXE which is a command line tool that comes with Visual Studio 2003 /2005 for generating proxy class in C++ Language. You will find the documentation of SPROXY.EXE in the link provided below.

Documentation SPROXY.EXE:

https://msdn2.microsoft.com/en-us/library/ztta389h(vs.71).aspx

Once the RENDER Method of the Web service class is called it returns a byte array as per the requested MIME type, the byte array could be written to get the PDF/EXCEL output. More documentation of the Render method and the supported MIME types could be found in the web link below. We can alternatively use the RENDERSTREAM Method depending on the requirement. Web links are provided below that contains the documentation of the REDERSTREAM Method.

Render method documentation: (SSRS 2000)

https://msdn2.microsoft.com/en-us/library/aa258532(sql.80).aspx

Render method documentation: (SSRS 2005)

https://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsexecutionservice2005.reportexecutionservice.render.aspx

RenderStream method documentation: (SSRS 2000)

https://msdn2.microsoft.com/en-us/library/aa225915(SQL.80).aspx

RenderStream method documentation: (SSRS 2005)

https://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsexecutionservice2005.reportexecutionservice.renderstream.aspx