calling a Classic report from a page subform

steven77
Member Posts: 16
Good afternoon
I've this problem:
I deplove a report that print labels with barcodes, so users can run this report manualy (must set some values ) or from the page 12153 Subcontracting Order Subform, so in the report i did a function Setvalues(RecPurchaseLine) that assign automaticaly the values form Purchase Line table,
I create a page action for this, and then call a function that execute this code:
MyReport.SetValues(Rec);
MyReport.RUNMODAL;
look RTC client error in attached file.
seems that with RTC i can't call a function in a report before i have not run the report, so how i can solve my problem?
I've tried also do put another dataitem in report "Purchase Line"
And from the function in the page write code below:
RecPurchLine.SETRANGE("Document Type", "Document Type");
RecPurchLine.SETRANGE("Document No.", "Document No.");
RecPurchLine.SETRANGE("Line No.", "Line No.");
MyReport.SETTABLEVIEW(RecPurchLine);
MyReport.RUNMODAL;
It not work no filters are applied to MyReport
Help me please!!! ](*,) ](*,) ](*,) ](*,) ](*,)
I've this problem:
I deplove a report that print labels with barcodes, so users can run this report manualy (must set some values ) or from the page 12153 Subcontracting Order Subform, so in the report i did a function Setvalues(RecPurchaseLine) that assign automaticaly the values form Purchase Line table,
I create a page action for this, and then call a function that execute this code:
MyReport.SetValues(Rec);
MyReport.RUNMODAL;
look RTC client error in attached file.
seems that with RTC i can't call a function in a report before i have not run the report, so how i can solve my problem?
I've tried also do put another dataitem in report "Purchase Line"
And from the function in the page write code below:
RecPurchLine.SETRANGE("Document Type", "Document Type");
RecPurchLine.SETRANGE("Document No.", "Document No.");
RecPurchLine.SETRANGE("Line No.", "Line No.");
MyReport.SETTABLEVIEW(RecPurchLine);
MyReport.RUNMODAL;
It not work no filters are applied to MyReport
Help me please!!! ](*,) ](*,) ](*,) ](*,) ](*,)
0
Comments
-
steven77 wrote:Good afternoon
I've this problem:
I deplove a report that print labels with barcodes, so users can run this report manualy (must set some values ) or from the page 12153 Subcontracting Order Subform, so in the report i did a function Setvalues(RecPurchaseLine) that assign automaticaly the values form Purchase Line table,
I create a page action for this, and then call a function that execute this code:
MyReport.SetValues(Rec);
MyReport.RUNMODAL;
look RTC client error in attached file.
seems that with RTC i can't call a function in a report before i have not run the report, so how i can solve my problem?
I've tried also do put another dataitem in report "Purchase Line"
And from the function in the page write code below:
RecPurchLine.SETRANGE("Document Type", "Document Type");
RecPurchLine.SETRANGE("Document No.", "Document No.");
RecPurchLine.SETRANGE("Line No.", "Line No.");
MyReport.SETTABLEVIEW(RecPurchLine);
MyReport.RUNMODAL;
It not work no filters are applied to MyReport
Help me please!!! ](*,) ](*,) ](*,) ](*,) ](*,)
The only solution is to convert the report.~Rik~
It works as expected... More or Less...0 -
RUNMODAL is not supported for classic reports on RTC. Read for example http://blogs.msdn.com/b/nav/archive/2010/10/20/running-classic-reports-in-rtc-runmodal-and-a-few-other-things.aspx0
-
lvanvugt wrote:RUNMODAL is not supported for classic reports on RTC. Read for example http://blogs.msdn.com/b/nav/archive/2010/10/20/running-classic-reports-in-rtc-runmodal-and-a-few-other-things.aspx
With RUN is the same....0 -
steven77 wrote:lvanvugt wrote:RUNMODAL is not supported for classic reports on RTC. Read for example http://blogs.msdn.com/b/nav/archive/2010/10/20/running-classic-reports-in-rtc-runmodal-and-a-few-other-things.aspx
With RUN is the same....
the problem is that your report is a classic report.
you can call it in RTC, but if you want to use a function defined in the report before launching it, you've to create a RTC Layout for it.~Rik~
It works as expected... More or Less...0 -
It should work if you use:
RecPurchLine.SETRANGE("Document Type", "Document Type"); RecPurchLine.SETRANGE("Document No.", "Document No."); RecPurchLine.SETRANGE("Line No.", "Line No."); REPORT.RUN(REPORT::"MyReport",true,false,RecPurchLine);
If you are calling the report through variable, it must have Layout (to be compiled in .net).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
- 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