Re: Better report handling



Maybe this code will make a difference. Just a guess:

clear(array)
dtl:keyfield = master:keyfield
set(keyindex,keyindex)
loop
next(receiptdetails)
if errorcode()
break
end
if dtl:keyfield <> master:keyfield
break
end
case dtl:code
of value1
array[1,1]=dtl:amt
array[1,2]=dtl:code
of value2
array[2,1]=dtl:amt
array[2,2]=dtl:code
.................
end
end



<roysb@xxxxxxxxx> wrote in message
news:1144583171.587465.213890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Here's the algorithm that I use in retrieving the child records.

***
dtl:keyfield = master:keyfield
set(keyindex,keyindex)
next(ReceiptDetails)
loop
if dtl:keyfield <> master:keyfield
break
end
case dtl:code
of value1
array[1,1]=dtl:amt
array[1,2]=dtl:code
of value2
array[2,1]=dtl:amt
array[2,2]=dtl:code
.................
end
next(ReceiptDetails)
if errorcode()
break
end
end
****

I use the array values as USE variables in a single detail band
together with the fields of the Master I have tried creating 2 detail
bands with the master fields on detail1 and.the values on the array as
detail2 but the values on detail2 won't show on the printout.

I have searched the usegroup and there is a post on LOOP THRU CHILD
problem. Is this a problem in C5EE? It seems that I am getting the same
problem.

Thanks.

Roy


Dan Pressnell wrote:
My guess is that there might be something wrong with your record
retrieval
logic, but I can't say for sure without seeing some sample code.


<roysb@xxxxxxxxx> wrote in message
news:1144514037.811663.214890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dan,
I searched the file on IceTips but I can't find it.

Anyway, I need help on printing a report. This is a simple Receipt
printing using C5EE.

I use the data from parent file for the header and the footer of the
report. But the details will come from a child file, the payment
details.

I cannot do a sequential detail printing of the receipt because we are
using a pre-printed form and the payment detail codes are not stored
sequentially but stored according to the index of the code. I have to
print the amount to the specified line.

Thus instead of using the fields for printing, I created local
array-variables which I use for printing.

Before printing, I do a sequential search on the child file which has
more that 1 records, move the data of all the associated record to the
local array-variables.

My problem is that I can only retrieve 1 record from the child file
despite having the set-next-loop on record handling. It also seems
that whenever I run the same printing routine, the next record is the
one retrieved.

Do you have any ideas on why I can't retrieve all the associated child
records?

Thanks.

Roy B. San Buenaventura
Manila, Philippines




.



Relevant Pages

  • Re: Better report handling
    ... Clearing the array and moving the NEXT ... RETRIEVE ALL THE CORRESPONDING DETAIL RECORDS BY ... I need help on printing a report. ... I do a sequential search on the child file which has ...
    (comp.lang.clarion)
  • Re: Better report handling
    ... I need help on printing a report. ... I do a sequential search on the child file which has ... local array-variables. ... Do you have any ideas on why I can't retrieve all the associated child ...
    (comp.lang.clarion)
  • Re: Better report handling
    ... but I've not heard of a loop through child problem. ... RETRIEVE ALL THE CORRESPONDING DETAIL RECORDS BY ... I need help on printing a report. ...
    (comp.lang.clarion)
  • Re: Better report handling
    ... I have searched the usegroup and there is a post on LOOP THRU CHILD ... I need help on printing a report. ... I do a sequential search on the child file which has ... Do you have any ideas on why I can't retrieve all the associated child ...
    (comp.lang.clarion)
  • Re: Better report handling
    ... I need help on printing a report. ... I do a sequential search on the child file which has ... Do you have any ideas on why I can't retrieve all the associated child ...
    (comp.lang.clarion)