printer window disappear in background

wicwic Member Posts: 96
edited 2003-11-19 in Navision Attain
hi all, when I call a report which prints other reports, the printer request window disappear in background. Can someone help me with that?

Print Button:
OnPush()
REPORT.RUNMODAL(81400,TRUE,FALSE,SalesInvHeader);
Here, I send the actual record (filter) to the report 81400

R81400
OnPreDataItem()
CurrReport.BREAK;

OnPreReport()
CASE Big conditions to determine which report to print OF
1: REPORT.RUNMODAL(82000,FALSE,FALSE,MyRec);
2: REPORT.RUNMODAL(82010,FALSE,FALSE,MyRec);
END;

After that, the Windows XP printe request window disappear in background. To print, I've to minimize Navision then choose printer/OK.
:twisted:
#### Only one can survive ######

Comments

  • Edward_BloomfieldEdward_Bloomfield Member Posts: 155
    Hello,

    We have a client who does a lot of their own development, who encountered this issue. As yet we do not have a resolution, other than not to try to run reports from within reports. Because you are calling a report, and then calling another report, the second report pushes the first aside.

    Generally this is not a good idea, you should instead write a function on a table or form, or a codeunit that controls both of them instead. I'm sure that people will correct me if I am wrong, but I cannot think of an example in standard Navision where a report calls another one.
    Edward Bloomfield

    Lead Consultant
    Theta
  • wicwic Member Posts: 96
    :lol: like a lot of medicinal product, I've found luckily a solution about this:on the calling object (OnPush) you add Message('well done'); after the report.runmodal... and it works!
    EUREKA!
    my code:
    OnPush()
    CurrForm.SETSELECTIONFILTER(SalesShptHeader);
    REPORT.RUNMODAL(50000,TRUE,FALSE,SalesShptHeader);
    MESSAGE(txt001);

    R50000
    CASE mega condiditon OF
    1: REPORT.RUNMODAL(50500,FALSE,FALSE,SalesShptHeader);
    END;
    #### Only one can survive ######
Sign In or Register to comment.