Running reports from inside other reports

MauddibMauddib 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?

Comments

  • ngebhardngebhard Member Posts: 127
    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
    Nicole
    ProTAKT Projekte & Business Software AG
    Microsoft Dynamics NAV Partner
    Bad Nauheim, Germany
    http://www.protakt.de
    http://twitter.com/protakt
  • alvilsbalvilsb Member Posts: 1
    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.
    Alvils Berzins
    Navision developer
    SIA "Finansu tehnologijas"
    http://www.ftehnologijas.lv
  • ngebhardngebhard Member Posts: 127
    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
    Nicole
    ProTAKT Projekte & Business Software AG
    Microsoft Dynamics NAV Partner
    Bad Nauheim, Germany
    http://www.protakt.de
    http://twitter.com/protakt
Sign In or Register to comment.