Dataset order of execution

  • Hey everyone.

    Been messing with SQL Server Reporting Services for the past week or so and it's pretty cool.  One thing I'm struggling with, though, is how to get a specific dataset to execute after a prior dataset populates a database table the dataset I need to execute second needs.  There doesn't seem to be any easy way to set dataset execution order in Reporting Services.

    I've googled gallore and can't come up with anything.  Ideas?

  • I'm not exactly sure what you're trying to do, but could you use parameters?  You can set the value to be taken from your data source, and/or you can have them default to data or a global variable.


    Two muffins are sitting in an oven. The first one turns to the second and says "pretty hot in here, huh?"
    The second muffin glances at the first and then shrieks in fear,
    "AAAAAAHH!!! A TALKING MUFFIN!!!"

  • Don't think that would work.  I'm populating a whole table in the first dataset (among other things) and then selecting from that table for the second dataset.

     

     

  • Oh, I see.  If this first dataset is something you use frequently, would it be possible to set it up as a view in your database?


    Two muffins are sitting in an oven. The first one turns to the second and says "pretty hot in here, huh?"
    The second muffin glances at the first and then shrieks in fear,
    "AAAAAAHH!!! A TALKING MUFFIN!!!"

  • Not a bad idea, but the problem is that I need the second dataset to pull data from the table after the first dataset truncates the table and repopulates it.  So the datasets must execute in the correct order.

  • the best thing 2 do is 2 use stored procedure ...

  • That's exactly it. I can execute them in the exact order I need. It's cool, really, you can almost treat it like you would SQL Server. Perhaps that's why it's part of the package.

    I'll take out my WAITFOR DELAY '00:00:02' in the second dataset pull. Crude, but it did work... at least temporarily.

    Thanks, ofir.

  • Errr... even if I put the sproc calls as the code in each dataset, how do I guarantee that the second stored procedure will indeed execute second??  The query/call in the dataset's code section is what generates the dataset, but I still need the second pull to wait until the first has finished.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply