Running reports from inside other reports
Mauddib
Member Posts: 269
Another newbie question. I will create a simple scenario for my question rather than explain my own situation.
Imagine creating a simple report that reads the item tables and brings back every item that has a "Modified on" date after a certain date.
Imagine that for whatever reason you use a request form to ask for the date. So when running the report the ITEM tab is where you can filter the Item table but the request for has a simple text box for typing in the date.
Now from ANOTHER report I want to:
Trigger the first report to run.
Pass in a parameter to the ITEM tab to filter on No. (eg F* all item codes starting with F, or FR1234 just item FR1234).
Pass in the parametre to the date on the Request for tab.
Make this report print automatically without the user seeing it ever opened.
How do I go about it? I presume in my global variables on report2 that I create a variable of type report referencing report1. But then what?
Imagine creating a simple report that reads the item tables and brings back every item that has a "Modified on" date after a certain date.
Imagine that for whatever reason you use a request form to ask for the date. So when running the report the ITEM tab is where you can filter the Item table but the request for has a simple text box for typing in the date.
Now from ANOTHER report I want to:
Trigger the first report to run.
Pass in a parameter to the ITEM tab to filter on No. (eg F* all item codes starting with F, or FR1234 just item FR1234).
Pass in the parametre to the date on the Request for tab.
Make this report print automatically without the user seeing it ever opened.
How do I go about it? I presume in my global variables on report2 that I create a variable of type report referencing report1. But then what?
0
Comments
-
Hi!
I don't get exactly what you are trying to do but did you try the "report.runmodal"- (waits until report finished before continuing) or "report.run"-function?!
If you need further help, try to explain again for me!
Greetz
NicoleProTAKT Projekte & Business Software AG
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt0 -
Well, what I would do is:
* Create a temporary table (Universal Totals Buffer, so to say
* Read the table you wish to take the filter from
* Filter data from the second table
* Write it into the temporary table
* Output it via Integer
* Print it out by running the report as ReportXX.PRINT or something else. I do not remember exactly.
...if _that_ is what you meant.0 -
After reading your post once again I might understand what you are trying to do. You don't want to show the request form right? So then don't use it!! :-)
Create a function in the second report where you use globals. Run this function from the first report and pass your filters or whatever you want through this function. Then run the 2nd report from report 1 and in report 1 you need to set the filter with the globals.
Hope I got it now! ](*,)
Greetz
NicoleProTAKT Projekte & Business Software AG
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt0
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