Whenever you want a custom image to be shown in AX reports (Not SSRS reports), just do the following.
- In the Design section of the report, create a BITMAP control.
- Create a display method with the code as shown below in the report methods.
- Import the external image file into AX as shown below
public display Bitmap Image()
3. On the DataMethod property of the BITMAP control give the name of the above created display method name. save & compile. Job is DONE!!!!!!
{
// CustomImageName is the name of the image in the AX resources node after importing
ResourceNode resNode=SysResource::getResourceNode('CustomImageName');
container nodeData;
Image img;
if (resNode != null)
{
resNode.AOTload();
nodeData = SysResource::getResourceNodeData(resNode);
img = new Image(nodeData);
}
return img.getData();
}
3. On the DataMethod property of the BITMAP control give the name of the above created display method name. save & compile. Job is DONE!!!!!!
No comments:
Post a Comment