How to convert images to base 64
public str (RefRecId _refRecId, RefTableId _refTableId)
str filePath = ”;
Filename fileName = ”;
where docuRef.RefRecId == _refRecId
&& docuRef.RefTableId == _refTableId;
// Get Images complete File Name
fileName = docuRef.completeFilename();
image = System.Drawing.Image::FromFile(@Filename);
memoryStream = new System.IO.MemoryStream();
filePath = System.Convert::ToBase64String(memoryStream.ToArray());
Assuming parameters _refRecId and _refTableId came from InventTable where the Product Images is set in Released Product under Product Image function. See image below:
Removed Failed Report Name in Report Queue Status of Management Reporter.
- Go to SQL Server and Find Management Reporter Database. Usually default name is ManagementReporter.
- Run a new query on it, and type the following:
DELETE REPOSITORY WHERE StatusType <> 0
- Go to Management Reporter Designer and check again Report Queue Status.
Error while calling SSRS Reports in AX 2012
Client found response content type of “, but expected ‘text\xml’. The request failed with an empty response.
The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
Error Screen Shots:
Solution (Based on my experiences):
- Check your Reporting Server, check local drive where your Reporting Server Files are stored. Check if there still available spaces.
- In my case,
- After I cleaned my Local Disk (C:), error is resolved.
Get Exchange Rates in AX 2012
Parameters are CurrencyCode and TransDate.
public ExchRate getExchRateFind(CurrencyCode _currencyCode = ”, TransDate _transDate = systemDateGet())
exchangeRateHelper = ExchangeRateHelper::newExchangeDate(Ledger::current(), _currencyCode, _transDate);
exchangeRate1 = exchangeRateHelper.getExchangeRate1();
exchangeRate = exchangeRateHelper.displayStoredExchangeRate(exchangeRate1);
A user session on the server could not be created. Try to start the client again. If the problem continues, contact the Microsoft Dynamics AX Administrator.
This usually caused by Hard-disk failure due to Not Accessible, Out of Memory Spaces or even corrupted drives.
Microsoft Dynamics AX cannot create a session record in the Databases and you will not be able to open or access Microsoft Dynamics AX Client.
- Check your SQL Server where your Microsoft Dynamics AX Databases was stored.
- Check if local drives where AX Databases stored are accessible and still enough memory spaces. If full try to clean some temporary log files or try to increase your local drive spaces.
Show’s Data(D:) is already full and no enough spaces to create any records.
Try again to open Microsoft Dynamics AX Client.