Report/Request Form

msraetsen
Member Posts: 8
Is there any way to get the Rec passed to a report using RUNMODAL(REPORT_ID, TRUE, FALSE, Rec) on the Request Form? Even if I can get the filter that shows up (and then I can get the record myself) that would be okay. E.g. If I run the Purchase Order Report from the Purchase Order Form, the Request Form shows the No. Filter for the specified Rec. Can I get this Filter? I can't figure this out because when the Request Form runs the Purchase Header record is empty.
Also, is there a way to save off the options selected in the Options tab of the Request Form without the user having to close the Report?
I'll explain what exactly I'm trying to do:
I call the report from a form. When the Request Form shows up, the user picks their options on the Options tab. If they click e-mail report, I want to recall the report (I have to do this so the Printer Dialog doesn't show up). But I need the initial record, and the subsequent call to the report has to pick up any options that they had selected.
Please let me know if I can clarify anything that would help somebody understand the problem better.
Any help is greatly appreciated.
Thanks,
Mark.
Also, is there a way to save off the options selected in the Options tab of the Request Form without the user having to close the Report?
I'll explain what exactly I'm trying to do:
I call the report from a form. When the Request Form shows up, the user picks their options on the Options tab. If they click e-mail report, I want to recall the report (I have to do this so the Printer Dialog doesn't show up). But I need the initial record, and the subsequent call to the report has to pick up any options that they had selected.
Please let me know if I can clarify anything that would help somebody understand the problem better.
Any help is greatly appreciated.
Thanks,
Mark.
0
Comments
-
Create function
SetVariables(YourRecord : Record)
BEGIN
NewRecord := YourRecord;
END;
in the report.
In the other object set variable to this report and enter this code
RepVar.SetVariables(Rec);
RepVar.SETTABLEVIEW(Rec);
RepVar.RUN;
In RequestForm use NewRecord variable.
Best regards0 -
It doesn't work
. I have a filter on "Location Filter" field and have a textbox "LocationCode" on request form. I can't fill field "LocationCode" from NewRecord."Location Filter". It's empty... Maybe i do something wrong...
0 -
to read flow filter (in your case "Location filter"), you must actaully use Getfilter function on this flow filter field.
LocationCode := NewRecord.GETFILTER("Location Filter")
Beware that getfilter returns string so thi will work only when single filter is applied. If you set range or any other filter you will have to do some more coding...®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯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