Showing posts with label render. Show all posts
Showing posts with label render. Show all posts

Thursday, March 29, 2012

Error exporting to Excel with expression in footer

I can export to all other formats from the report viewer with no issues, but when I try to render to Excel, I get an exception:

[Exception: Object reference not set to an instance of an object.]

[Exception: An error occurred during rendering of the report.]

[Exception: An error occurred during rendering of the report.]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +553
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +941
Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, String& mimeType, String& fileNameExtension) +97
Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +126
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +153
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +202
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

I've pinned it down to a footer cell that uses an expression to determine the TextAlign property. If I do something as simple as ="Right", I get the error. Of course, if I just use Right, there is no problem. So are expressions not supported in footer cell properties or is there possibly some fix for this?

Thanks.

The only solution would be to keep the textbox in the report body than the footer.

Shyam

|||

How can I get text to act like a page footer in the report body?

In case any MS folks are reading and want to reproduce this problem, here's a simple report that exhibits the behavior:

Code Snippet

<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<BottomMargin>1in</BottomMargin>

<RightMargin>1in</RightMargin>

<rd:DrawGrid>true</rd:DrawGrid>

<InteractiveWidth>8.5in</InteractiveWidth>

<rd:SnapToGrid>true</rd:SnapToGrid>

<Body>

<Height>0.79in</Height>

</Body>

<rd:ReportID>503a3ed2-a87d-4315-8de8-77c3ff0e807f</rd:ReportID>

<LeftMargin>1in</LeftMargin>

<Width>5in</Width>

<InteractiveHeight>11in</InteractiveHeight>

<Language>en-US</Language>

<PageFooter>

<ReportItems>

<Textbox Name="textbox3">

<Top>0.125in</Top>

<rd:DefaultName>textbox3</rd:DefaultName>

<Style>

<TextAlign>=IIf(Globals!PageNumber Mod 2 = 0, "Left", "Right")</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value>Test</Value>

</Textbox>

</ReportItems>

<Height>0.375in</Height>

<PrintOnLastPage>true</PrintOnLastPage>

<PrintOnFirstPage>true</PrintOnFirstPage>

</PageFooter>

<TopMargin>1in</TopMargin>

</Report>

|||

Try to handle in the value property of the textbox. For example:

IIf(Globals!PageNumber Mod 2 = 0, CStr(Globals!PageNumber) & Space(15), Space(15) & CStr(Globals!PageNumber))

Shyam

Error exporting to Excel with expression in footer

I can export to all other formats from the report viewer with no issues, but when I try to render to Excel, I get an exception:

[Exception: Object reference not set to an instance of an object.]

[Exception: An error occurred during rendering of the report.]

[Exception: An error occurred during rendering of the report.]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +553
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +941
Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, String& mimeType, String& fileNameExtension) +97
Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +126
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +153
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +202
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

I've pinned it down to a footer cell that uses an expression to determine the TextAlign property. If I do something as simple as ="Right", I get the error. Of course, if I just use Right, there is no problem. So are expressions not supported in footer cell properties or is there possibly some fix for this?

Thanks.

The only solution would be to keep the textbox in the report body than the footer.

Shyam

|||

How can I get text to act like a page footer in the report body?

In case any MS folks are reading and want to reproduce this problem, here's a simple report that exhibits the behavior:

Code Snippet

<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<BottomMargin>1in</BottomMargin>

<RightMargin>1in</RightMargin>

<rd:DrawGrid>true</rd:DrawGrid>

<InteractiveWidth>8.5in</InteractiveWidth>

<rd:SnapToGrid>true</rd:SnapToGrid>

<Body>

<Height>0.79in</Height>

</Body>

<rd:ReportID>503a3ed2-a87d-4315-8de8-77c3ff0e807f</rd:ReportID>

<LeftMargin>1in</LeftMargin>

<Width>5in</Width>

<InteractiveHeight>11in</InteractiveHeight>

<Language>en-US</Language>

<PageFooter>

<ReportItems>

<Textbox Name="textbox3">

<Top>0.125in</Top>

<rd:DefaultName>textbox3</rd:DefaultName>

<Style>

<TextAlign>=IIf(Globals!PageNumber Mod 2 = 0, "Left", "Right")</TextAlign>

<PaddingLeft>2pt</PaddingLeft>

<PaddingBottom>2pt</PaddingBottom>

<PaddingRight>2pt</PaddingRight>

<PaddingTop>2pt</PaddingTop>

