Images/Logo Error - RTC

krithikakrithika Member Posts: 56
edited 2011-11-26 in NAV Three Tier
I tried to add database image(company Information -logo) to RTC.
Steps Done:

Added Image picture box with src exp =Companyinfo.Picture.
Wrote Codings in Pre dataitem as Companyinfo.GET; CompanyInfo.CALCFIELDS(Picture);

Then added a text box in the Body of RTC and set the property as:
Value: “=Convert.ToBase64String(Fields!CompanyInfo_Picture.Value)”
Name: “CompanyPicture”
Visibility Hidden: “True”
Color: “Red”

Codings written in Report property as:
Shared PictureData as Object
Public Function GetPicture() as Object
Return PictureData
End Function
Public Function SetPicture(NewData as Object)
if NewData>""
PictureData = NewData
end if
End Function

Later kept image box in the header page of RTC with the following properties:
Value: “=Convert.FromBase64String(Code.GetPicture())”
Source: “Database”
MIMEType: “image/bmp”

Finally added a text box above the image box control with the properties:
Value: “=Code.SetPicture(ReportItems!CompanyPicture.Value)”
Visibility Hidden: “True”
Color: “Red

Apart from that Name property is set as image2 bcoz i have already kept an embedded image.
When I compile the report it throws the error as
"Error while validating ,the value for image 2 should not be constant and should be binary".
How to resolve this issue :?
Sign In or Register to comment.