Thursday, May 19, 2011

Printing Dynamics AX Company Logo using in SRS

Query: Can I display company logo / image in SRS

Answer:
In order to do that create one metod in AX, X++ as following.
static public str getImage()
{
    CompanyInfo info = CompanyInfo::find();
    BinData binData = new BinData();
    str ret;
    ;
    //conver image to base64String as .net requirement
    bindata.setData(CompanyImage::find(curext(), info.TableId, info.RecId).Image);
    ret = binData.base64Encode();
    return ret;
}


Call this method in SRS and set the source of the image to be this method.
[DataMethod(), AxSessionPermission(SecurityAction.Assert)]
    public static System.Byte[] GetCompanyLogo()
    {
        string logoImage = (string)SessionManager.GetSession().CallStaticRecordMethod("CompanyInfo", "getImage");
        byte[] imageBytes = Convert.FromBase64String(logoImage);
        return imageBytes;
    }

5 comments:

  1. Hi,

    could please guide me how to add image on ssrs design using the method ("GetCompanyLogo()")

    Regards,
    oromux@gmail.com

    ReplyDelete
  2. Microsoft Dynamics AX training, do keep a few things in mind to get the maximum out of the course as well as the application.we teach Microsoft Dynamics AX training and class at Hyderabad.Microsoft Dynamics CRM training in Hyderabad, Microsoft Dynamics NAV training in Hyderabad

    ReplyDelete
  3. Microsoft Dynamics CRM training will help you manage and prioritize your business goals, customize.we teach MS Dynamics CRM training and class available at Hyderabad.Microsoft Dynamics AX training in Hyderabad, Microsoft Dynamics NAV training in Hyderabad

    ReplyDelete
  4. Microsoft Dynamics NAV training could be a lifelong asset for your role in a small or medium enterprise.NAV Technical, NAV Trade, NAV Finance.we teach Microsoft Dynamics NAV training and class available at Hyderabad Microsoft Dynamics AX training in Hyderabad, Microsoft Dynamics CRM training in Hyderabad

    ReplyDelete
  5. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. logo design company in Bangalore

    ReplyDelete