Welcome! Log In Create A New Profile

Advanced

Click on Report to open Form

Posted by Denis Vaughan.pcs.crosspost 
Denis Vaughan.pcs.crosspost
Click on Report to open Form
August 22, 2008 04:17PM
Hi,

I have a report created based on a query. The report shows a certain subset of records from a particular data table. Under the click function for one of the report controls I have code to open a form which contains a table control for all records in the data table that the report query is based on. That works fine.

What I want to do is open that form but in the table, only have records that match the value of the report control I have clicked.

So if a row in the report contains a document number, that it opens the form displaying all records in the table that has that same value.

Obviously the query in the report will differ in criteria from the query when the form opens.

Thanks

DV

Message forwarded from pcsoft.us.windev
Al
Re: Click on Report to open Form
August 23, 2008 05:15AM
Hello Dennis

The report form supports invisible fields, either in the form itself or off to the right.
This means that you can extract data from the current body line that is not being physically displayed and pass it as a parameter to your click function which can then do a query or view and fill the table in your other form.

Regards
Al
Denis Vaughan.pcs.crosspost
Re: Click on Report to open Form
August 26, 2008 03:46PM
Hi,

I now have this where, when you click on a row, it opens the form with the table control limited to a value. However the value I am passing the form is being used to filter the table based on the primery key. Can I change the filter (table..filter ?) of the form so that it points to a different field in the table. At the moment it returns one row (value passed to it happens to also be a value in the primary field). If I can change the table's filiter to look at a different fiedl it would return several rows. The other field is indexed but allows duplicates.

Code from report = Open(Win_Matched,MySource.ID_QW)
The value of MySource.ID_QW could be 3 and there might be 5 rows that match. However when the table is displayed it matched this value to it's primary key field instead returning 1 row (or possibly none if there is no match)

Can you help

DV

Message forwarded from pcsoft.us.windev
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: