Board index » delphi » Multi-level Reports- Record Selection

Multi-level Reports- Record Selection

I am currently writing a database system to control the issue and
maintenance of drawings, production routing and a number of other ancillary
specifications. The system is an expanded version of a simillar database
that I wrote using Paradox 5 a few years ago.

Two of the requirements from the database are:-
1/    To output an 'indented' drawing list i.e. a list of all drawings
required to make a product. This requires the gathering of all drawing
numbers required to create the assembly (level 1), then taking the resultant
list and searching again for the next set of drawing numbers (level 2) and
so on.
2/    To create an 'indented' and costed production route. The selection for
this being similar to the above but with the added complexity of multiplying
times, costs and quantities (and more databases) together.

Can anybody please offer a quick, compact (and preferably easy) method of
achieving the required results using Delphi.

The method I used with Paradox was long winded, slow but relatively easy
using a large number of QBE scripts.

As an adjoiner can anybody suggest a report tool that will handle the
resultant report sensibly. (ReportSmith appears not to offer the level of
control required)

 

Re:Multi-level Reports- Record Selection


In article <6ehhdu$l...@forums.borland.com>, Raymond Gower
<r...@rgower.force9.co.uk> writes

Quote
>I am currently writing a database system to control the issue and
>maintenance of drawings, production routing and a number of other ancillary
>specifications. The system is an expanded version of a simillar database
>that I wrote using Paradox 5 a few years ago.

>Two of the requirements from the database are:-
>1/    To output an 'indented' drawing list i.e. a list of all drawings
>required to make a product. This requires the gathering of all drawing
>numbers required to create the assembly (level 1), then taking the resultant
>list and searching again for the next set of drawing numbers (level 2) and
>so on.
>2/    To create an 'indented' and costed production route. The selection for
>this being similar to the above but with the added complexity of multiplying
>times, costs and quantities (and more databases) together.

>Can anybody please offer a quick, compact (and preferably easy) method of
>achieving the required results using Delphi.

>The method I used with Paradox was long winded, slow but relatively easy
>using a large number of QBE scripts.

>As an adjoiner can anybody suggest a report tool that will handle the
>resultant report sensibly. (ReportSmith appears not to offer the level of
>control required)

Just a couple of thoughts Raymond,
I would populate a tree structure with the appropriate table and primary
key values, then populate a spreadsheet component from that. Part (2)
would just be a slight expansion of part (1) as you'd put the money
values into the spreadsheet at the same time.

The key thing is the initial tree. My current thinking tells me that
there is no more convenient way, but I could be wrong. You could either
create the tree manually (most general Pascal books have chapters on
trees), or use a TOutline component, which is a tree structure. The
advantage of the TOutline is that you can populate it 'vertically' as it
were (i.e. put in all the level 1's first, then find the level 2's for
each, and put them in as you find them).

With the methods and properties available to TOutline, or to general
trees, populating the spreadsheet would be straightforward as you can
access the tree (incl TOutline) 'row-by-row' as it were. Have a look at
the Formula One spreadsheet that comes free with Delphi - I used it last
year and found it very good. It's printing facilities are very good as
well - you might not need a reporting tool.

hope it helps
--
Stephen Kenny

Other Threads