Making Multiline Text Fields Print Correctly On Epicor SSRS Reports

If you ever add a multi-line text box within Epicor, you may have experienced the frustration with this one! The field looks and operates correctly on the form:

Screenshot of Epicor ERP multi-line text box - GingerHelp

But if you go to pull that onto an SSRS report everything gets reverted to a single line of text:

 
Screenshot of an Epicor SSRS report where the multi-line text box displays the text all on one line - GingerHelp
 

Frustrating, right? Well, there is probably some SSRS formula that we could use to resolve this, but for those of us more inclined to fix it within Epicor, here is a little trick I learned. Create a Data Directive BPM on the table with the field giving us grief (in my case here it is BOLHead.ThirdName_c) and set it up so that on save, we replace character 13 (the Carriage Return character) with character 10 (the Line Feed character). If you want to read a bit more to understand what the heck that all mean see here: https://www.petefreitag.com/item/863.cfm

Set it up as an In-Transaction data directive like so:

Screenshot of Epicor ERP Data Directives screen - GingerHelp

And then put the following in the code object within that BPM:

ttBOLHead.First()["ThirdName_c"] = ttBOLHead.First()["ThirdName_c"].ToString().Replace((char)13, (char)10);

You want to replace the table and column names with the table/fields you are fixing up. And that’s it - going forward any time a record is edited or created within Epicor, it replaces the carriage returns with line feeds - making everything look good both in Epicor and SSRS. Do note that this doesn’t fix-up any historical data (you’d probably want a TSQL statement to mass update those).


Free Consultation

Having any other issues with your Epicor SSRS reports? Contact us today for a free consultation!