I m creating a report for travel management. In this report I have to fetch data from another database apart from database to which my AX_2009 is pointing.
In this report i have filter data using from_date and to_date.
I had able to connect to other database and data is also fetching fine. But i dont know how to fileter using from_date and to_date .
I Have given the SQL server name , database name and one view. Through that view only i had fetch data.
In fecth method i have written the following code
public boolean fetch()
loginProperty = new loginProperty();
odbcConnection = new OdbcConnection(loginProperty);
// sql = ‘Select charged_customer,customer_name,project_name,destination_codes from viewname where viewname.from_date >=’+datetime2str(fromDate);
sql= “Select charged_customer,customer_name,project_name,destination_codes from viewname”;
perm = new SqlStatementExecutePermission(sql);
statement = odbcConnection.createStatement();
resultSet = statement.executeQuery(sql);