</Style>

<CanGrow>true</CanGrow>

<Value>Test</Value>

</Textbox>

</ReportItems>

<Height>0.375in</Height>

<PrintOnLastPage>true</PrintOnLastPage>

<PrintOnFirstPage>true</PrintOnFirstPage>

</PageFooter>

<TopMargin>1in</TopMargin>

</Report>

|||

Try to handle in the value property of the textbox. For example:

IIf(Globals!PageNumber Mod 2 = 0, CStr(Globals!PageNumber) & Space(15), Space(15) & CStr(Globals!PageNumber))

Shyam

Error exporting report to PDF

I have a report with embedded subreports for different departments. When I render a department with short subreports the report exports to PDF fine, but when I have a department with longer subreports then I get an error when exporting. Here is the tail end of the error message in the log file:

inetinfo!library!334!03/01/2006-16:08:30:: i INFO: Call to RenderNext( '/Budgeting/Department_Spending_Report' )
inetinfo!chunks!334!03/01/2006-16:08:30:: i INFO: ### GetReportChunk('RenderingInfo_PDF', 2), chunk was not found! this=a34ae82e-c4b2-4343-be6b-3989db988405
inetinfo!reportrendering!334!03/01/2006-16:08:32:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown., ;
Info: Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > Microsoft.ReportingServices.ReportRendering.ReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemCollection.get_Item(Int32 index)
at Microsoft.ReportingServices.Rendering.ImageRenderer.Table.CalculateItemMeasurement(Orientation orientation, Double childrenMaximumDistance, ReAdjustments itemReAdjustment, ItemContext savedContext)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.ProcessPages(CompositionBase theComposition, Report theReport, Boolean needTotalPages, Int32 startPage, Int32 endPage, Boolean render)
at Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport.RenderReport(Report report, NameValueCollection deviceInfo, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStreamCallback)
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
End of inner exception stack trace
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
End of inner exception stack trace
inetinfo!webserver!334!03/01/2006-16:08:32:: e ERROR: Reporting Services error Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > Microsoft.ReportingServices.ReportRendering.ReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

I'm running Reporting Services SP2. I've searched other postings and I can't seem to find anyone else with the same issue. I'm able to export to excel with no problem.

Any help would be appreciated.

Thank You.

I'm sorry I don't have a solution for you. But I'm having the same problem producing a pdf. I have a report that has a subreport that has a subreport (three levels of reporting). I have verified that when no third level subreport is larger than one page, the pdf is created successfully. However, when any third level subreport extends beyond one page, a pdf cannot successfully be generated. The hourglass never goes away when trying to generate the pdf.

I'm hoping that someone who reads this may have a solution for both of us.

I have been working on this problem for several days, and I'm desparate.

Bob

Error exporting report to PDF

I have a report with embedded subreports for different departments. When I render a department with short subreports the report exports to PDF fine, but when I have a department with longer subreports then I get an error when exporting. Here is the tail end of the error message in the log file:

inetinfo!library!334!03/01/2006-16:08:30:: i INFO: Call to RenderNext( '/Budgeting/Department_Spending_Report' )
inetinfo!chunks!334!03/01/2006-16:08:30:: i INFO: ### GetReportChunk('RenderingInfo_PDF', 2), chunk was not found! this=a34ae82e-c4b2-4343-be6b-3989db988405
inetinfo!reportrendering!334!03/01/2006-16:08:32:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown., ;
Info: Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > Microsoft.ReportingServices.ReportRendering.ReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemCollection.get_Item(Int32 index)
at Microsoft.ReportingServices.Rendering.ImageRenderer.Table.CalculateItemMeasurement(Orientation orientation, Double childrenMaximumDistance, ReAdjustments itemReAdjustment, ItemContext savedContext)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.CalculatePage(Orientation orientation, Boolean repeatableParent, Boolean canDelete, Double& minimumCoordinate, Double& distance)
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.ProcessPages(CompositionBase theComposition, Report theReport, Boolean needTotalPages, Int32 startPage, Int32 endPage, Boolean render)
at Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport.RenderReport(Report report, NameValueCollection deviceInfo, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStreamCallback)
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
End of inner exception stack trace
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
End of inner exception stack trace
inetinfo!webserver!334!03/01/2006-16:08:32:: e ERROR: Reporting Services error Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > Microsoft.ReportingServices.ReportRendering.ReportRenderingException: Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. > System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

I'm running Reporting Services SP2. I've searched other postings and I can't seem to find anyone else with the same issue. I'm able to export to excel with no problem.

