I finally had success in getting this report to work.
My main report was always OK. But I needed to insert a comment into the main report, only if the comment field contained something.
So I inserted a new SR, with database fields containing the cheque comments, and invoice details. In the details portion, I inserted the invoice number and the comments, as well as the vendor and date of the cheque.
I linked on ?Vendor Name from main report, and selected data in the SR based on the
{ap_cheque_comments.apchc_comments}
I placed the SR in the report footer of the MR.
Then I added 2 parameters in the SR that duplicated the ones in the MR.
So my selection formula in the MR is:
{ap_invoices_details.apid_supplier_id} = {?Vendor Number} and
{ap_invoices_details.apid_ref_num} = {?Cheque number}and {ap_invoices_details.apid_trans_date}={?Cheque date}
and in the SR:
{ap_invoices_details.apid_trans_date}={?Cheque date} and
{ap_invoices_details.apid_supplier_id}={?Vendor Number}
Now, the user has to enter some of the data twice in the initial Enter Values screen, (the date and vendor), but the report returns exactly the information that I need. In retrospect, it all seems simple, but I've danced around this thing for months, with excellent suggestions from Ian and others at other sites.
So the key was having duplicate parameters in the SR.
thanks to all!
Norm
My main report was always OK. But I needed to insert a comment into the main report, only if the comment field contained something.
So I inserted a new SR, with database fields containing the cheque comments, and invoice details. In the details portion, I inserted the invoice number and the comments, as well as the vendor and date of the cheque.
I linked on ?Vendor Name from main report, and selected data in the SR based on the
{ap_cheque_comments.apchc_comments}
I placed the SR in the report footer of the MR.
Then I added 2 parameters in the SR that duplicated the ones in the MR.
So my selection formula in the MR is:
{ap_invoices_details.apid_supplier_id} = {?Vendor Number} and
{ap_invoices_details.apid_ref_num} = {?Cheque number}and {ap_invoices_details.apid_trans_date}={?Cheque date}
and in the SR:
{ap_invoices_details.apid_trans_date}={?Cheque date} and
{ap_invoices_details.apid_supplier_id}={?Vendor Number}
Now, the user has to enter some of the data twice in the initial Enter Values screen, (the date and vendor), but the report returns exactly the information that I need. In retrospect, it all seems simple, but I've danced around this thing for months, with excellent suggestions from Ian and others at other sites.
So the key was having duplicate parameters in the SR.
thanks to all!
Norm