Options

NAV2013 Report - Picture value not being displayed - red x

rsaritzkyrsaritzky Member Posts: 469
edited 2014-04-02 in NAV Three Tier
Hi,

I know this topic has been discussed before, and I have been successful before in NAV2009 in getting pictures onto reports. I'm trying to add a picture box to the A/P check (stub/check/stub) containing a signature. A new BLOB field in GL Setup has been created and has the bitmap of the signature.

In the OnPreReport Trigger, I'm
GLSetup.GET;
GLSetup.CALCFIELDS("Check Signature");

I added this field to the Report dataset and named it "GLSetupCheckSig".

Then, as documented in other "how-to's" on this topic, I created an image box in the report layout with a value of

=Convert.ToBase64String(Fields!GLSetupCheckSig.Value)

I've named this control "CheckSignatureHeaderBox".

Then I added text box using the "SetPicture" function:
=Code.SetPicture(ReportItems!CheckSignatureHeaderBox.Value)

Finally, another image control with the value in the report footer where I want the signature:
=Convert.FromBase64String(Code.GetPicture())

During testing, I have made all boxes visible.

The first image control ("CheckSignatureHeaderBox") shows with the "infamous" red X. And of course the signature doesn't display either.

I enabled report preview and looked at the dataset. The signature field shows up as "<>" (which I believe is blank/null) instead of "*" (which I believe means "some value")

Reportdata_zps0fe964b2.jpg

Has anyone seen this problem? Any ideas?

Thanks
Ron

Comments

  • Options
    geordiegeordie Member Posts: 655
    In this case I would not focus on report layout, since from the dataset it's clear, as you said, that the field always comes empty.

    1) Is there effectively a bitmap loaded in the General Ledger Setup table?
    2) Is there is any CLEAR of GLSetup variable somewhere?
    3) Can you ensure that the field in the dataset has been added in the same data item of, for instance, "DocNo" field?
  • Options
    rsaritzkyrsaritzky Member Posts: 469
    Thanks for the reply. I came to the same conclusion that the problem was in the report code, not in the report design. As I mentioned, the CALCFIELDS on the signature BLOB field wasn't returning any value to the dataset. I checked the code and it wasn't being cleared or re-read or anything - at least not where I could find it. But I created a second record variable anyway and read the same setup record a second (separate) time and this time, it worked. So problem solved. Once the dataset sent data to the report, the actual manipulation of the image controls worked fine. Can't really understand why, but it is working at least. Thx again.
    Ron
Sign In or Register to comment.