Any help would be appreciated.

Thank You.

I'm sorry I don't have a solution for you. But I'm having the same problem producing a pdf. I have a report that has a subreport that has a subreport (three levels of reporting). I have verified that when no third level subreport is larger than one page, the pdf is created successfully. However, when any third level subreport extends beyond one page, a pdf cannot successfully be generated. The hourglass never goes away when trying to generate the pdf.

I'm hoping that someone who reads this may have a solution for both of us.

I have been working on this problem for several days, and I'm desparate.

Bob

Wednesday, February 15, 2012

Error accessing report

I am trying to use the render webmothod to render the report in PDF..I have
forms based authentication in place. The follwoing code is mainly to get rid
of open save dialog box when the report is running in a webbrowser.
The follwing is the code:
===================================================== 'specify the credentials
Dim s As RS.ReportingService = New RS.ReportingService
s.Credentials = System.Net.CredentialCache.DefaultCredentials
Try
' Render arguments
Dim result As Byte() = Nothing
' Please adapt report name and path
Dim reportPath As String = "/SKEL REPORTS/UserList"
Dim format As String = "PDF"
Dim historyID As String = Nothing
Dim devInfo As String = ""
Dim showHideToggle As String = Nothing
Dim encoding As String
Dim mimeType As String
Dim warnings As RS.Warning() = Nothing
Dim reportHistoryParameters As RS.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim sh As RS.SessionHeader = New RS.SessionHeader
s.SessionHeaderValue = sh
'call the render method of webservice
result = s.Render(reportPath, format, historyID, devInfo, Nothing,
Nothing, showHideToggle, encoding, mimeType, reportHistoryParameters,
warnings, streamIDs)
'send the PDF report to IE using Response object
Response.ClearContent()
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "inline;
filename=report1.PDF")
Response.BinaryWrite(result)
Response.End()
'Response.Write ("done");
Catch ex As Exception
Response.Write(ex.ToString())
End Try
End Sub
===================================================== This is the error I get when I try to run a report:
===================================================== System.Net.WebException: The request failed with the error message: --
Object moved to here.
--. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at RS.ReportingService.Render(String Report,
String Format, String HistoryID, String DeviceInfo, ParameterValue[]
Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
Warning[]& Warnings, String[]& StreamIds) in c:\inetpub\wwwroot\skel\Web
References\RS\Reference.vb:line 549 at
EQ.SKEL.Web.WebForms.ReportViewer.RenderReport() in
c:\inetpub\wwwroot\skel\Reports\ReportViewer.aspx.vb:line 137
====================================================The "Object moved to here." is the Report Server trying to redirect you to
the login page. That means the forms auth cookie isn't getting transmitted
properly. Make sure your report server web service proxy is set up
correctly, and that you are calling the web site with the same servername
(FQDN recommended) as you have set up in the report server config files for
the report server. If they are different server names, the cookie won't be
recognized as coming from the same place.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"shahab" <shahab@.discussions.microsoft.com> wrote in message
news:90B97D80-FADB-4727-B71E-A9BF0D110530@.microsoft.com...
>I am trying to use the render webmothod to render the report in PDF..I have
> forms based authentication in place. The follwoing code is mainly to get
> rid
> of open save dialog box when the report is running in a webbrowser.
> The follwing is the code:
> =====================================================> 'specify the credentials
> Dim s As RS.ReportingService = New RS.ReportingService
> s.Credentials = System.Net.CredentialCache.DefaultCredentials
> Try
> ' Render arguments
> Dim result As Byte() = Nothing
> ' Please adapt report name and path
> Dim reportPath As String = "/SKEL REPORTS/UserList"
> Dim format As String = "PDF"
> Dim historyID As String = Nothing
> Dim devInfo As String = ""
> Dim showHideToggle As String = Nothing
> Dim encoding As String
> Dim mimeType As String
> Dim warnings As RS.Warning() = Nothing
> Dim reportHistoryParameters As RS.ParameterValue() = Nothing
> Dim streamIDs As String() = Nothing
> Dim sh As RS.SessionHeader = New RS.SessionHeader
> s.SessionHeaderValue = sh
> 'call the render method of webservice
> result = s.Render(reportPath, format, historyID, devInfo, Nothing,
> Nothing, showHideToggle, encoding, mimeType, reportHistoryParameters,
> warnings, streamIDs)
> 'send the PDF report to IE using Response object
> Response.ClearContent()
> Response.ContentType = "application/pdf"
> Response.AddHeader("content-disposition", "inline;
> filename=report1.PDF")
> Response.BinaryWrite(result)
> Response.End()
>
> 'Response.Write ("done");
> Catch ex As Exception
> Response.Write(ex.ToString())
> End Try
> End Sub
> =====================================================> This is the error I get when I try to run a report:
> =====================================================> System.Net.WebException: The request failed with the error message: --
> Object moved to here.
> --. at
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response, Stream responseStream, Boolean asyncCall)
> at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters) at RS.ReportingService.Render(String
> Report,
> String Format, String HistoryID, String DeviceInfo, ParameterValue[]
> Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
> String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
> Warning[]& Warnings, String[]& StreamIds) in c:\inetpub\wwwroot\skel\Web
> References\RS\Reference.vb:line 549 at
> EQ.SKEL.Web.WebForms.ReportViewer.RenderReport() in
> c:\inetpub\wwwroot\skel\Reports\ReportViewer.aspx.vb:line 137
> ====================================================|||Thank you I got it working, the problem was I converted the code to VB.net
and authcookie got confused with the local variable, hence the cookie was
never being passed around.
"Jeff A. Stucker" wrote:
> The "Object moved to here." is the Report Server trying to redirect you to
> the login page. That means the forms auth cookie isn't getting transmitted
> properly. Make sure your report server web service proxy is set up
> correctly, and that you are calling the web site with the same servername
> (FQDN recommended) as you have set up in the report server config files for
> the report server. If they are different server names, the cookie won't be
> recognized as coming from the same place.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "shahab" <shahab@.discussions.microsoft.com> wrote in message
> news:90B97D80-FADB-4727-B71E-A9BF0D110530@.microsoft.com...
> >I am trying to use the render webmothod to render the report in PDF..I have
> > forms based authentication in place. The follwoing code is mainly to get
> > rid
> > of open save dialog box when the report is running in a webbrowser.
> > The follwing is the code:
> > =====================================================> > 'specify the credentials
> > Dim s As RS.ReportingService = New RS.ReportingService
> > s.Credentials = System.Net.CredentialCache.DefaultCredentials
> >
> > Try
> >
> > ' Render arguments
> > Dim result As Byte() = Nothing
> > ' Please adapt report name and path
> > Dim reportPath As String = "/SKEL REPORTS/UserList"
> > Dim format As String = "PDF"
> > Dim historyID As String = Nothing
> > Dim devInfo As String = ""
> >
> > Dim showHideToggle As String = Nothing
> > Dim encoding As String
> > Dim mimeType As String
> > Dim warnings As RS.Warning() = Nothing
> > Dim reportHistoryParameters As RS.ParameterValue() = Nothing
> > Dim streamIDs As String() = Nothing
> > Dim sh As RS.SessionHeader = New RS.SessionHeader
> > s.SessionHeaderValue = sh
> >
> > 'call the render method of webservice
> > result = s.Render(reportPath, format, historyID, devInfo, Nothing,
> > Nothing, showHideToggle, encoding, mimeType, reportHistoryParameters,
> > warnings, streamIDs)
> >
> > 'send the PDF report to IE using Response object
> > Response.ClearContent()
> > Response.ContentType = "application/pdf"
> > Response.AddHeader("content-disposition", "inline;
> > filename=report1.PDF")
> > Response.BinaryWrite(result)
> > Response.End()
> >
> >
> > 'Response.Write ("done");
> > Catch ex As Exception
> > Response.Write(ex.ToString())
> > End Try
> >
> > End Sub
> > =====================================================> > This is the error I get when I try to run a report:
> > =====================================================> > System.Net.WebException: The request failed with the error message: --
> > Object moved to here.
> > --. at
> > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> > message, WebResponse response, Stream responseStream, Boolean asyncCall)
> > at
> > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> > methodName, Object[] parameters) at RS.ReportingService.Render(String
> > Report,
> > String Format, String HistoryID, String DeviceInfo, ParameterValue[]
> > Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
> > String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
> > Warning[]& Warnings, String[]& StreamIds) in c:\inetpub\wwwroot\skel\Web
> > References\RS\Reference.vb:line 549 at
> > EQ.SKEL.Web.WebForms.ReportViewer.RenderReport() in
> > c:\inetpub\wwwroot\skel\Reports\ReportViewer.aspx.vb:line 137
> > ====================================================>
>