mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/
|
|
Import Applications
Web 2.0 applications allow you to import applications into one another without needing to call complicated external objects. In the example provided below, we will import a Web 2.0 Report into a Web 2.0 Inquiry. For your flexibility, however, you can import any Web 2.0 application into any other Web 2.0 application.
Let’s say I have a Web 2.0 single record inquiry that contains header information for a certain Product. I want to import a Report directly into the body of the Inquiry, passing along the appropriate values. There are 3 main steps I need to follow:
Step 1: Make the Single Record Inquiry.
This application is a simple Inquiry application that contains basic product information. The build process for Step 1 is not illustrated in this example.
Step 2: Build the Web 2.0 Report.
- Be sure to have the Product Number as a Record Selection equal to “?”
- Paint the Report to remove extraneous information (headers and footers) N.B. Headers and Footers would be redundant on your Report as this information will already be seen on the Inquiry screen.
Step 3: Paint the Inquiry
(Optional) Step 4: Make a Web 2.0 Multi Record Inquiry for a Product Header Screen, building a Smartlink to the application you built in Step 1. This step is optional and is included to allow you to “complete” your web application. This multi record inquiry will serve as your “Main Page” as users can link to all other pages from here. The build process for this step is not illustrated in this example.
Step 2: Be sure to choose the “Web 2.0 Report” as your Template.

The key information that will be passed between our two imported applications is the product number. To allow the report to acknowledge the parameter, we must set up a Record Selection for the Product Number equal to “?”.

Once your Report is built, feel free to open it in m-Painter and remove the header and footer as there is no need to have the header and footer within the report and the inquiry. Next, it is time to import your Report. Since we are going to import your report into your retrieval, let’s open up the retrieval within m-Painter.

Right click within the table and select “Insert Row.” Type the following information into the new cell:
import:HURCKES.R01364s?run=2&R001=${row.PRDNO}:end
The import: & :end tags tell the servlet that an import is beginning and ending, respectively.
HURCKES.R01346s is the application being imported.
?run=2 instructs the report to skip the prompt page and go directly to the result set.
&R001=${row.PRDNO} instructs the servlet to include the PRDNO (Product Number) as the Record Selection (R001).
To import a retrieval the following code is required.
import:HURCKES.I00072s?slnk=1&CUSNUM=${row.CUSNO}:end
In this case slnk=1 instructs the retriever to receive a parameter and it is passing to field CUSNUM in retriever I00072 the value of field CUSNO from our dashboard retriever.
At run time, our screen (built in Step 3), shows us all available products:

Selecting the “Rear Axle/10SP/” delivers us this screen: (note the report is imported directly into the table).

Going back to the beginning Multi Record Inquiry and selecting a different record (Seat Assembly/Racer”…

Yields us this output:
