Reporting Data from Relationship File

I have the following date structures:

INVOICE HEADER.DOC_NO relationship to INVOICE LINE.DOC_NO
.CUSTOMER relationship to CUSTOMER.CUST_CODE
INVOICE LINE.STOCK_CODE relationship to STOCK.CODE

I needs to print range of invoice no. by specify FROM Doc_No To Doc_No
in a report.

I create a report form with table name INVOICE LINE and defined a relationship from INVOICE LINE to INVOICE HEADER in order to get the
INVOICE HEADER.CUSTOMER .

FORM:-

INVOICE NO.: invoice header.doc_no
Customer : invoice header.customer
Customer name: invoiceh header_to_customer.customer_name

How can I print the customer name based on INVOICE HEADER_TO_CUSTOMER.NAME when my form is based on INVOICE LINE?

I try to set a global relationship INVOICE LINE TO CUSTOMER but it always printed the first INVOICE HEADER customer name for all the invoice printed.

Thanks in advance.

Kelvin

I think there are several possibilities:

  1. create invoice based on top level invoice data with portal containing line items;
  2. do it the way you do now with a relationship from the lineitem to the top level data. Not a global in this case.
  3. do it the way you do now but step through your invoices and print invoice per invoice and change the global per step.

I think, if I understand what you do correct, your issue is that you try to print a foundset of invoices. In that case your global header data will remain the same for all…

Hope this helps a little

Thanks Marcel for your help/advice.

IT2BE:
I think there are several possibilities:

  1. create invoice based on top level invoice data with portal containing line items;

If I use portal containing line items, I wiil face with the probelm of
printng STOCK.DESC which is linked from InvoiceLine_To_Stock.Desc
and the second problem is the control of page break & page counter
which the form report is already provided for - Trailing Summary &
Footer.

  1. do it the way you do now with a relationship from the lineitem to the top level data. Not a global in this case.

This method will create a lot of redanduncy data as the line items will
have to store the customer code & other related fields too. Another
problem is we have to update all the line items customer field if some
how the user change the customer code in Invoice Header field.

  1. do it the way you do now but step through your invoices and print invoice per invoice and change the global per step.

With this method we can control all the fields we want to print but
more coding needs to be done. We also have to find way to control
page break , page counter, footer etc.

I hope SERVOY team can find ways to improve the above features
to allows developer to access data from deep down relationship
(A–>B–>C.datafield) This will help speed up all the reporting job
and provide better reporting features.

I think, if I understand what you do correct, your issue is that you try to print a foundset of invoices. In that case your global header data will remain the same for all…

Yes, this is what I intend to print - by passing the foundset to the report form except I cannot access data from third relationship table.

Thans again for your help.

Kelvin