How Can We Help?
Background
Let’s say you have an XMPro ActivityA specific step in a process. It will be the user interface for that step (web form or a screen), for example, the Leave Application (screen interface or web form) will be the first Activity in the Leave Requisition process. The Leave Application Authorization will be the second step or Activity in the Leave Requisition process. One Process can have multiple activities. or Task where you have included the Upload Control to upload image files or take photos and upload them from your mobile. Once the activity is completed, you might want to include the captured image in the activity into an XMPro Report.
Pre-requisites
To Include an image in a report, the following pre-requisites need to be completed.
Develop a XMPro process with two steps
- A mobile enabled first activity form where you have configured Upload Control. On clicking submit, the next activity ‘Print Report’ will be initiated.
- Second activity (Print Report) which will be initiated from a command control of the first activity. The Second activity controls are as follows.
We want to generate a report by clicking on Generate Report. We want the report to contain the image captured and uploaded in the first activity.
Develop a XMPro Report Template
Develop a XMPro report template using XMPro Report Designer. Include a Picture Box in the report and Include a Parameter field called ‘Photo1 to accept input from the ‘Print Report’ form.
Including an Image in a Report
Report Changes
Log into XMDesigner. Launch Report Designer and open the report already created as per the prerequisites. Click on the Picture Box and change the Sizing to Squeeze.
Save the Report and click on the Scripts.
In the opened script editor, select the Picture Box Control and Select Before Print.
Paste the following code on to the script editor and save the report.
‘Print Report’ activity Changes
Navigate to ‘Print Report’ and click on Managed activity.
Add the following references in the opened script editor. The DevExpress version depends on the XMPro Product Version. Refer to your “bin” directory in XMPro Installation Directory to know the Dev Express Version.
Close the Script Editor and Save the activity. Double Click on ‘Print Report’ activity. Enable Script IDE and double click on ‘Generate Report’ command control to open script designer.
Let’s say if the command control id is “SE3050GenerateReport”, in the opened script designer, paste the following lines of code and replace the place holders as required.
The report will be generated in the folder mentioned as per the name provided in the code.
Comments are closed.