Hi
I am trying to create documents using SQL Server Report Builder and I would like to assign the logo based on the company like you would in the Reports>Template Configuration settings. I have found the table where these are stored as Binary BLOB's but can't figure out how to effectively link these to the company ID that is correct every time using tables syCompanyImages and SY01500.
I have got this to work for EITHER Fabrikam OR companies I have created using the following scripts:
NON FABRIKAM
SELECT SY01500.INTERID AS Company, SY01500.CMPNYNAM AS CompanyName, syCompanyImages.BinaryBlob AS Picture FROM Dynamics.dbo.syCompanyImages INNER JOIN Dynamics.dbo.SY01500 ON SY01500.CMPANYID = (syCompanyImages.RELID /65536) ORDER BY CMPNYNAM
FABRIKAM
SELECT SY01500.INTERID AS Company, SY01500.CMPNYNAM AS CompanyName, syCompanyImages.BinaryBlob AS Picture FROM Dynamics.dbo.syCompanyImages INNER JOIN Dynamics.dbo.SY01500 ON SY01500.CMPANYID = (syCompanyImages.RELID /65536) +1
ORDER BY CMPNYNAM
Any ideas would be greatly appreciated.
*This post is locked for comments