Problems using RSClientPrint
We are using VB.NET 2005 to develop a WinForms application that uses SQL Server 2005 Reporting Services to produce reports. We want to print a large report programmatically without preview. RSClientPrint looked like a good solution but it produces an error when we try to use it. Details...I added Interop.RSClientPrintLib.dll Version 1.0.0.0 to my application and used the code sample I found at: http://msdn2.microsoft.com/en-us/library/ms159195.aspxThe call to print looks like:RSClientPrint.Print("http://ourServer/reportserver", strReportPathParameters, "Report_name")This call generates an error message:"An error occured during printing. (0x80004002)"and throws an exception: "Specified cast is not valid" Any ideas appreciated.
September 29th, 2006 9:16am

I think it wouldhelp if you include in your post the line of code that sets the strReportPathParameters parameter... The entire code block would be even better.
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2006 5:12pm

The entire block of code follows: Dim RSClientPrint As New RSClientPrintLib.RSClientPrint RSClientPrint.MarginLeft = 12.7 RSClientPrint.MarginTop = 12.7 RSClientPrint.MarginRight = 12.7 RSClientPrint.MarginBottom = 12.7 RSClientPrint.Culture = 1033 RSClientPrint.UICulture = 9 Dim strReportPathParameters As String = "" Dim strTempValue As String = "" Dim iCounter As Integer = 0 Dim myEnumerator As IEnumerator = _ m_parameterValues.GetEnumerator Dim aParameterValue As ParameterValue While myEnumerator.MoveNext() aParameterValue = CType(myEnumerator.Current, ParameterValue) strTempValue = aParameterValue.Value strTempValue = strTempValue.Trim strReportPathParameters += "&" + _ aParameterValue.Name + "=" + strTempValue End While strReportPathParameters = "%2fAppFolder%2ftax_invoice" _ + strReportPathParameters 'Copy from the help file'RSClientPrint.Print("http://localhost/rtm", "%2fEmployee_Sales_Summary&ReportMonth=6&ReportYear=2004&EmpID=20", "Employee_Sales_Summary") 'Our call that generates the errorsRSClientPrint.Print("http://ourserver/reportserver", strReportPathParameters, "Tax_Invoice")
October 12th, 2006 2:06am

Hi mate, I got exactly the same problem as you did, have you got any clue now? Thanks.
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2007 1:33am

Any updates on this situation?.. I'm in the exact same boat
March 8th, 2007 1:11am

Hello i have the same problem. Anyone know the answer? thanks
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2012 12:55am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics