Program a WAIT Function? NAS

Iwan_JauchIwan_Jauch Member Posts: 35
Hi there

I have a problem with a Report. The Navision seems to be to fast for my code. Does anybody know a function to let navision wait for a few seconds ?

Thanks a lot for your help
Iwan

Comments

  • kinekine Member Posts: 12,562
    Sleep.

    But I never heared about too Fast Navision...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • WaldoWaldo Member Posts: 3,412
    No?

    All my customers are complaining about it ... :wink:

    ... just kidding ...
    :oops:

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • Iwan_JauchIwan_Jauch Member Posts: 35
    Hihi

    ok back to my problem! I need an Event when Navision printed the report!
    Is there a solution available?

    Best Regards
    Iwan
  • WaldoWaldo Member Posts: 3,412
    In the report: OnPostReport?

    In Codeunit: Dunno. you can't run a report "modal", so I think not possible... .

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • WaldoWaldo Member Posts: 3,412
    Oops, my mistake ... if you run a report modal (seems to be possible), then you know in your codeunit when it is finished... .

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • kinekine Member Posts: 12,562
    Iwan, please, describe what you want to reach, may be there is another solution than sleeping for some time. I never had this need...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Iwan_JauchIwan_Jauch Member Posts: 35
    Hi kine

    I want to create a pdf document with navision. When I start the report normally (not over NAS) everthing works, but when I start the report over the NAS It doesnt work.

    I receive this message:
    Overflow under type conversion of Text to Code.

    I have no idea what the problem is!

    Thanks for your help
    Iwan
  • kinekine Member Posts: 12,562
    run the NAS with parameter debug=1. After the error, debugger shows you where is the problem. Somewhere you are assigning Text value to Code variable and the source value is longer than max. length of the Code variable... (assigning through :=, Validate or passing it as parameter to some function). It can be problem of working with windows accounts, when the SID is not recognized and instead userID is the SID passed (commonly the application has all USERID field of type CODE 20, but the sid is TEXT and the length is more than 20 characters). Please, look into Windows logins, if there are some SID not translated to login names...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Iwan_JauchIwan_Jauch Member Posts: 35
    Hi kine

    Thanks a lot for your help. I found the problem. The table user has a field with the name userid Code20. The table printerselection has the same field normally with type Code10. I used a login name for the nas how was longer than 10 characters. That was the problem.

    Best regards,
    Iwan
Sign In or Register to comment.