Using DataAbstract TDAMemTable and DASql, how should we do design time building of field list if we are using joins in the statement?
The issue we are running into is the building of reports in ReportBuilder where we use a single query statement with joins for the datapipeline for the report.
We are unable to establish a design time run of the query that we need to use to build the report with.
This was pretty simple in our old ASTA system. We could run the specified sql statement in design time.
How are others doing this? Probably a simple answer but we are stumped.
Has anyone built a custom component of the DAMemTable that sets up a Sql statement input that can be run in design time? We may have to do this ourselves to simplify the overall system builds. This goes along with that we do not like the FillWithDASql call scenario. This could be a property of the table.
That is what we need. Because of the limitations we have encountered with DASql, we had to build a function to the exact sql statement that we need in certain cases. We use this for many instances where DASql syntax does not have the function calls that we need.
Bill Brittain
Is2 Software
function RoDaExecuteSql( xTable:TDAMemDataTable; xSelectStatement : string ) : Boolean;
begin
// We want to use this function for executing sql without going thru the DASQL limitations
xTable.Close;
try
Sysfunction.daRemoteDataAdapter.GetDataCall.ParamByName('aSQLText').AsString := xSelectStatement;
Sysfunction.daRemoteDataAdapter.Fill([xTable], true, true);
except
on E: Exception do ShowMessage('Error executing query: ' + E.Message);
end;
end;