Dynamics NAV Error: The call to member LeftHeader failed.

Once in a while, you get error message which does not make sense. When it comes to default Dynamics NAV error messages, sometimes they can be rather complicated to understand for end-user. However, once you spent more time with Dynamics NAV, you will start understanding these “secret codes” and will be able to translate these error messages from Dynamisc NAV language tolanguage that mortals (end-users) can understand. But even then, sometimes you get an error message that does not make any sense.

A few days ago, when exporting budget to excel (Financial Management > General Ledger > Budgets. Functions > Export to Excel…), I encountered this error:

Microsoft Dynamics NAV Classic
This message is for C/AL programmers:

The call to member LeftHeader failed. Microsoft Office Excel returned
the following message: Unable to set the LeftHeader property of the
PageSetup class


The strange thing was, that same export routine worked, just one hour ago. So, I was sure, that error message is not related to version of Microsoft Office (2007) or version of Dynamics NAV client (2009 SP1) and it seemed that nothing has really changed since last successful export. However, when I tried again, I got the same error message “The call to member LeftHeader failed.”

Obviously, if you google this error message, you will find quite a few “possible” solutions (office version, citrix client, windows update), however none of these seemed to be applicable to my scenario (the fact, that it worked before!).

I was almost giving up (eh, I can enter the details manually through the form, right?), when accidently I have noticed “what has changed“! Before trying to export the budget, I have disconnected from my local network (the Dynamics NAV database was running on the local instance of the SQL) and connected to WiFi, which meant I lost my shared printers (and because I did not have any local printers) which meant that I no longer had “Default Printer”.

LeftHeader is a property of PageSetup, and appareantly PageSetup does not mean much without having “Default Printer” in your Control Panel. And connecting back to local network (I have tested it as well, by installing local pdf printer) resolve the issue.

Lesson learned: Next time you’ll get error message “The call to member LeftHeader failed.” check if you still have access to “Default Printer”.

This entry was posted in Dynamics NAV / Navision, errors and tagged , , , , , . Bookmark the permalink.

15 Responses to Dynamics NAV Error: The call to member LeftHeader failed.

  1. JC says:

    Just wanted to thank you for taking the time to post this! I Was in the exact same situation and had googled all possible ‘fixes’, but none of them really fit my scenario. After I read this I realized we had just changed a printer out and the system giving this error still showed the default printer as the one that was no longer available. A quick change to make the new printer the default fixed the issue. Thanks again!!

    • Tomas says:

      Once you find a fix which you could not google out, it is a good idea to write a post. Because next time, when googling, you will find your answer again.

  2. dilipkumar says:

    Thanks Tomas ,

    It works.

    Thanks again…..

  3. Craig says:

    Again, thanks for posting this. It probably just saved me a couple of hours of searching in vain for a solution!!!!!!


  4. Thomas says:

    Thanks! Worked for me as well.

    Also, such a fine name you have! 🙂

  5. marcelo miorelli says:

    hi there, thanks a lot for this, we are experiencing the same problems here, after installing office 2007 in a terminal server, in order to connect to navision 2009.
    everything is working fine, except when users want to export into excel.
    marcelo miorelli
    sql server DBA

  6. Best says:

    Simply brilliant!

  7. LLY says:

    Thanks, it works!

  8. HowAreYou says:

    Dear Thomas,

    I really thank you for you kind post to explain this issue. It’s really useful and save me lots of time to troubleshoot it by other means.

    Thanks again for your effort!

    PS: By the way, there are very few companies to use Navision in Taiwan! There are no plenty of reference documents in Chinese.

  9. Thomas says:

    Thank you very much. I had this kind of error last friday and wondered how to get a solution for it! You saved me a lot of (probably) wasted time!

  10. Vijay Mishra says:

    It helped me. I was wired and gone through all codes but no help. Then I thought if I have not changed anything how come the report which was exporting very well into excel suddenly stopped. Then I googled and found this first search which is the best. It resolved my problem instantly. Thank you so much. .!!! Really appreciate such help.

  11. Evan says:

    You the man, thanks!

  12. Mathias says:

    You made my day

Leave a Reply

Your email address will not be published. Required fields are marked *