Options

excel automation in ProcessingOnly report

activ8activ8 Member Posts: 25
edited 2011-03-11 in NAV Three Tier
Hi all,

I have a ProcessingOnly report that uses excel automation.
When I run the report in RTC I get this error:
Microsoft.Dynamics.Nav.Runtime.NavVariant variable not initialized.

I don't use any variable of type variant and all the automation variables are well
created for use in RTC.
I have a dialog window that show the update process, in RTC it shows the dialog till
the last record that is updated after that i get the error message. The dialog is
a global variable in the report.

Any idea what this error means ?

Comments

  • Options
    activ8activ8 Member Posts: 25
    Nobody ?
    I converted the process report to a codeunit, but still the same error !
    And I don't use any variant variable !
    And i do a create(autovar, true,true) of every automation variable...

    But still this error in RTC

    Microsoft.Dynamics.Nav.Runtime.NavVariant variable not initialized.
  • Options
    ReinhardReinhard Member Posts: 249
    same problem. exact same scenario.
  • Options
    ReinhardReinhard Member Posts: 249
    hello

    for me the problem was that I was retrieving a value from excel:
    tmpStr := excelSheet.Range('A1').Value;
    

    But A1 was blank. to fix it you have to add a FORMAT statement:
    tmpStr := FORMAT(excelSheet.Range('A1').Value);
    
Sign In or Register to comment.