Langsung ke konten utama

Postingan

Breakpoint in Info.add()

This trick is probably the first every X++ developer learns, so it deserves to be the first on the  list of X++ Debugging Tips and Tricks . Suppose an X++ exception occurs and you want to know why. The error is written to the Infolog. Double-clicking the line in the Infolog window will bring you to the line that threw the exception. Sometimes it is trivial to see the cause just by looking at the code. Other times it is not, and you will need the entire context including the call stack and variables to figure out what the cause is. Set a breakpoint in the  add  method on the  Info  class – and rerun the scenario. When the exception is thrown your breakpoint is hit, and you can perform the autopsy.

To Read and Write From Serial Port C#

using System ; using System . IO . Ports ; using System . Windows . Forms ; namespace SerialPortExample { class SerialPortProgram { // Create the serial port with basic settings private SerialPort port = new SerialPort ( "COM1" , 9600 , Parity . None , 8 , StopBits . One ); [ STAThread ] static void Main ( string [] args ) { // Instatiate this class new SerialPortProgram (); } private SerialPortProgram () { Console . WriteLine ( "Incoming Data:" ); // Attach a method to be called when there // is data waiting in the port's buffer port . DataReceived += new SerialDataReceivedEventHandler ( port_DataReceived ); // Begin communications port . Open (); // Enter an application loop to keep this thread alive Application . Run (); } private void port_DataReceived ( object sender , SerialDataR...

String to hexadecimal and back C#

This is code to convert String to Hex and Back using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace hexTester {     public class Program     {         public static void Main(string[] args)         {             string a = "testing";             Console.WriteLine(a);             string hex = ConvertStringToHex(a);             Console.WriteLine(hex);             Console.WriteLine(ConvertHexToString(hex));         }                 public static string ConvertStringToHex(string asciiString)         {             string hex = "";             foreach (char c in as...

AX 2012 Call API

Below code helps you to call the Restful API using basic authentication method of adding Authorization header using HTTP Post method. static void ConsumingRestService(Args _args) { str destinationUrl = 'Json Url here', requestXml, responseXml; System.Net.HttpWebRequest request; System.Net.HttpWebResponse response; CLRObject clrObj; System.Byte[] bytes; System.Text.Encoding utf8; System.IO.Stream requestStream, responseStream; System.IO.StreamReader streamReader; System.Exception ex; System.Net.WebHeaderCollection httpHeader; str byteStr; System.Byte[] byteArray; System.IO.Stream stream; System.IO.Stream dataStream; byteStr = strfmt('%1:%2', "USERNAME", "PASSWORD"); requestXml = " { \"storeId\": 25001, \"terminalId\":\"012\", \"transactionSeque...

Query with aggregate function

Query in SQL = Select  AccountNum, sum(AmountCur), sum(AmountMST) from CustTrans group by AccountNum where CustTrans.AccountNum == 'US-018' ;

SQL JOIN

SQL JOIN

FATAL EXCEPTION PERFORMING AXRDCE TRANSFORMATION STEP. THE REPORT CANNOT BE RENDERED. PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR.

FATAL EXCEPTION PERFORMING AXRDCE TRANSFORMATION STEP. THE REPORT CANNOT BE RENDERED. PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR. Today I came with new issue in AX Report. Few days back my report was working fine. But today it showed me something weird information while opening the report. Fatal exception performing AXRDCE transformation step. The report cannot be rendered. Please contact your system administrator. I was just googled, there is no luck. Finally I figured out the issue. First this SSRS report was developed with Query Dataset type. Few days before I just deleted one field from my table. but I checked in (Visual Studio) SSRS–> MyReport –> dataset –>fields  still my deleted field is exist in this report dataset. This is the only reason i got this error. I have tried to delete the unavailable field, but there is no option to delete the field from Report dataset. Here is the solution if you have same scenario.  Export the ...