Skip to Content
avatar image
Former Member

Sub Report - Doubt

Hi All,

I am having 10 reports. And im imoprting all the reports as sub report into a main report.

Hence, when i run the main report, how many times it will hit the DB.

either only one time, or for all the subreport it will hit. ( that is 11 times including main report's hit).

Main report as well as sub reports are using the same Stored procedure.

I need minimum number of DB hit. How can i do this.

Thanks in advance,


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Apr 08, 2010 at 02:15 PM

    Each Subreport will hit the database and run the SP.

    You may want to explain why you are using subreports?

    Thank you


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 08, 2010 at 02:42 PM

    Are the parameter values to the stores procedure (assuming there are some) the same for all of the subreports too? Obviously, if they are different, you'll have no choice but to hit the DB for each set of parameters.

    The only possible way that I can think of that you might be able to reduce the number of hits on the DB is by using shared arrays. This would only be possible if one or more of the subreports are a high-level summary of the data (I assume the SP returns a lot of data, or you wouldn't really care very much as to the number of DB hits), such that there would be less than 1000 (array index limit) lines in the subreport.

    If this is the case, you could summarize the data in the main report into shared arrays, then the subreport could be written over a table that returns a single number per record, 1 to effective array size, which then could be used to drive the subreport and be used as an index to the arrays to print the subreport's detail lines.



    Add comment
    10|10000 characters needed characters exceeded