Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Pipe and Fields on the disinger list

edited September 2002 in General
Hi All,

My Problem is :
1. After I load the Report on the designer from my code , I don't see any
Active pipeline of the report on the grid. I have to go to Data Tab which
is blank First time , and come back to design Tab then I see the active
pipeline and but my fields are displaying twice in design tab field list.
and If I go back to Data Tab I have duplicate fields .
What I am doing wrong?

Note: I can preview the Result set its okay.
Here is code :

var
lDataModule: TdaDataModule;
lDataView: TdaDataView;
lDataViewClass: TComponentClass;
FDataView : TdaQueryDataView;
lDataPipeLine : TppDataPipeLine;

begin

lDataModule := TdaDataModule.CreateForReport(FReport);
lDataViewClass := TdaBDEQueryDataView;
FDataView := TdaBDEQueryDataView(CreateDataView(lDataViewClass));
//Creating empty data
FDataView.Init;
{get sql from dataview}
SQLClass := FDataView.SQLClass;
SQL := FDataView.SQL;
SQL.AddNotify(FDataView);
FDataSettings := PreDefinedQueries.ReportDesigner.DataSettings;;
{set SQL properties}
SQL.DatabaseName := FDataSettings.DatabaseName;
SQL.DatabaseType := FDataSettings.DatabaseType;
SQL.CollationType := FDataSettings.CollationType;
SQL.IsCaseSensitive := FDataSettings.IsCaseSensitive;
SQL.SQLType := FDataSettings.SQLType;
FDataSettings.UseDataDictionary := FDataSettings.UseDataDictionary;
FDataSettings.DataDictionary := FDataSettings.DataDictionary;
SQL.DataDictionary := MyApplication.Dictionary.DataDictionary;
MyApplication.Dictionary.OpenDictionary;
BuildAvailableTableList;

function CreateDataView(aDataViewClass: TClass): TdaCustomDataView;
begin
Result :=
TdaCustomDataViewClass(aDataViewClass).Create(lDataModule.Owner);
Result.Name := Result.GetValidName(Result);
Result.Parent := lDataModule;
Result.New := True;
end; {procedure, CreateDataView}

At the last step of the wizard :

{I assign back SQL object back to dataView}
FDataView.SQL := FSQL;
FDataView.SQL.Modified := False;
FDataView.UpdateLinkColors(False);
FSQL.RemoveNotify(FDataView);

It will be great if some one can Help me. Why pipeline is not displaying at
the First time ?, and why those fields are displaying twice ?

Thanks a lot...
-Bhoj

Comments

This discussion has been closed.