Generating PDF report using Windows form using Reporting services

  • 1. Created the server report

    2. Added the web reference to the Visual Studio windows project.

    Here is the piece of code I am trying to execute (not total,, uptil the point I am having the issue)

    Imports WeeklyRptV2.myserver

    Imports Microsoft.SqlServer.ReportingServices2005.Execution

    Imports System.Web.Services.Protocols

    Public Class MainForm

    Dim WeeklyRptV2Settings As My.MySettings

    Dim rptName As String

    Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Me.ReportViewer1.RefreshReport()

    End Sub

    Private Sub btnGenerateRpts_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGenerateRpts.Click

    Try

    WeeklyRptV2Settings = New My.MySettings

    Dim RSService As New ReportingService2005

    Dim rsExecution As New ReportExecutionService

    Dim Rscredentials As Microsoft.SqlServer.ReportingServices2005.Execution.DataSourceCredentials

    'Must use the server credentials instead of every user credentials..

    RSService.Url = "http://myserver/reportserver/reportexecution2005.asmx?wsdl"

    RSService.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials ' New System.Net.NetworkCredential(

    'Get the parameter values..

    Dim x() As WeeklyRptV2.myserver.ReportParameter

    Dim y() As WeeklyRptV2.myserver.ParameterValue

    x = RSService.GetReportParameters(rptName, Nothing, False, y, Nothing)

    I am getting the following error??

    server did not recognize the value of HTTP Header soapaction:

    http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/getreportparameters

    Any help is greatly appreciated.

    thx

  • Hi...

    Please try

    RSService.Url = "http://myserver/reportserver/reportservice2005.asmx"

    instead of:

    RSService.Url = "http://myserver/reportserver/reportexecution2005.asmx?wsdl"

    ...I think..it should help...:)

    Niraj

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply