I'm trying to port over to NAV 2017 the following logic I added to the Excel Buffer table 370 in NAV 5.0 SP1 that generated a page break in Excel:
XlRange := XlWrkSht.Range(xlRowID + ':' + xlRowID);
XlRange.PageBreak := -4135;
..but this generates "a DotNET variable has not been instatiated" error.
Global XlRange variable is:
Name DataType Subtype
XlRange DotNet Microsoft.Office.Interop.Excel.Range.'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
I tried adding logic like this to instantiate the XlRange dot net variable, but without any luck...
XlRange := ?;
IF ISNULL(XlRange) THEN
ERROR(Text000);
Does anyone know how to make this work in NAV 2017? ..or if not, offer an alternate solution to generate a page break in Excel in NAV 2017?
Thanks!
0