Multiple instances of a datamodule
I have a data module defined called "dm".
One of the tables in dm is called "items".
In the report specification the fields are referenced as [dm.items."FieldName"]
At runtime I may have multiple instances of my data module and they can come and go depending on what the user is doing.
How can I get my report to know which instance of the datamodule to use?
My solution so far:
When a datamodule is created that I know is for use by a report, I assign the name property of the datamodule at runtime that I then use in the report specification.
For example I say dm.name :="dmrpt" at runtime. This way I can reference fields in the report as [dmrpt.items."FieldName"] and the report won't try and use my generic data module.
This is all well and good until a user starts two reports at the same time.
How can I get the report to use the correct instance of the data module? Any suggestions?
Thanks,
Erik
One of the tables in dm is called "items".
In the report specification the fields are referenced as [dm.items."FieldName"]
At runtime I may have multiple instances of my data module and they can come and go depending on what the user is doing.
How can I get my report to know which instance of the datamodule to use?
My solution so far:
When a datamodule is created that I know is for use by a report, I assign the name property of the datamodule at runtime that I then use in the report specification.
For example I say dm.name :="dmrpt" at runtime. This way I can reference fields in the report as [dmrpt.items."FieldName"] and the report won't try and use my generic data module.
This is all well and good until a user starts two reports at the same time.
How can I get the report to use the correct instance of the data module? Any suggestions?
Thanks,
Erik