Passthru functions are called multiple times
Hi DM,
I am in the process to dynamicly create an output filename.
See thread digital-metaphors.public.reportbuilder.general, 'Set TextFileName
with dynamic report data', dated 01/22/2011 for more information.
I created some passthru functions to get the data from the database as
needed.
The folling RAP code is using these new functions:
QueryID := QueryOpen(SQL);
if not QueryEof(QueryID)
then begin
Inkoopnr := VarToStr(QueryFieldByName(QueryID,'inkoopnr'));
Filename := Filename + ' - inkoopnr ' + Inkoopnr;
end;
QueryFree(QueryID);
All functions are RAP passthru functions.
The funny thing is that QueryFieldByName() is called twice while I would
expect it to be called only once.
Using RB11.08
Regards,
Jeroen R?ttink
I am in the process to dynamicly create an output filename.
See thread digital-metaphors.public.reportbuilder.general, 'Set TextFileName
with dynamic report data', dated 01/22/2011 for more information.
I created some passthru functions to get the data from the database as
needed.
The folling RAP code is using these new functions:
QueryID := QueryOpen(SQL);
if not QueryEof(QueryID)
then begin
Inkoopnr := VarToStr(QueryFieldByName(QueryID,'inkoopnr'));
Filename := Filename + ' - inkoopnr ' + Inkoopnr;
end;
QueryFree(QueryID);
All functions are RAP passthru functions.
The funny thing is that QueryFieldByName() is called twice while I would
expect it to be called only once.
Using RB11.08
Regards,
Jeroen R?ttink
This discussion has been closed.
Comments
Which event did you end up using to make changes to the TextFileName (i.e.
which RAP event is firing twice?).
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I am sorry. The RAP event is not fired twice, but only the
QueryFieldByName() passthru function in the below code-snippet. So I don't
think it's related to the RAP event which is OnFileDeviceCreate() by the
way.
Regards,
Jeroen.
Any news?
Regards,
Jeroen.
I'm sorry about the late reply, I lost track of this thread.
I'm a bit unclear about what exactly is happening. If I create a passthru
function and call it once from RAP, it is only executed once during report
generation. Are you saying that somehow the passthru function is being
called twice without being called twice in RAP? Are you able to recreate
this with any passthru function?
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Yes, that's what I am saying. I'll see that I can make a simple example but
that will be next week.
Regards,
Jeroen.
I created an example and sent it to support.
Regards,
Jeroen.