Report Return Value Standard As Codeunit

andy76
Member Posts: 616
Hello,
is not possible to have a return value from a report in a manner similar to a standard codeunit call:
[Ok] := Codeunit.RUN(Number [, Record])
If Ok is...
It means that...
TRUE
No errors occurred
FALSE
An error occurred during the execution of the codeunit
To evitate runtime error and manage them?
Thank you
is not possible to have a return value from a report in a manner similar to a standard codeunit call:
[Ok] := Codeunit.RUN(Number [, Record])
If Ok is...
It means that...
TRUE
No errors occurred
FALSE
An error occurred during the execution of the codeunit
To evitate runtime error and manage them?
Thank you
0
Comments
-
No, you have to run your report from a codeunit to do it0
-
I already have a codeunit that launches more report as following
REPORT.RUNMODAL(123);
REPORT.RUNMODAL(234);
REPORT.RUNMODAL(345);
REPORT.RUNMODAL(543);
....
REPORT.RUNMODAL(8978);
I want that, if a report, fails the following ones are run otherwise all processing of the codeunit is skipped for error.
Thank you0 -
try this:
in your codeunit define variables for your reports
Rep123, Rep234 ...
and run reports as follows:Rep123.RUNMODAL IF Rep123.ExecutedOk THEN BEGIN Rep234.RUNMODAL; IF Rep234.ExecutedOk THEN BEGIN ... END; END;
here ExecutedOk is your defined function in each report something like this:EXIT(bExecutedOk)
and bExecutedOk is boolean global variable defined in each report and set to true in its OnPostReport trigger. Here i assume that everything went ok if your code reached the end of OnPostReport trigger0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions