Welcome! Log In Create A New Profile

Advanced

Form report type with embedded query

Posted by Gus 
Gus
Form report type with embedded query
April 12, 2009 05:35AM
Hi:
I created a Report (Form type report) which is called from a Form. The idea is to have this report displaying the current record edited in the form (and not all records in the file). The report has an embedded query with a selection condition where the FieldID equals to Param1.
I use a PROCEDURE RPT_Report1(Param1) in the Open of the report, so I can get the passed parameter.
From the Form, I'm using
iPreview(i100)
iPrintReport(RPT_Report1,File.FieldID)
so I'm passing the record number in order to filter the query by that record ID.
However, the Report prints all records (and not only the record edited in the form).
I use a Static field in the report which is initialized with the Param1, so I can verify that the right parameter is passed to the report when it's called. However, it seems like this parameter is not correctly passed to the embedded Query, which should filter the rest of the records..
Any idea?

Thank;
Gus
Piet van Zanten
Re: Form report type with embedded query
April 12, 2009 10:23PM
Hi Gus,

I think you should use iInitReportquery instead of the report parameter.

Regards,
Piet
Gus
Re: Form report type with embedded query
April 13, 2009 03:43AM
Hello Piet:

Yes...You are right!

Thanks;
Gus
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: