Thursday, 5 November 2015
Thursday, 8 January 2015
DEVELOPING SSRS REPORT WITH CHART USING RDP CLASS
DEVELOPING
SSRS REPORT WITH CHART USING RDP CLASS
Requirement
is getting Count of Records in SalesTable based on SalesStatus.
Step
1:
Create
temporary table(ChartTemp) in AOT.Create new Integer field as Count.
Step 2:
Create
a RDP class and make coding..
ClassDeclaration:
class
ChartClassDP extends
SRSReportDataProviderBase
{
ChartTemp
chartTempp;
}
New
method:
[SRSReportDataSetAttribute(tablestr('ChartTemp'))]
public
ChartTemp getChartTemp()
{
select
chartTempp;
return
chartTempp;
}
Override
method:
public
void
processReport()
{
SalesTable
salesTable;
;
while
select
count(RecId)
from
salesTable
group
by
SalesStatus
{
chartTempp.SalesStatus=salesTable.SalesStatus;
chartTempp.Count=salesTable.RecId;
chartTempp.insert();
}
}
Step 3:
In
visual studio create new project and add dataset.
Step 4:
In
Design node select precision design and inside the designing window
insert-->chart.
Step 5:
Right
click on the chart,chart--> chart properties-->set Dataset name
as our Dataset Name.
Step 6:
Assign
values for X,Y axis. Here we Assign SalesStatus for X-axis and Count
for Y-axis.
Thursday, 18 September 2014
Find mandatory Fied in Table
Find Mandatory Field In Table
In Microsoft Dynamics Ax 2012 many table are having mandatory field. Here I would like to share how to find mandatory field in a Table.
For Example CustTable.
The below code uses DictTable and DictField classes to iterate through the table fields and it's properties.
Using these classes you can also check other properties of the fields in a table.
Step 1:-
Go to job, Create a New job, paste following code in the job and Run the job.
Step 2:-
static void mandatory(Args _args)
{
DictTable dictTable; //SysClass
DictField dictField; //SysClass
int i, cust;
dictTable = new DictTable(tableNum(CustTable));
cust= dictTable.fieldCnt(); // fieldCnt- Returns the number of fields for a table//
for (i= 1; i<=cust;i++)
{
dictField = new DictField(tableNum(CustTable),dictTable.fieldCnt2Id(i));
//fieldCnt2Id-Returns the field ID of the field that is specified by an index//
if (dictField.mandatory())
{
info (strFmt("Field %1 is mandatory.",dictField.label())); //Returns the label for the field//
}
}
}
Step 3:-
You can see the list of mandatory field in Infolog.
Monday, 15 September 2014
HOW TO OPEN WEB PAGE FROM AX 2012
Step 1:-
Create a From OpenWebPage.
Step 2 :-
Under the design node select ActiveX control.
Step3:-
Once we select ActiveX Control a dialog prompts, select "Microsoft web browser" option.
Step 4:-
After place the following code in form level init method.
Create a From OpenWebPage.
Step 2 :-
Under the design node select ActiveX control.
Step3:-
Once we select ActiveX Control a dialog prompts, select "Microsoft web browser" option.
Step 4:-
After place the following code in form level init method.
public void init()
{
super();
ActiveX.Navigate(www.bing.com);
}
Step 5:-
You can see Bing Web Page Opening in AX 2012.
Thursday, 14 August 2014
Simple Steps to Generate Number Sequence In Table Level
Step 1:-
Create an EDT SerialNo.
Step 2:-
Select the module which you want to generate number sequence.
Step 3:-
write the following code load module() on NumberSequenceModuleCustomer.
datatype.parmDatatypeId(extendedTypeNum(SerialNo));
datatype.parmWizardIsContinuous(true);
datatype.parmWizardIsManual(NoYes::No);
datatype.parmWizardIsChangeDownAllowed(NoYes::No);
datatype.parmWizardIsChangeUpAllowed(NoYes::No);
datatype.parmWizardHighest(999999);
datatype.parmSortField(27);
datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
this.create(datatype);
this.mcrLoadModules(datatype);
Step 4:-
Write the following code on a New method on CustParameterTable.
client server static NumberSequenceReference numRefSerialNo()
{
return NumberSeqReference::findReference(extendedTypeNum(SerialNo));
}
Step 5:-
Write the following code on a Job and Run it.
static void serialNo(Args _args)
{
NumberSeqModuleCustomer NumberSeqModuleCustomer = new NumberSeqModuleCustomer();
;
NumberSeqModuleCustomer.load();
}
Step 6:-
Organization Administration >> CommonForms >> Numbersequences>>Numbersequences>> Generate >> run the wizard.
Fill the require Details and Click Generate.
Step 7:-
AccountsReceivable ----> Setup ----> AccountsReceivableParameters ----> NumberSequence
Step 8:-
Create Table Add the EDT and write following code in initValue() Method.
public void initValue()
{
NumberSeq numberSeq;
SerialNo num;
super();
numberSeq = NumberSeq::newGetNum(CustParameters::numRefSerialNo());
num = numberSeq.num();
this.SerialNo=num;
}
Step 9:-
Select Cntrl+N Number Sequences is Generated.
USING CHECK BOX ENABLE / DISABLE RECORDS WITH THE GRID
Step 1:-
Create a table and Add some fields.
Step 2:-
Add table as a data sources, Create a form.
Step 3:-
Create a grid under design tab and add fields to the grid.
Step 4:-
Add a check box to the form.
Step 5:-
Write the following code in modified method.
public Boolean modified()
{
boolean ret;
ret = super();
if(checkbox.value()==true)
{
while select CheckBoxTable
{
CheckBoxTable_ds.object(fieldnum(CheckBoxTable,Name)).visible(true);
CheckBoxTable_ds.object(fieldnum(CheckBoxTable,RegNo)).visible(true);
CheckBoxTable_ds.object(fieldnum(CheckBoxTable,Testbox)).visible(true);
}
}
else
{
while select RecId from CheckBoxTable where CheckBoxTable.TestBox == true
{
CheckBoxTable_ds.object(fieldnum(CheckBoxTable,RegNo)).visible(false);
CheckBoxTable_ds.object(fieldnum(CheckBoxTable,Testbox)).visible(false);
CheckBoxTable_ds.object(fieldnum(CheckBoxTable,Name)).visible(false);
}
}
CheckBoxTable_ds.refresh();
return ret;
}
Step 6:-
Select the check box it will enables the grid.
OUTPUT:-
Un select the check box it disables the grid.

Tuesday, 12 August 2014
USING COMMAND BUTTON,NEW,DELETE & SAVE THE RECORDS WITHOUT CODING
create a table add some fields.
Step 2:-
Add the newly created table as a data sources to form.

Step 3:-
Drag and drop fields in design & Add new buttons.
Step 4:-
Assign button level properties ----> command select the command "Save".
Step 5:-
As same the above followed by add New & Delete select the perfect command to perform required action.
Output:-
Subscribe to:
Posts (Atom)











