Report.RunModal() calls stopped working after migration to 4.0sp3

I have several batch reports that call other reports using the report.runmodal() function. After we migrated from V3.7 to V4.0sp3 client, these function calls stopped working. Has anyone else experienced this? If so is there a fix? I am in the process of rewriting the reports into a codeunit, but some of the calls are to EDI reports.

Rodney Mumaw

When you say, “stopped working”, exactly what is happening? I’ve done report and dataport runmodal calls in all the versions up thru NAV 2009 with no problems so I suspect is may be something other than an executable difference.

When stepping through in the debugger, it processes the OnPreReport() section but never goes on to the OnAfterGetRecord(). No error, just stops processing.

Hi Rodney,

Firstly, Welcome to the Dynamics User Group!

Have you check the DataItemTableView of the report to see if it is filtering one the records. Does the report run if run manually?

Thanks for the welcom Dave,

Yes, it runs fine if run manually. The report is a Canned EDI report 14002365 Receive All E.D.I. Documents.

there is a DataItemTableView set on the child data item (E.D.I Document) of:

SORTING(Trade Partner No.,Navision Document,EDI Document No.,Version,Type) ORDER(Ascending) WHERE(Status=FILTER(<>Inactive),Type=CONST(Import))

But no filter set on the parent data item (E.D.I. Trade Partner)


Is the report passed a filtered record when the Report.RUNMODAL is called? Put a break point on the RUNMODAL and in the debugger check the filters on the passed in record.

That was the first thing that I checked, there are no filters on the data items, however the record variables do not contain any data (blank record). This is observed in the debugger in the variable window. The report is acting as if there are no records to process.

Can you export the report as text and post it? How big is it?