In AiM, you can search for records using the search feature and be presented with a browse list of records that meet the search criteria. For some browse lists, there is a browse print report accessible when you click the printer button when viewing the browse. However, the report is very large and will consume lots of paper. So I set out to make my own report with the records arrayed in more of a list.
The report needs to be set up to accept multiple values for a single parameter. To do this, I tried the two different methods for passing multiple values to a parameter and found that only this one worked.
In the script tab of your dataset, enter the following script
var endOfQuery = " WHERE workorder.proposal IN ('" + params["proposal"].replace(/,/g,"','") + "')";
this.queryText += endOfQuery;
At runtime, the above script appends to the query by adding a where clause. As always, you need to be very specific (including case) with the name of the parameter.
Put the report into AiM. Don’t specify that it is visible in any modules. In view/select, pick screens and pick the screen where this report should be visible. In the case of a work order browse, pick wo_browse.
UPDATE: I found a limitation in Aim that affects the output of this report. Because Internet Exploder has a limitation on the number of characters for the URL, Aim limits the number of proposal #'s it sends as parameter values to the report. The report will only output the work orders displayed on the screen. So if your search returns 3000 work orders, you'll only get the 25 or so work orders visible on the screen.
Friday, June 4, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment