Hi
I am new to ax2012 and learning the RDP Class . I have doubt in the below line which I have extracted from RDP Class definition .
I have taken this from the process Report method
If you could clarify this will be of great help to me
if(accountNum) (Since this is an EDT of type string and not Boolean type
Return how does this work will it not give error )
accountNum is of string type and wont the system throw error something like
cannot implicitly convert type string to bool ? it should be something like
if (accountNum = “ “) some comparison like .
Thanks & Regards,
Pramod
Below is the program section
[SysEntryPointAttribute(false)]
public void processReport()
{
QueryRun queryRun;
Query query;
CustTable custTable;
SRSRDPCustTableContractClass srsRDPCustTableContractClass;
AccountNum accountNum;
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
query = this.parmQuery();
srsRDPCustTableContractClass = this.parmDataContract() as SRSRDPCustTableContractClass;
accountNum = srsRDPCustTableContractClass.parmAccountNum();
// Add parameters to the query.
queryBuildDataSource = query.dataSourceTable(tablenum(CustTable));
if(accountNum)
{
queryBuildRange = queryBuildDataSource.findRange(fieldnum(CustTable, AccountNum));
if (!queryBuildRange)
{
queryBuildRange = queryBuildDataSource.addRange(fieldnum(CustTable, AccountNum));
}
// If an account number has not been set, then use the parameter value to set it.