- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to make a custom report and are having some difficulties getting the Thumbnails from my BOM to populate the report.
I have followed the instructions given in the Custom Reporting in Vault 2019 but I must be missing something.
So far I have:
- Included "Thumbnail" as a property when generating the template from the Autodesk Report Template Utility
- Inserted "Image container" to the corresponding row
- Set the "Image source" to Database.
- Set the field to the following expression: =Convert.FromBase64String(Fields!.Value)
- Tried including the string "conversion code" both under Report Properties > Code and under the expression field mentioned previously but neither has worked.
String "conversion code" as written in the article/link above:
string base64string;
using (var stream = new MemoryStream())
{
image.Save(stream, ImageFormat.Bmp);
base64string = Convert.ToBase64String(stream.ToArray());
}
var val = propDef.Typ == DataType.Image ? Convert.ToBase64String((byte[])propInst.Val)
: propInst.Val;
If I remove the image container and thumbnail code the BOM report template works so I know its not something else in the template that makes it trip up.
Very grateful for any help in sorting this out!
Best regards,
Fredrik
Solved! Go to Solution.