How to show client's resource gif image in a cloumn in grid

Hi All,

May be its easy for you all, but i m messed up with that.

I want to show the user resource image file , in a grid on a form.

I can show the image from the AOT > Resource on a form, but I want to show that one on grid, relative to every record.

I know, we can use ApplRes from Macro, that uses the standard resources, but dont understand how to display the user’s resources.

Right now, I m trying with display method, like this…

ResourceNode rn;

rn = SysResource::getResourceNode("");

rn.AOTLoad();

return rn.AOTBitmapId();

Am I doing right, i m not sure, but it show me, some different image…

Any Idea…

Hi,

Create a window control on the grid and bound it to a display method.

I use something like this and it works:

// bp deviation documented
display ImageRes showAnImage()
{
#resAppl

int ret;
;
ret = 0;
if (this.MyField == AnotherTable::find(this.ForeignKeyField).MyField)
ret = #ImageWarning;

else
ret = #Image_OK;

return ret;
}

Another solution for user resources is to crerate a field on the table of type container EDT bitmap then fill it by using a container.

To display it on the form just reverse the process. If i find the exact code I had used will paste it for you.

Hi Mirko,

Thanks for the reply, but I know , i can use the resource from AOT>Macro>ResAppl.

But I want to use the resources defind in AOT>Resources node.

Here, user has defined some of his gif images, and I want to use those resource.

I am able to show those images on a control on form, which is not in grid, but when i try to use that on a control in grid, i am not getting any image.

I am using the same display method for that.

Second thing, just to show, I dont want to add a new field on table.

Any suggestion…

While, the mean time, i am also using the images from ResAppl macro.

Thanks in advance…

yes the same problem is happening to me on the grid. Im gona look into into it. more deeply. If i discover anythin ill let you know.

well im seeing is that your code is returning the AOT image of the resource i.e. the image of the resource node in the AOT.

I still don’t know how to use this as a display method. I know how to use it by assigning the window.image(…) to the resource data.

Dear Mirko,

please send me the code for this issue , i will be grateful ,many thanks.

Hi ,

Kindly , it can be using display method and map data dictionary ,example Journal ledger form under General Ledger → Journals , thanks.