Display a part image in a customization - Example Video

There are two ways to get it into a BAQ report.

The easy way is to make a subreport that uses a data source that reads from the database directly. You could pass the subreport the image id and have it display the part image. The great thing about this method is it’s a generic subreport that can be reused any place you wanted to display an image like travelers or employee badges.

The other approach is to add a calculated field to the baq and append the image data to the filed in a GetList post process directive. Something like this:

            using (var imageSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.ImageSvcContract>(Db))
            {
                var resultDt = result.Tables["Results"];
                foreach (DataRow row in resultDt.Rows)
                {
                    row["Calculated_ImageContent"] = Convert.ToBase64String(imageSvc.GetOriginalImage(row["Image_ImageID"].ToString()));

                }

            }

image

1 Like