Showing posts with label erro. Show all posts
Showing posts with label erro. Show all posts

Wednesday, March 21, 2012

Error when generating in Excel

I am currently having a problem in production when generating a report in
Excel. I get the following error:
Reporting Services Erro
----
Exception of type
Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
thrown. (rrRenderingError) Get Online Help
Exception of type
Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
thrown.
Excel Rendering Extension : Invalid index in the index path.
----
Microsoft Reporting Services
I would certainly appreciate if any one has a solution to this issue. One
thing I have found on the web is that they talk about Office version.(i.e. we
should have Office 2003 or XP on the reporting services machine & we do have
it in production) This report was working fine in production off recent
without any problems. But now I get this error on generating a report. The
other reports are working fine in terms of generating to excel.
Any inputs is greatly appreciated.
Thanks
MukundI got to view the log files in the Reporting Services directory & found the
following details. May be it will help to find the solution to this problem.
Please let me know if anyone has a solution to this issue.
Mukund
-----aspnet_wp!chunks!998!12/22/2004-15:01:24::
i INFO: ### GetReportChunk('RenderingInfo_EXCEL', Other), chunk was not
found! this=f881b8dc-4271-49a8-aed4-4b1a9f0d1620
aspnet_wp!reportrendering!998!12/22/2004-15:01:24:: 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.Exception: Excel Rendering Extension : Invalid index in
the index path.
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GetReference(ReportItem dataRegion, IntList indexPath, Int32 startIndex)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GetReference(ReportItem dataRegion, IntList indexPath, Int32 startIndex)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GetReference(ReportItem dataRegion, IntList indexPath, Int32 startIndex)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GetReference(ReportItem dataRegion, IntList indexPath, Int32 startIndex)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.CollectHiddenReportItems(IntList indexPath, PageReportItems& pageRI)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.PreScanPage(ReportItem
parentDataRegion, Boolean isPageNeedsEvaluation, Hashtable& riReferenceTable,
PageLayout& pageLayout, PageReportItems& pageRIItems, Stack&
dynamicLayoutStack, Hashtable& dataRegionsTable, Boolean[]& reduceRowGapList,
OutlineRenderStates[]& verticalOutlineStates, OutlineRenderStates[]&
horizontalOutlineStates)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderStaticPage(StreamWriter
streamWriter, ReportItem parentDataRegion, PageLayout pageLayout, Hashtable
formulaRIMap, Int32 currentPageNumber, PageReportItems& pageRIItems, Boolean&
isPageNeedsHeader, ExcelStyle& footerStyle, Stack& dynamicLayoutStack)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageLayout(PageLayout pageLayout, Int32& currentPageNumber, Stack& stack)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderPageCollection(PageCollection
pageCollection, Int32& currentPageNumber, Stack& stack, PageLayout&
lastPageLayout)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateWorkSheets()
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.GenerateMainSheet()
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderExcelWorkBook(CreateAndRegisterStream createAndRegisterStream)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.ProcessReport(CreateAndRegisterStream createAndRegisterStream)
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report
report, NameValueCollection reportServerParameters, NameValueCollection
deviceInfo, NameValueCollection clientCapabilities,
EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions,
CreateAndRegisterStream createAndRegisterStream)
-- End of inner exception stack trace --
at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.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 --
aspnet_wp!webserver!998!12/22/2004-15:01:27:: 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.Exception: Excel Rendering Extension : Invalid index in
the index path.
aspnet_wp!library!9bc!12/22/2004-15:11:13:: i INFO: Cleaned 0 batch records,
0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs
-----
"Mukund" wrote:
> I am currently having a problem in production when generating a report in
> Excel. I get the following error:
> Reporting Services Error
> ----
> Exception of type
> Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> thrown. (rrRenderingError) Get Online Help
> Exception of type
> Microsoft.ReportingServices.ReportRendering.ReportRenderingException was
> thrown.
> Excel Rendering Extension : Invalid index in the index path.
> ----
> Microsoft Reporting Services
> I would certainly appreciate if any one has a solution to this issue. One
> thing I have found on the web is that they talk about Office version.(i.e. we
> should have Office 2003 or XP on the reporting services machine & we do have
> it in production) This report was working fine in production off recent
> without any problems. But now I get this error on generating a report. The
> other reports are working fine in terms of generating to excel.
> Any inputs is greatly appreciated.
> Thanks
> Mukund
>|||I am aslo getting the same error. Its works for other reports. Only one report i cant export to excel and html. if any one know the solution pls reply...
From http://www.developmentnow.com/g/115_2004_12_0_0_454135/Error-when-generating-in-Excel.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

Friday, February 24, 2012

Error treatment

Hi,
I'm trying to find the best way to treat erro in my web applicatin (using VB.NET) but i'm something is not right.
Look at this code (part of the code was removed but on the original, we do need a transaction because we update different tables):

Protected Sub ClearFlag()Dim mySQLConnectionAs New SqlConnection(ConfigurationManager.ConnectionStrings("MyString").ToString)Dim mySQLTransactionAs SqlTransactionDim mySQLCommandAs SqlCommandDim sQuery1As String ="UPDATE Users SET UserStatus = 1"Try mySQLConnection.Open() mySQLTransaction = mySQLConnection.BeginTransaction mySQLCommand =New SqlCommand(sQuery1, mySQLConnection, mySQLTransaction) mySQLCommand.ExecuteNonQuery() mySQLTransaction.Commit()Catch exAs Exception mySQLTransaction.Rollback()Finally mySQLConnection.Close() mySQLCommand.Dispose() mySQLTransaction.Dispose() mySQLConnection.Dispose()End Try End Sub

The Error List says:

- Variable 'mySQLCommand' is used before it has been assigned a value. A null reference exception could result at runtime.
- Variable 'mySQLTransaction' is used before it has been assigned a value. A null reference exception could result at runtime.

What i did to try to avoid it is declare the variables using "NEW", like:

Dim mySQLCommand as NEW SQLCommand

But, i can't do this with the transaction.

NESTED TRY AND CATCH

Also, i was thinking about this to handle specific errors like, try to open a connection and just continue if the connection was oppened, or else, treat that error. Try to update the database and just continue, it if did well or else, treat the error...

Is that possible to use nested try and catch for this or, does anyone has a better idea?
I appreciate any comment.

Thanks

Hi E.Brito,

As I can see, these messages are warning messages. The comipler analyzes the code and found the variable might not be pointing to a valid object, since the Try block and Final Block are in same level.

Of course, you can ignore this message, but I would suggest you put the following code before the Try block.

mySQLConnection.Open()
mySQLTransaction = mySQLConnection.BeginTransaction

mySQLCommand = New SqlCommand(sQuery1, mySQLConnection, mySQLTransaction)

This will eliminate the warning message.

HTH. If anything is unclear, please feel free to mark this post as Not Answered and post your reply. Thanks!

|||

hiKevin Yu

Thanks for your replay.
If i do it the warning message will desapear but... what if i get an error on the connection? Since it will be out of the "Try Catch" block, i wont be able to handle the error.
Do you have a sugestion for this?

Thanks in advance,

|||

Hi E.Brito,

For this warning message, you can try to put the dispost in an If block, like

If Not mySQLCommand Is Nothing Then mySQLCommand.Dispose()

This will make sure that the object reference is not Nothing, but it will not deliminate the warning message. In this case, you can ignore it.

You can also put the SqlConnection.Open in another try/catch block, so that you can seperate the process of exceptions.

|||This will work fine.
Thanks a lot for your help