Run a report with filter information

nav_student
Member Posts: 175
Hi guys i want to populate a report with information from the form Reminder Header table.
The dataitem of my report is made by the table " Issued Reminder Header".
How can i call this Report with the information that is given by the record that is on the Reminder Header table?
I have tried this code
IssRemindHeader.SETCURRENTKEY(IssRemindHeader."No.");
IssRemindHeader.SETFILTER("No.", ReminderHeader."No.");
r.SETTABLEVIEW(Rec);
r.RUN()
but error is telling me
The Remimnder report does not have a DataItem that uses the table 297 specified the function SetTableView.
I try to use the functiuon TRANSFERFIELDS but Nav gives me an error telling me that the fields has to belong to the same table.
Can you help me?
Best Regards.
The dataitem of my report is made by the table " Issued Reminder Header".
How can i call this Report with the information that is given by the record that is on the Reminder Header table?
I have tried this code
IssRemindHeader.SETCURRENTKEY(IssRemindHeader."No.");
IssRemindHeader.SETFILTER("No.", ReminderHeader."No.");
r.SETTABLEVIEW(Rec);
r.RUN()
but error is telling me
The Remimnder report does not have a DataItem that uses the table 297 specified the function SetTableView.
I try to use the functiuon TRANSFERFIELDS but Nav gives me an error telling me that the fields has to belong to the same table.
Can you help me?
Best Regards.
0
Comments
-
Check the c/side ref guide for RUNMODAL for details.
use search search.php
for "pass filter to report" for many posts & examples
here's 1 to start:
viewtopic.php?f=23&t=372860 -
IssRemindHeader.SETCURRENTKEY(IssRemindHeader."No.");
IssRemindHeader.SETFILTER("No.", ReminderHeader."No.");
r.SETTABLEVIEW(Rec); <-- the problem is here instead of rec it should be IssRemindHeader
r.RUN()Sendoh
be smart before being a clever.0 -
With this the problem remains
The Remimnder report does not have a DataItem that uses the table 297 specified the function SetTableView.IssRemindHeader.SETCURRENTKEY(IssRemindHeader."No."); IssRemindHeader.SETFILTER("No.", ReminderHeader."No."); r.SETTABLEVIEW(IssRemindHeader); r.RUN()
I try also thisCLEAR(r); IssRemindHeader.INIT; IssRemindHeader.TRANSFERFIELDS(Rec,FALSE); IssRemindHeader.INSERT; IssRemindHeader.SETCURRENTKEY(IssRemindHeader."No."); IssRemindHeader.SETFILTER("No.", ReminderHeader."No."); r.SETTABLEVIEW(IssRemindHeader); r.RUNMODAL;
The debugger stops on r.SETTABLEVIEW(IssRemindHeader).
I do not understand why i have this error the data item´s for my report are:
Issued Reminder Header
Integer
Integer
Issued Reminder Line
Issued Reminder Line
Issued Reminder Line
Integer
Integer
On the referenceGuide i see this
This function only narrows the view of the table that was set through the SourceTableView property of the form, or the DataItemTableView property of the data item.
Form has SourceTableView -> Reminder Header
Report has DataItem -> Issued Reminder Header0
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