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;
}
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;
}
Hi,
ReplyDeletecould please guide me how to add image on ssrs design using the method ("GetCompanyLogo()")
Regards,
oromux@gmail.com
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
ReplyDeleteMicrosoft 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
ReplyDeleteMicrosoft 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
ReplyDeleteThis 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