Printing report shows xrec data?
DHendriksen
Member Posts: 32
Hi all,
I do have a basic problem I guess, but I don't know the answer to solve it. The fact is:
Our customer set the field Blocked to yes while changing the item card. After the card is changed the Item will be unblocked, so it can be used. While unblocking there shoul be printed a report with several fields. But guess, all the data which is printed is the xrec data. Why?
I've tried the following:
- In the Onvalidate of the field Blocked we added the code:
Report.RUN(reportno, false, false, rec); Doesn't work
also the Report.RUNMODAL(reportno, false, false, rec); Doesn't work
- I replaced the Rec by a local variable lRecItem. Doesn't work
- Even a commit doesn't work! That's strange.
- Moving the code to the OnModify of the table. Doesn't work.
What will work is the following:
Report.RUN(reportno, true, false, rec);
So the request form will be shown to the user. Then the current data is presented. Why? The report should be printed automatically.
This customer uses Dynamics NAV 4.03 engine on SQL.
Please help, thanx in advance!
Don Hendriksen
I do have a basic problem I guess, but I don't know the answer to solve it. The fact is:
Our customer set the field Blocked to yes while changing the item card. After the card is changed the Item will be unblocked, so it can be used. While unblocking there shoul be printed a report with several fields. But guess, all the data which is printed is the xrec data. Why?
I've tried the following:
- In the Onvalidate of the field Blocked we added the code:
Report.RUN(reportno, false, false, rec); Doesn't work
also the Report.RUNMODAL(reportno, false, false, rec); Doesn't work
- I replaced the Rec by a local variable lRecItem. Doesn't work
- Even a commit doesn't work! That's strange.
- Moving the code to the OnModify of the table. Doesn't work.
What will work is the following:
Report.RUN(reportno, true, false, rec);
So the request form will be shown to the user. Then the current data is presented. Why? The report should be printed automatically.
This customer uses Dynamics NAV 4.03 engine on SQL.
Please help, thanx in advance!
Don Hendriksen
0
Comments
-
During OnValidate the record is not saved into the database yet. The report is taking only filters from the passed record, not the values. If you want to pass the values, you need to create some function in the report and call this function. Than you need to use the passed values in the report. Because that you need to call the report through variable of type report.0
-
Kamil,
Thanx for your answer.
What you suggested works fine. On the report I created a global functions to pass the current Item record. And used this record data to present on the report. Basically the report was based on the Item table, I changed it to the Integer table with numberfilter = 1.
We solved the problem.
Thanx!0
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
- 323 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
