How to debug report definition is invalid?

Miklos_HollenderMiklos_Hollender Member Posts: 1,598
edited 2015-05-21 in NAV Three Tier
I am more interested in how to figure it out rather than just giving a solution.

Just one report, basically adding a custom header and footer to R205. NAV 2015 DE build around March. I don't intend to reinstall it or go to a new version, I want to change the report into working, that would take far less time and disruption.

I removed the pictures from the header as they are often causing this. No luck.

How would you start finding it? Start with the standard report, copy fields there one by one and see when it crashes? That would be very time consuming.

This is how my CustAddr field looks like, the first parts standard, then from where it says Cstr then added by me.
<Hidden>=Code.SetData(Fields!CustAddr1.Value + Chr(177) + 
Fields!CustAddr2.Value + Chr(177)+ 
Fields!CustAddr3.Value + Chr(177)+ 
Fields!CustAddr4.Value + Chr(177)+ 
Fields!CustAddr5.Value + Chr(177)+ 
Fields!CustAddr6.Value + Chr(177)+ 
Fields!CustAddr7.Value + Chr(177)+ 
Fields!CustAddr8.Value + Chr(177) + 
Cstr(Fields!FooterInfo1.Value) + Chr(177) + 
Cstr(Fields!FooterInfo2.Value) + Chr(177) +
Cstr(Fields!FooterInfo3.Value) + Chr(177) + 
Cstr(Fields!FooterInfo4.Value) + Chr(177) + 
Cstr(Fields!FooterInfo5.Value) + Chr(177) + 
Cstr(Fields!FooterInfo6.Value) + Chr(177) + 
Cstr(Fields!TopAddr.Value) + Chr(177) + 
Cstr(Fields!OrderNoCaption.Value) + Chr(177) + 
Cstr(Fields!DocDateText.Value) + Chr(177) + 
Cstr(Fields!SelltoCustNo_SalesHeaderCaption.Value) + Chr(177) + 
Cstr(Fields!OurVatNo.Value) + Chr(177) + 
Cstr(Fields!ContactCaption.Value) + Chr(177) + 
Cstr(Fields!OurAccountCaption.Value) + Chr(177) + 
Cstr(Fields!YourData.Value) + Chr(177) + 
Cstr(Fields!ReferenceText.Value) + Chr(177) + 
Cstr(Fields!YourVATNoText.Value) + Chr(177) + 
Cstr(Fields!CustIntRefCaption.Value) + Chr(177) + 
Cstr(Fields!No_SalesHeader.Value) + Chr(177) +
Cstr(Fields!DocDate.Value) + Chr(177) + 
Cstr(Fields!SelltoCustNo_SalesHeader.Value) + Chr(177) + 
Cstr(Fields!CompanyInfoVATRegNo.Value) + Chr(177) + 
Cstr(Fields!Contact.Value) + Chr(177) + 
Cstr(Fields!OurAccount.Value) + Chr(177) + 
Cstr(Fields!YourRef.Value) + Chr(177) + 
Cstr(Fields!YourVATNo.Value) + Chr(177) + 
Cstr(Fields!CustIntRef.Value) + Chr(177) + 
Cstr(Fields!DocumentText.Value) + Chr(177) + 
Cstr(Fields!PageCaption.Value) + Chr(177) + 
Cstr(Fields!Ship1.Value) + Chr(177) + 
Cstr(Fields!Ship2.Value)
,1)

Event Viewer says nothing at first, then when I try to close the NAV client it crashes and then the Event Viewer says more,

