OLE DB, which is used to provide connection to Access Databases, adds a header to attachments which makes bitmaps show as invalid bitmap files. Additionally, Access actually stores attachments in a subtable which is not made available to the metadata.
There are two steps. First, set the check.for.ole.images flag to "true" (added in version 188.8.131.52).
- For AutoTag, it's easiest to set this in the registry.
- Open the registry editor.
Create the key (not value, but key) HKEY_CURRENT_USER\Software\Windward Studios\Reporting Engine
In the Reporting Engine key create a string value check.for.ole.images
Set the value of that to true
For the .NET Engine, you can set the value in the app.config file
For the Java Engine, you can set this in the windwardreports.properties files
The second step is to manually edit your select to get the actual file data from the hidden tables. Instead of
select [tableName].[myAttachment] from [tableName]
You'll need to reference the attachment subtable, like so:
select [tableName].[myAttachment].Attachments.FileData from [tableName]
The three fields available are FileData, FileName, and FileType - you can filter on those as well, using a WHERE clause.