Tables updated during printing
Massimiliano Luppis
Greetings,I have an add-on written in C# / coresuite framework that uses several UDF tables.
For this add-on I wish to build reports with designer, but for a particular report I have a problem.
One of the data source is an UDF table that could be not updated in real time because it contains aggregated sum from other tables; so when I display it in a form I call a function that recalculate sums before displaying them.
With the designer I should call the same function while report is printing, I can do that calling an external DLL, but the problem is that this function update the table during printing, so the table is not up-to-date when the Queries are executed, at the very beginning of the report.
I need something like an invisible first pass that do nothing but call the DLL updater and then re-execute the queries to fetch data: it is possible to realize something like that ?
Many thanks in advance
Max
Philipp Knecht
Hi MassimilianoI'm pretty sure we can solve this somehow.
It's best when we can do that by remote and open up a serviceall.
Just contact our support by phone they will give you further instructions.
hth
Massimiliano Luppis
Hi Philipp,before open a servicecall I had another idea, tell me what you think about it:
if I create a SQL query that recalculates aggregates sum, maybe I cuold insert it as Query #1; then I use a normal SELECT as Query #2 (not linked, one on the first row and one on the second row).
In this case the first query update the table and the second query fetches updated rows.
The only problem I can see is what happens if the two queries were executed in parallel, i.e. if the second query start before the first query is completed.
Philipp Knecht
Hi MassimilianoYou don't need to Uset Query #2 for that. Because Query and Query 2 should only be used when relating tables to each other.
But if you add the Queries in the right sequence (add another line) it should work.
We have a hidden feature which can use data readen out of the form directly. It's for now a hidden function and will be officially released next year. But let me know if this is an solution.
hth
Massimiliano Luppis
Yes this is exactly what I mean: two separate rows, one row for the first query (the updater) and one row for the second query (the fetcher). In previous post I bad explain this, sorry.Your hidden feature is very interesting, until next release I will try the two-queries solution.
Thanks for your support.
Max
0
Please sign in to leave a comment.
Comments
0 comments