I'm using FastReport4 in DelphiXE4. I set Connection String at RunTime Like this:

ADOConnection.ConnectionString := ConStr;
ADOConnection.Connected := True;
AdoQuery1.Connection := ADOConnection;

So I cannot see preview in FastReport Designer! I have a query like this:

AdoQuery.Sql.Text :='SELECT Table1.title,Table2.title FROM Table1 INNER JOIN Table2 ON (Table1.code=Table2.id);';

I have a problem with Field name in FastReport Designer. I tested [frxDBDataset1."Table1.title"], but Field Not Found ! Then I changed Query Like This:

AdoQuery.Sql.Text :='SELECT Table1.title as f1,Table2.title as f2 FROM Table1 INNER JOIN Table2 ON (Table1.code=Table2.id);';

and in FastReport Designer:

[frxDBDataset1."f1"]

But same error occurred!

有帮助吗?

解决方案

Solution:

Select frxDBDataset and clear all FieldAliasis then use this:

AdoQuery.Sql.Text :='SELECT Table1.title as f1,Table2.title as f2 FROM Table1 INNER JOIN Table2 ON (Table1.code=Table2.id);';

And:

[frxDBDataset1."f1"]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top