Using the Logicity Crystal Viewer to Automate Reports Within Epicor

logicity automate epicor crystal reportsOne of Logicity's strengths is its ability to set-up and execute Crystal Reports in a variety of ways.  Epicor ERP's strength is its ability to be customized and extended.  It is time to bring these two parties together and let them play off of each other's strengths.  How can you set-up the Logicity Crystal Reports viewer to allow Epicor to utilize its power at will?  Using the following methodology, you will be able to execute automatic e-mailing, printing, or saving of Crystal Reports on any business object method inside of Epicor.  

Setting Up Logicity Crystal Report Viewer to Automatically Email or Print an Invoice in Epicor

The example we are presenting here is for setting up invoicing in Epicor to automatically email or print an invoice based on the parameters saved with the customer record.  Therefore we will be enhancing the ARInvoice.PrePrintInvoices method.  
We have some example files here you can download and install.  Once you download the ZIP file, you will need to:
  1. Drop the files in C:\epicor\Epicor905\Server\ud\Logicity
  2. Import Logicity BPMs.bpm
  3. Import InvcDelCtl_CustomerEntry_20130304.xml
This example starts in customer entry, which is what the XML file is for.  We added some simple check boxes to Epicor and a field to say how invoices are preferred to be delivered.  Everyone might want this set-up in a different way – just keep in mind that this is an example of what can be done.
logicity crystal reports epicor integration
If you look at the BPMs that were imported, you can see that we have one that handles printing and another that controls e-mailing.
logicity crystal reports epicor integration
The condition determines whether or not this action should run.  We are using a simple query in this case, but you could put whatever you want to in here.
logicity crystal reports epicor integration
And then you have the action.  It is a 4GL action and most of the settings you will need are here.  We are setting these all as variables but they could be pulled from a data table, BPM forms, or another source.
logicity crystal reports epicor integration
Hopefully, the comments are pretty self-explanatory.  The last line pushes all of these settings into a .P file that we made up.  Basically all that .P is doing is calling out a Logicity command line passing in the values specified here.  The .P file included here in this example is specific to invoices, but you should be able to easily modify it for other purposes.

Some Additional Notes:

  1. Bear in mind that Logicity executes at the server level.  So, Logicity Professional will need to be installed there, any printers referenced should also be installed, and you will need to be logged into the server since Logicity does not run as a service.  
  2. If you look at the .P file you will see we are calling Logicity Desktop and passing it a parameter of the RRD file along with a string of the command line replacements.  You can pretty much substitute any string in the RRD file this way.  
  3. Open up the RRD files in Notepad to edit them since they have such heavy use of command line replacements.
  4. Some of the SMTP settings are not exposed in the Progress ASBL code but you can edit them in the RRD.



About the Author

Eli J Remington

Eli J Remington

Eli is the web marketing director and a partner at SaberLogic, a professional services firm that provides custom development, programming services, integration consulting and technical support for Infor ERP VISUAL and Epicor ERP. SaberLogic also specializes in Crystal Reports development, custom programming and custom web development. Follow Eli on Google+ and Linkedin.


Logicity Logo White 300

526 S Main St., Suite 805, Akron, OH 44311 USA