When creating reports that will be attached to the main reports menu (either the Job Reports menu or a standard SAP Business One reports menu), the standard token functionality introduced by SAP Business One as part of the parameters of a report, can be used in conjunction with reports based on Eralis Job information.
To make use of the tokens, an SAP Business One table must be included in the SQL script before the Eralis Job table. Failure to include the SAP Business One table in the SQL script will cause the token-based parameter to fail.
Token for Selecting the Job Number
The following script can be used as a base for creating a token to do a lookup for the job number.
JobID@SELECT JOBID,JOBTITLE FROM OADM CROSS JOIN ENPRISE_JOBCOST_JOB
By including the OADM table in the token script, SAP Business One will process the token as it normally would. Since the OADM table only contains a single record, there is no impact on the results of the query.
Token for Selecting the Subjob Number
The following script can be used as a base for creating a token to do a lookup for the subjob number:
SubjobID@SELECT SUBJOBID,JOBTITLE FROM OADM CROSS JOIN ENPRISE_JOBCOST_SUBJOB
If the list of subjobs displayed in the parameter needs to be restricted to the job number selected, then the script can be altered as follows:
SubjobID@SELECT SUBJOBID,JOBTITLE FROM OADM CROSS JOIN ENPRISE_JOBCOST_SUBJOB WHERE (JOBID = '@JobID')
The script above is based on the job selection parameter outlined above. It is important to note that the parameter name used in the WHERE clause to restrict the subjobs being selected is case sensitive.
Token for Selecting Job Types
The following script can be used as a base for creating a token to provide a list of job types for the user to select.
JobType@SELECT SEQNO,TYPE FROM OADM CROSS JOIN ENPRISE_JOBCOST_JOBTYPE
Crystal Drill Through
For reports, the standard drill through functions are available with the current exception being the ability to drill through and open the Master or Subjob screens.
SAP Business One tokens and the ability to drill through to master data is not supported in Crystal Reports that are launched from Eralis Job buttons.