Image in Report 10401

Astinia
Member Posts: 40
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!
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!
0
Best Answer
-
Thanks for the help, guys.
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.5
Answers
-
Hi,
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.\\The truth exists in seven versions.0 -
Hi,
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?0 -
Thanks for the help, guys.
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.5
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions