You can code you report so as to permit the use of aliases for tables quite easily. Typically an application is expecting to run against the default table identified for the application:
Check the maxintbname value within the maxapps table for the specific application you want to link the report to. This is the table that the primary select statement will refer to, and the partial 'where' clause that maximo passes to the report will be constructed with this in mind. (e.g. for the Work Order Tracking application - WOTRACK - the primary table is WORKORDER)
The Open method for the primary select within the BIRT report will build an appropriate SQL Select Statement and will append the where clause passed by MAXIMO to the end. Thus if you use an alias for workorder - this will not match with the incoming where clause supplied by maximo. The way around this is to code an additional include statement
e.g. rather than use the following:
select ... from workorder mydetails
where $where;
use something like:
select ... from workorder alias ....
where alias.workorderid in (select workorderid from workorder where $where):
(workorderid is the unique column containing an integer value. You can determine the appropriate unique column by looking at the MAXTABLS entry for the table you are referencing and checking the uniquecolumn value)
So this permits you to code a report which will run no matter what where clause maximo passes from the Work Order Tracking application.
If you now register this report against the PM application - it will typically file to run because the where clause passed in will relate to the PM application and not the WORKORDER object. This is where the appname parameter comes in - you can use this to add conditional logic to perform slightly different things depending in the calling application.
Typically the Ticket List Report uses this value to add an appropriate title depending on whether the report is invoked from the Service Request application, the Incident application or the Problem application!
:)