How to display multiple images horizontally in Report Designer

  • 13 April 2023
  • 3 replies
  • 344 views

Userlevel 7
Badge +7

 Acumatica allows for the attachment of one or more images on any master or transactional data record. 

Typically with the Report Designer when there is more than one detail record the information is printed vertically, with one row displayed in each detail section.  However you can save space and make reports prettier by printing the images horizontally.  Some typical use cases are a product catalog, or images associated with a purchase order line. 


One way to accomplish this is through the use of subreports, however creating and maintaining multiple subreports can be awkward.

A more streamlined way to do this is using variables.  

Note that in order for this trick to work you do have limit the number of images per record to some fixed number.  In this example I’ve limited the number of images per stock item to four.

  1. First configure the schema, including the NoteDoc and UploadFile data access classes.  The UploadFile.Name field should normally be filtered to include images of a particular format such as jpg or png.  You’ll need to specify this format later when configuring the PictureBox control.
  2. Next add a group, in this example we’re grouping on the InventoryID.

  3. Edit the collection of Variables in the detail section of the report.  The $cnt variable is used to keep track of the number of pictures.  Depending on the value of $cnt, the UploadFile.Name field is assigned to either $img1, $img2, $img3, or $img4.   The $cnt variable is reset to 0 for each stock item group.  

  4. Add a PictureBox for each of the images.

  5. The Value property of the PictureBox references the corresponding variable.  Be sure to set the Visible property to hide the PictureBox if there is no image.

  6.  The final output will look something like this:

A sample of the rpx file is attached.

You can use a similar trick to print other types of detail information horizontally.

Happy reporting!

Laura


3 replies

Userlevel 7
Badge

Thank you for sharing this tip with the community @lauraj46 !

Badge

I'm working on a sub report, I need the information to go sideways, but the Report Designer won't let me change it. There is some way to change the way information comes out.

 

 

 

Example:

10.36 10.15 10.25 10.05 10.10 10.50 10.33 10.44 10.01 10.05

Userlevel 7
Badge +7

Hi @edgarrodriguez23 ,

You could use a report variable to accomplish this. 

The variable declaration would go the Detail section of the report.  Replace InTran.MyAttribute in the example below with the field name that you are concatenating.

Variable Name: HorizontalShipWt

ValueExpr: =$HorizontalShipWt + CStr([INTran.MyAttribute]) + ‘ ‘

Add a text control in the report footer with the ValueExpr: =$HorizontalShipWt

Hope this helps!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved