Posts

Showing posts from March, 2013

How to handle SSRS reports which will take long time

Image
How to handle SSRS reports which will take long timeWe know that there are/will be some reports which will take more time to render due to the many rows/transactions. This post will help you to show appropriate warning/error messages to the end user while running the report.
The number of records that are processed by report might be large and the user experience will be affected, because the client will be locked up if printing to the screen. 
In this case, you might want to return a warning message to the user that indicates that time to process the report might be long and confirm that they want to run the report. 
Another case could be where the number of records being processed is very large and a time-out might occur in report processing and clearly, we should not run this report. In this case, we should not run the report and therefore, should return anSrsReportPreRunState::Errorenumeration value with the error message. In AX 2012, SSRS reports, throughSrsReportRunControllerwe ca…

Upload an image in a form window control

Upload an image in a form window controlHi Guys,
Here is the code for Upload an image in a form window control in your Axapta world.
Go n Get It......

str filename;
FileNameFilter filter = ['JPG files','*.jpg'];
Bindata binData;
Image signatureImage =new Image();

super();

filename = Winapi::getOpenFileName(element.hWnd(), filter, '', "Upload your image", '', '');

binData = new BinData();

if (binData.loadFile(filename))
{
signatureImage = binData.getData();
FormWindowCOntrol.image(signatureImage);
FormWindowCOntrol.widthValue(signatureImage.width());
FormWindowCOntrol.heightValue(signatureImage.height());
element.resetSize();
element.unLock();
}

-Harry

Enterprise Portal development

Image
Enterprise Portal development (AX 2009)We Will complete this tutorial in four steps as:




Step 1 – the prerequisites
Step 2 – Understanding proxies
Step 3 – Visual Studio
Step 4 – Debugging in Visual Studio Step 1 – the prerequisites:Enterprise Portal must installed on the same server as Your development environment (Visual Studio). If possible, You should also consider to have EP set up on a 32 bit platform – meaning that the OS and Windows Sharepoint Services (WSS) is running in 32 bit mode.
In matters of EP development, running on 64 bit platform is the mother of all evil – examples on this will follow…
Enterpise Portal development tools must be installed. This can be done from the installation medias.
Generally the EP dev tools installs EP project- and control templates. Please note that the EP dev tools should be installed after installing Visual Studio 2008 – if not, the VS templates will most likely not be installed correctly. To ensure that the EP dev tools are successfully installe…

Dynamics AX – Form lookups and how they work

There are few different ways to achieve a lookup field on a form. 1.Create an Extended data type – EDT123



2.Create a table Table123 3.Add EDT123 to the table and the Description EDT field 4.Go back to the EDT and create a relation between table123.EDT123 and the EDT123 5.Automatically when the EDT field is added to another table lets say CustTable a lookup displaying the values from table123 will be displayed in the drop down. 6.Now let’s say you want to add the description field to the lookup as well. Add the description field to the AutoLookup field group on the table. Now the lookup will display EDT123 and the description field from table123.
That is a simple way to create a lookup. Another way to create a lookup is to write a dynamic lookup on the table in which the data is coming from. This method will be a static method and will require the passing of arguments – typically the formstringcontrol that is to be the point of lookup. I prefer this method and use it often.
This a very simpl…

Exporting data to Excel from axapta x++

Exporting data to Excel from axapta x++



Hi All!
Sometimes we need to export data from Microsoft Dynamics AX to Excel using axapta x++ code and we don't know how to do this...
Exists some differents ways to do this, but I think the best way is using the SysExcel class of Dynamics AX and its related.
The only problem I found using this class... is that it can not be used in a batch process.
Sample code:

static void TheaxaptaCreateExcel(Args _args)
{
   SysExcelApplication  xlsApplication;
   SysExcelWorkBooks    xlsWorkBookCollection;
   SysExcelWorkBook     xlsWorkBook;
   SysExcelWorkSheets   xlsWorkSheetCollection;
   SysExcelWorkSheet    xlsWorkSheet;
   SysExcelRange        xlsRange;
   CustTable            custTable;
   int                  row = 1;
   str                  fileName;
   ;
   //Filename
   fileName = "C:\\Test.xlsx";
   //Initialize Excel instance
   xlsApplication           = SysExcelApplication::construct();
   //Open Excel document
   //xlsApplicatio…

How to Connect the Host Hard Drive to a VirtualBox OS

Image
How to Connect the Host Hard Drive to a VirtualBox Guest OSVirtualBox from Oracle is an amazing and free application if you like testing different operating systems without messing up your original operating system or Master Boot Record (MBR). VirtualBox is also useful if you like to test operating systems before their final release. 
However, most people want to connect their host hard disk drives to the guest operating system. For your information, the host OS is the operating system you’re actually using, while the Guest OS refers to the OS virtually installed inside VirtualBox. 

We’ve used Windows 7 as the host operating system and Windows XP as the guest OS. Let’s begin.
Step 1 : Install Guest Additions

First off, you need to start up the operating system you want to connect your hard disk drives to. Choose your OS and click the start button. When the OS is ready, click Devices  

> Install Guest Additions.

.

Clicking this will prompt the Guest Addition setup menu on Windows XP (Gue…

Installing Microsoft SharePoint Foundation

Image
Installing Microsoft SharePoint FoundationNote: Microsoft SharePoint Foundation (MSF) can be only installed on a 64-bit hardware
Recently i installed MSF on my local system , I just sharing my exp about how to install MSF. Installation and configuration of Microsoft SharePoint Server 2010. We will complete this tutorial in four main steps as:
      1.     Hardware and Software requirements
      2.     Pre-requisites
      3.     Installation
      4.     Post Setup Configuration



1.     Hardware and Software requirements

Microsoft SharePoint Foundation (MSF) can be only installed on a 64-bit hardware and Microsoft provides the detailed hardware and software requirements in the following TechNet article.This is the new name for Windows SharePoint Services V4.
http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx#section2

2.     Pre-requisites

In this release Microsoft has included a Prerequisite Installer (Preparation Tool) which will take care of all the pre-requisites which …

Installing Oracle Database 11g Release 2

Image
Step-by-step instructions for installing Oracle Database 11g Release 2Here are step-by-step instructions for installing Oracle Database 11g Release 2 on Windows 7. It’s provided in response to questions posted on my step-by-step instructions for installing Oracle 11gR1 on Windows 7. For reference, I posted the former because it didn't work without intervention. I hadn't updated step-by-step instructions because Oracle Database 11g Release 2 has always worked for me when installing on Windows 7.
A number of students and blog readers have mentioned that it didn't work for them. My guess is that they had configuration issues within the Windows 7 environment. There are some Windows 7 configuration caveats before you perform this installation, and they are:
Windows 7 Configuration Steps
Make sure you have at least 3 GB of memory on your Windows PC, or that you can allocate 4 GB of memory to your virtual machine (the latter typically requires 8 GB of real memory to avoid extensiv…

Document handling via X++

In my previous post  Document handling In Dynamics ax , I post step by step tutorial to use base functionality of document handling. Today i Shared dirty code for document handling via X++ code.
Well Document handling a great feature of Axapta; It really just depends on what your application requires. For instance, one application was based upon the sales order having certain document attached to a sales order based on upon a custom enumeration.  So the button has name like invoice declaration for instance. 
If the button is clicked two menu options appear 
– Add document or 
- View document; 

*If the add document button is clicked
The select file dialog appears and the user selects a file and clicks OK. At this point the file is written to the document handling table with the custom enumeration marked as “Invoice declaration”. 

*If the view document option is selected and there is a file to view, 
The standard documentation form will appear and the document will automatically be launched for…