I am trying to create a class coding in AOT in my Microsoft Dynamics AX. What I am doing is to develop a SSRS report in Microsoft DynamicsAX 2012. Hence, for practice purposes I am actually following through this tutorial link: http://www.dynamics101.com/2013/09/developing-ssrs-report-using-report-data-provider-microsoft-dynamics-ax-2012/. Please Help. THank you
However, I am getting a syntax error that says:
Syntax error
\Classes\CustReportRDPDemoDP\classDeclaration
classDeclaration
Err:9999
The error occurs at this code line:
[SRSReportDataSetAttribute(tablestr('CustReportRDPDemoTmp'))]
My following code is as follows:
class CustReportRDPDemoDP extends SRSReportDataProviderBase
{
//Temproaray table buffer
CustReportRDPDemoTmp custReportRDPDemoTmp;
[SRSReportDataSetAttribute(tablestr('CustReportRDPDemoTmp'))]
public CustReportRDPDemoTmp getCustReportRDPDemoTmp()
{
select * from custReportRDPDemoTmp;
//return the buffer
return custReportRDPDemoTmp;
}
///<summary>
/// Processes the SQL Server Reporting Services report business logic
/// </summary>
/// <remarks>
/// This method provides the ability to write the report business logic. This method will be called by
/// SSRS at runtime. The method should compute data and populate the data tables that will be returned
/// to SSRS.
/// </remarks>
public void processReport(){
CustTable custTable;
SalesTable salesTable;
//select all customers
while select * from custTable
{
//clear the temporary table
custReportRDPDemoTmp.clear();
//assign customer account and name
custReportRDPDemoTmp.CustAccount = custTable.AccountNum;
custReportRDPDemoTmp.Name = custTable.name();
//select count of invoiced sales order of customer
select count(RecId) from salesTable
where salesTable.CustAccount == custTable.AccountNum
&& salesTable.SalesStatus == SalesStatus::Invoiced;
custReportRDPDemoTmp.SalesOrderInvoiceCount = int642int(salesTable.RecId);
//insert in temporary table buffer
custReportRDPDemoTmp.insert();
}
}
}