SDAC 6917 FastReport MasterDetail

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
LHSoft
Posts: 130
Joined: Sat 18 Aug 2012 08:33

SDAC 6917 FastReport MasterDetail

Post by LHSoft » Fri 03 Jan 2014 15:11

Hello,

there seems to be a problem with fastreport components:
in fastreport I have a BDETable containing numbers and a SQLTable with mastersource = BDETable and Number=Number.

This works unless all Datasets of BDETable have a number in number-field.
But if first Dataset of BDETable is Null, the SQLTable (Master-Detail-Relation) seems not working any more when running through BDETable. (empty Datasets in BDETable tell program not to print on a Label on a A4-label-paper): the fields in fastreport filled with SQLTable fields Keep empty, the ones from BDETable are filled.

no problem with Version SDAC6816 at all.

The mysteric Thing is, that if printing from fastreports report-designer it works under 6917 too, but not if printing from program.

So my question is: do you have changed anything I have to consider here or is this a bug?

Best regards
Hans

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: SDAC 6917 FastReport MasterDetail

Post by Dimon » Thu 09 Jan 2014 13:09

Please specify: do you use BDE components or SDAC?

LHSoft
Posts: 130
Joined: Sat 18 Aug 2012 08:33

Re: SDAC 6917 FastReport MasterDetail

Post by LHSoft » Thu 09 Jan 2014 22:05

I use both. The Mastertable is a BDE Table, the Detail a SQLTable.

This was running well last years.
So the Problem is now, that if the Master Table runs over a dataset with empty master-detail-datafield (Null-Value), the SQLTable seems to break the Master-Detail Relations and would not work any more, even if the next Masterdataset has an Value in the Master-Detail-Datafield.

This is problematic cause if a table has some behavior for years there are many Points in programs where this behavior has been used and so much work might be to do and many Clients might be angry.

For example:

the BDETable contains 2 fields, one numeric with a clientnumber Integer and a Clientname, String(40). The SQLTable holds the whole Client-Dataset as Adress, email Bank ...
There is a Master-Detail in Fastreport with BDE=Master and SQL=Detail with bde.clientnumber=SQL.clientnumber.

So, we move through the BDE_Table with clientnumbers being collected before (this Clients get shipping) in Order to print the Adress on A4-past-on-labels. One A4 paper normally holds 10 of These Labels but from last printing, firs 3 are already done. So we insert 3 Null-Datasets in BDE-Master and printing starts on 4th Label. In first 3 datasets bde.clientnumber is Null so Detail SQL=EOF. But on 4th there is a number in bde.clientnumber and til last Version SQL founds the right Detaildataset.

In actual SDAC the SQL-Detail will never return.

Best regards
Hans

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SDAC 6917 FastReport MasterDetail

Post by AlexP » Sat 11 Jan 2014 09:59

Hello,

Please send a project demonstrating the problem and the script for creating the tables to alexp*devart*com

DerPaul
Posts: 17
Joined: Thu 25 Jan 2007 02:35

Re: SDAC 6917 FastReport MasterDetail

Post by DerPaul » Fri 17 Jan 2014 21:16

Hi
This actually looks a lot like a general problem I have met with Master/Detail relationships.
Have you tried it without using FlashFiler?
Just two DbGrids and two MsQuery's + DataSets.

I have no solution, but if flashfiler has nothing to with it, it should be easier to find the error.

Best regards
Poul

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SDAC 6917 FastReport MasterDetail

Post by AlexP » Tue 21 Jan 2014 10:18

We cannot reproduce the problem when using these components and the Dept and Emp tables (the scripts are provided in the demo), please send a sample reproducing the problem and the scripts to alexp*devart*com

Post Reply