What order are datasets executed?
I'm running a report that uses multiple datasets. One of which is basically a script written in SQL. I would like this dataset, let's call it code, to execute before the other ones. How can I ensure that this happens?
Does it have anything to do with the order that I created the datasets in the report? Or the order they are used in my template? If i have a hidden table as the first item of the report that uses the code dataset as its dataset will this do what I want? Is there a variable that I can change somewhere?
Please let me know.
Thanks
Unless you specify, dataset queries are executed in parallel. The only time when this is not true is when there are dependencies between queries used for parameters. If you don't want them to execute in parallel, you can set the transaction flag on the data source. In this case, they will execute in the order they were defined. I can't guarantee that this will always be this way, but this is how it works in the RS2000 and RS2005 releases.
Hi,
Can you explain more about the transaction flag?
I have 4 datasets and i want to create one temp sql table for all of them.
i want that one of the four will executed first, build the temp table and only then all the rest tree datasets will executed.
Is it doable?
Thanks,
Yuval,
Yuvalch,
If you are using a temporary table like that, how will you handle concurrency issues when multiiple users run the report at the same time? I only ask this because I was thinking about going down this path, but couldn't find an elegant way to handle the concurrency issue.
R
the flag is called "Use single transaction" and its in the data source
regarding the concurrency issues i use a temp table with a unique name: the name contain a unique number that generated by the rdl code:
shared function RndNum() as Integer
Randomize()
return CInt(Int((10000 - 1 + 1) * Rnd() + 1))
end function