Hello everyone.
I have troubles with image in current report.
I've tried in new blank report - my code works perfect, but with Report 10401 it keeps be blank.
The code is on PreReport
ClientFileNAme := 'D:\_WORK_\SAve.bmp';
ServerFileName := FileManagement.UploadFileSilent(ClientFileNAme);
FileManagement.BLOBImportFromServerFile(TempBlob, ServerFileName);
TempCompanyInfo.INIT;
TempCompanyInfo.Picture := TempBlob.Blob;
TempCompanyInfo.INSERT(FALSE);
TempCompanyInfo.CALCFIELDS(Picture);
Variables
Name DataType Subtype Length
TempCompanyInfo Record Company Information
TempAttachment Record Attachment
FileManagement Codeunit File Management
ClientFileNAme Text
ServerFileName Text
TempBlob Record TempBlob
and the new report:
The image itself would be another one (this is only for test purposes).
Thanks everyone!
Answers
I don't have R10401 but... from the code and variables I deduce that you work with a Temporary CompanyInfo record for your test report. Does R10401 also work with a Temporary CompanyInfo record?
If not then your code does not work for R10401.
Good luck.
In what part of the dataset are you adding the picture?
Could it be a problem like that, that you don't have the picture added in the right part?
I found out the problem - it was I placed the image in the lowest level of hierarchy. When I moved it to the top - everything looks fine.