2013-12-23 2 views
0

DelphiXE4에서 FastReport4를 사용하고 있습니다. 는이 같은 런타임에 연결 문자열을 설정delphixe4의 FastReport4 필드 이름

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

그래서 내가 FastReport 디자이너에서 미리보기를 볼 수 없습니다! 나는이 같은 쿼리가 :

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

내가 FastReport 디자이너에서 필드 이름에 문제가 있습니다. [frxDBDataset1, "Table1.title"]을 테스트했지만 필드를 찾을 수 없습니다!

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

및 FastReport 디자이너 : 그 다음이 같은 쿼리를 변경

[frxDBDataset1."f1"]

그러나 같은 오류가 발생했습니다!

답변

0

솔루션 :

선택 frxDBDataset 및 취소는 모든 FieldAliasis 다음이를 사용

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

그리고 :

[frxDBDataset1."f1"]