Pass Through Functions
Hi !
We have main app. that creates and manages end user reports at run time.
All of the reports contain pass-through funcs. that refer to app's main form
queries and return values such as client id, name, check date etc. to
reports.
e.g. lsResult := frmMainForm.QueryNameFIELD_NAME.AsString. Reports
are being saved as blobs in DB.
At the same time we have service app that auto prints those reports. Service
app has differrent form naming. All of the reports but one appears to have
correct data. One report that doesn't work has a pass-through function that
creates and runs query, it errors out with
'Cannot compile program ReportBeforePrint' message, event that contains that
func.
My question is, how service can know about main apps forms and queries, why
does
it work ? And why the one with run-time created query doesn't ?
Thank you,
Vadim K.
We have main app. that creates and manages end user reports at run time.
All of the reports contain pass-through funcs. that refer to app's main form
queries and return values such as client id, name, check date etc. to
reports.
e.g. lsResult := frmMainForm.QueryNameFIELD_NAME.AsString. Reports
are being saved as blobs in DB.
At the same time we have service app that auto prints those reports. Service
app has differrent form naming. All of the reports but one appears to have
correct data. One report that doesn't work has a pass-through function that
creates and runs query, it errors out with
'Cannot compile program ReportBeforePrint' message, event that contains that
func.
My question is, how service can know about main apps forms and queries, why
does
it work ? And why the one with run-time created query doesn't ?
Thank you,
Vadim K.
This discussion has been closed.
Comments
at runtime in that method that creates the query? What is the result of the
query? Perhaps it is returning nil to the RAP code which is not expecting to
get a nil object?
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
The problem is that another application (service for this instance)
can not compile report that has func. referring to query on main app.
What are we doing wrong ?
Thanks,
Vadim K.
in delphi code. It is part of the main exe. The service app will also need
to have the RAP pass through function compiled into it. Perhaps you can use
a single package to contain the pass through functions for use by both
applications so that you don't have duplicate code in both apps.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
The problem is that another applicaton (service in this instanse)
can not compile report that has func. referring to query on main app.
Why does it work in some cases and doesn't in another ?
What are we doing wrong ?
Thanks, Vadim K.