Skip to main content
Hi,

I am trying to code against the ReportService as described in the Knowledge Base article KB000021 but I keep getting an exception when I fire the GetData operation.

The error I receive is as follows:

"An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll

Additional information: Server was unable to process request --> Invalid column name 'UserName'."

and the code that I am using is as follows:-


.ToString();

int RID = Convert.ToInt32(ReportID);
int TLID = Convert.ToInt32(TemplID);

ds = K2Reporting.GetData(RID, TLID, UserName);

dataGrid4.DataSource = ds;
}


Please could anyone suggest any fixes for this error. Thanks for your help

Tom 😃
Hi THarris,

I modified the sample code for the KB to use the method with 3 parameters and also got the error.

Method used fails:

Public Overloads Function GetData(ByVal ReportID As Integer, ByVal TemplID As Integer, ByVal UserName As String) As System.Data.DataSet

I would suggest that you use the overloaded method that takes 4 arguments instead as we know that it works. 😉

Rather use:

Public Overloads Function GetData(ByVal ReportID As Integer, ByVal TemplID As Integer, ByVal ParameterStr As String, ByVal UserName As String) As System.Data.DataSet

Hope it helps!
In my way, thanks to coenraad advice, I wrote my own stored procedure to access data I need since it's so easier to achieve...

Reply