Quick & While Retrieving
Darren Reely
darren.reely at latticesemi.com
Fri Jul 1 13:02:54 CDT 2005
Matthew,
If your using a relational database then you can get it to work for you
via the use of a cursor. Here is a sample converted from something I
recently wrote.
file my_primary in mfg primary
sql in mfg declare my_summary cursor for &
select sum(d1.qty) AS my_sum_qty &
from detail d1 &
where d1.key1 = :my_primary.col1 &
and d1.key2 = :my_primary.coln &
and d1.other = 'whatever'
cursor my_summary designer open read
procedure internal display_detail_summary
begin
SQL OPEN my_summary cursor ;;OPEN closed previos open.
SQL FETCH my_summary cursor OPTIONAL
if ACCESSOK and NOT my_sum_qty of my_summary IS NULL
then let t_the_summary = my_sum_qty of my_summary cursor
else let t_the_summary = 0
display t_the_summary
end
procedure postfind
do internal display_detail_summary ;;maybe in postupdate too.
Darren
Matthew Cox wrote:
> I'm new to Powerhouse and have a question regarding While Retieving in
> Quick. I have a screen that has a master record in the top half of the
> layout and a detail section being done with a cluster command on the bottom
> half. My problem is the cluster section displays 12 lines of information and
> a total field below the cluster. The total line is not adding in any detail
> records if the number of detail records is more than 12. Can I use While
> Retrieving to total the cost together for all the detail records being
> selected by the master record? Where do I put the While Retrieving loop? Any
> help is greatly appreciated
>
> Matt "the Powerhouse Noob" Cox
More information about the powerh-l
mailing list