I have a form that has a subform. I have added a print button to the main form and I want to be able to copy whatever filters that have been set in the subform to the print button so they can be passed to the report.
Is this possible as I can't seem to make it work.
I know I can create the filters manually and pass them to te report, but the problem with this is that I don't know which filters the user will apply so I need to just copy whatever they put on the form to the report.
Many thanks
Matthew 8)
0
Answers
Look at the functions on the Line button on a "Sales Order", these call functions on the sales line subform and table, like this
CurrForm.SalesLines.FORM.OpenItemTrackingLines;
David
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
I have a form that is based on the Production Order Header and the subfrom is on the production order lines. I want to be able to copy what ever filters have been set on the lines to a report(which is only prod orderlines) that has had a print button added to the Main form.
Any help will be really apreciated as this is driving me around the bend!!!
I know I should be able to do it, but can't get there!!!
Thanks,
Matthew [-o< ](*,)
On the subform I created a function with a local varibale of ProdOrdLine that points to the production order Line Table
ReportFilter()
ProdOrderLine.RESET;
ProdOrderLine.COPY(Rec);
REPORT.RUNMODAL(67108,TRUE,FALSE, ProdOrderLine);
Then on the Parentform I call this function under the print button
CurrForm.ProdOrderLine.FORM.PrintReport;
and bobs your uncle!!!
Thanks for the initial direction it eventually got my brain working again \:D/ \:D/