Application: Microsoft.Dynamics.Nav.Client.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ComponentModel.Win32Exception
Stack:
at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToScreen(System.Drawing.Point)
at System.Windows.Forms.ToolStripItem.TranslatePoint(System.Drawing.Point, System.Windows.Forms.ToolStripPointType, System.Windows.Forms.ToolStripPointType)
at System.Windows.Forms.ToolStripDropDownItem.DropDownDirectionToDropDownBounds(System.Windows.Forms.ToolStripDropDownDirection, System.Drawing.Rectangle)
at System.Windows.Forms.ToolStripDropDownItem.GetDropDownBounds(System.Windows.Forms.ToolStripDropDownDirection)
at System.Windows.Forms.ToolStripDropDownItem.get_DropDownLocation()
at System.Windows.Forms.ToolStripDropDown.GetDropDownBounds(System.Drawing.Rectangle)
at System.Windows.Forms.ToolStripDropDown.SetBoundsCore(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.Control.SetBounds(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.Control.set_Size(System.Drawing.Size)
at System.Windows.Forms.ToolStripDropDown.AdjustSize()
at System.Windows.Forms.ToolStripOverflow.OnLayout(System.Windows.Forms.LayoutEventArgs)
at System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.LayoutEventArgs)
at System.Windows.Forms.Control.PerformLayout()
at System.Windows.Forms.Control.ResumeLayout(Boolean)
at System.Windows.Forms.Control.ResumeLayout()
at System.Windows.Forms.ToolStrip.OnLayout(System.Windows.Forms.LayoutEventArgs)
at System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.LayoutEventArgs)
at System.Windows.Forms.Control.PerformLayout()
at System.Windows.Forms.Control.ResumeLayout(Boolean)
at System.Windows.Forms.Layout.LayoutTransaction.Dispose()
at System.Windows.Forms.Control.SetVisibleCore(Boolean)
at System.Windows.Forms.Control.set_Visible(Boolean)
at Microsoft.Reporting.WinForms.ReportToolBar.Dispose(Boolean)
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Control.Dispose(Boolean)
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Control.Dispose(Boolean)
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Control.Dispose(Boolean)
at System.Windows.Forms.ContainerControl.Dispose(Boolean)
at Microsoft.Reporting.WinForms.RVSplitContainer.Dispose(Boolean)
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Control.Dispose(Boolean)
at System.Windows.Forms.ContainerControl.Dispose(Boolean)
at Microsoft.Reporting.WinForms.ReportViewer.Dispose(Boolean)
at System.ComponentModel.Component.Dispose()
at Microsoft.Dynamics.Framework.UI.WinForms.ReportViewerNativeControl.Dispose(Boolean)
at System.ComponentModel.Component.Finalize()

Faulting application name: Microsoft.Dynamics.Nav.Client.exe, version: 8.0.39663.0, time stamp: 0x54ca9db1
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17415, time stamp: 0x54504ade
Exception code: 0xe0434352
Fault offset: 0x00014598
Faulting process id: 0x4c28
Faulting application start time: 0x01d0931b944b5077
Faulting application path: C:\Program Files (x86)\Microsoft Dynamics NAV\80\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 7217e45f-ff0f-11e4-80c4-002590e177e3
Faulting package full name:
Faulting package-relative application ID:

Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: Microsoft.Dynamics.Nav.Client
P2: 8.0.39663.0
P3: 54ca9db1
P4: System.Windows.Forms
P5: 4.0.30319.34250
P6: 54d46da6
P7: 9c7
P8: 163
P9: System.ComponentModel.Win32
P10:

Attached files:


Analysis symbol:
Rechecking for solution: 0
Report Id: 7217e45f-ff0f-11e4-80c4-002590e177e3
Report Status: 2048
Hashed bucket:

But I think it simply means "HI REPORT VIEWER CRASHED IN ME".

How to even begin solving it and issues like this?

Comments

  • davmac1davmac1 Member Posts: 1,283
    is it possible you did not completely remove the pictures?

    If you can export the report to text, you could do a visual comparison between the custom report and standard report.

    How much data are you passing in your added custom fields?

    Can you remove some of the static fields and put them directly in the header using first fields?
    Some 2009 techniques are still in use, even though they are no longer required.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    @davmac thanks.

    Actually it seems there is already something fscked up in the standard 2015 DE version of R205 and my additions just made it worse. Even the standard version shows my logo HUGE while it is small on all other documents. I suspect I may not have fully removed the picture and this may have crashed it somehow.

    I took the Sales Quote instead as a basis of my Order Conf customizations and so far it seems to work.

    A visual comparison would be huge. I mean have you noticed if you just save the RDLC file that is alone 700Kbyte on these standard reports?

    It is one of the most data-heavy documents due to the prepayment stuff and I have added about 50 header fields.

    So far the best methodology seems to be to see if the standard report is already strange (true in this case) and perhaps take another basis, and copy half of customizations, see if it works, if not delete half etc. a quicksort basically.

    Note: I can copy whole headers and footers by having added an ' apostrophe (comment) at the end of every code.getdata expression. This works around the error message in visual studio and allows copying.
Sign In or Register to comment.