Page 1 of 1
procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Sat 12 Sep 2015 09:59
by LHSoft
Hello,
there is an error in proc above in this line (4682):
Code: Select all
if (DataSource <> nil) and (FMasterFields <> '') and (FDetailFields <> '') and not DataSource.DataSet.Active
DataSource.DataSet is nil when opening a table in FR5 with master-detail set.
so now question is: should DataSource.DataSet not be nil or can I modify the condition til your next version so DataSource.DataSet.active will not be queried if DataSource.DataSet is nil?
best regards
Hans
Re: procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Wed 16 Sep 2015 14:02
by azyk
We can't reproduce the described behavior. Please try to compose a small sample to demonstrate the problem and send it to andreyz*devart*com .
Re: procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Thu 17 Sep 2015 03:21
by LHSoft
Hello,
Email is sent,
FastReport support got the error too.
best regards
Hans
Re: procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Thu 17 Sep 2015 07:14
by LHSoft
By the way:
I have interim avoided this error:
Code: Select all
if (DataSource <> nil) and (FMasterFields <> '') and (FDetailFields <> '')
then begin
if DataSource.DataSet <> nil then
if DataSource.DataSet.Active then exit;
MasterPos := 1;
while True do begin
MasterName := ExtractFieldName(FMasterFields, MasterPos);
if MasterName <> '' then begin
Param := Params.FindParam(MasterName);
if Param <> nil then
Param.DataType := ftString;
end
else
break;
end;
end;
Re: procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Fri 18 Sep 2015 11:03
by azyk
Thank you for the provided sample. We have reproduced the described problem and fixed it.
Re: procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Sat 19 Sep 2015 07:54
by LHSoft
Hello,
thanks.
In new version 7.2.8 error still exists.
By the way:
in fs_isdacrtti.pas of your FR5 source code OLEDBAccess (->EMSError) is missing in the uses section.
best regards
Hans
Re: procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Mon 21 Sep 2015 08:57
by azyk
This fix wasn't included in SDAC 7.2.8, it will be included in the next build of SDAC.
Thank you for your note. We have added the OLEDBAccess unit in the uses section of fs_isdacrtti.pas. This modification will be included in the next SDAC build too.
Re: procedure TCustomMSTable.PrepareSQL and FastReport5
Posted: Mon 21 Sep 2015 09:17
by LHSoft
perfettamente
thanks
Hans