Jump to content
We've recently updated our Privacy Statement, available here ×

process flow of report with subreports


lknueve

Recommended Posts

 Hello. 

I was wondering if anyone knew if when a report has a subreport, if both sql queries are sent to the server at the same time or if they are sent in an order and the subreport waits for the main report query to finish? If this isn't the case by default, is there a way to force the subreport to wait until the main query is finished? Any help would be great - thanks! 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

One way to guarantee that you subreport runs after you main report is to nest the main report inside your subreport as a second level subreport.  There's a reason why it sounds odd to do it that way.  :D  You may need to cascade report parameter values through the subreport to the main report (and back again if you need to access return values)

A second method can be used if you don't need the results of the subreport to be displayed in the detail section.  The main query runs as normal to fill the detail section and the subreport is placed in either the summary section or last page footer. 

Link to comment
Share on other sites

  • 4 months later...

 hi there. sorry - I know it's been a while since I originally brought this up, but here's the situation in more detail...

I have the main report calling a stored proc that first truncates certain tables and then re-populates them. The subreport is pulling from those tables. I tried putting the subreport in the Summary and LastPageFooter bands, but I get no data when running the report. However, after the report runs, I run the subreport by itself and I do get data, so I know the proc is working properly, as well as the subreport, but it's still trying to access the tables asap when running the entire report? 

As you can see, I can't exactly try your first option since I'm truncating tables, so I'm hoping you have another suggestion to try? Thanks!!

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...