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 ######
0
Comments
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.
Lead Consultant
Theta
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;