Controlling execution of subreport on main Report in ssrs 2008 R2

Controlling execution of subreport on main Report in ssrs
Hi,
Am using more than 100 subreports in my main report using ssrs 2008 R2.
And given conditional Visibility in sub reports based on the Parameter selection in main Report . But the performance is very very slow in main report.
While selecting single sub report executes in seconds. The same report in main report executes in hours.
According to my view,
All the Sub reports executes and finally conditional visibility is working. Can we Control executing sub reports?
Regards, Gayathri devi P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

Hi,
I think the time to render 100 report sure will be long time and the main report want to render those reports.
So first why you do not separate those report on many reports for different purpose.
second if this is a dashboard report you may use many matrix in the same report and the parameters passed by default or based on expression.
I really hope if you make your report as dashboard report, many matrix many parameters render it once. As I remember I think SSRS will try to execute your
DataSets in parallel which will reduce your waiting time.
I hope this is helpful.
Elmozamil Elamir
MyBlog
Please Mark it as Answered if it answered your question
OR mark it as Helpful if it help you to solve your problem
Elmozamil Elamir Hamid
http://elmozamil.blogspot.com

Similar Messages

  • Slow performance refreshing report with multiple subreports in main report

    I am using multiple subreports in my main report that appear to be slowing down the performance of the report considerably. Is there something I can do to increase performance with subreports.

    Hi Brian,
    Subreports are a known performance hog.
    I would suggest going back to the drawing board and rethinking on the layout of the report. The best thing, of course, would be to completely get rid of the subreports by creating a single SQL statement that takes care of all the report's requirements.
    Sometimes it is imperative to have subreports, in which case, you should try to make sure any selection filters from both the Main Report and the Subreport are passed back to the database.
    Also, avoid using Page N of M for better performance - with or without Subreports.
    -Abhilash

  • If no data in subreport the main report fails

    Morning,
    I have a main report and a subreport. When I try to run it the main report fails with the error, "a subscript must be between 1 and the size of the array" I believe this is  because there is no data in the subreport. In the section expert I checked supress blank section.
    Is there something else I should be doing?
    Thanks
    Laura

    Hello Laura,
    I am researching a similar problem.  The message is being returned because you are trying to use/address and array element that does not exist and/or is outside the upper bound of the array (like a dynamic parameter which when it has multiple values is an array).
    Hope this helps.
    Don

  • How to get shared date value from subreport to main report

    Hi,
    I need your help in passing the value of a running total that is located in the subreport to the main report. The running total in the subreport is getting the maximum of the Effective Date (which it is type in the database is date) for each group and it is value will change on the change of the sequence no. group. I am printing the value at the group footer which displayed correctly. Now my issue is that how to pass the value from the subreport to the main report as a date. I have created a formula that it is having the code:
    shared datevar ddd := date(0,0,0);
    ddd:={RTotl0}
    The above formula is not compiled and it is first giving me an error at line 1 that date(0,0,0) is not accepted. Then when I removed it, it gave me an error that ddd:= can't have a running total to a datevar.
    So can you please help in getting the value from the subreport and then to pass it to the main report as a formula as I need to include it in other formulas which it compares the dates.
    Thanks

    Hi Mohammed,
    Are you displaying the shared variable on the Main Report's group footer as well?
    Try changing the code to:
    shared datevar ddd := cdate(0,0,0);
    ddd:= date({RTotl0});
    -Abhilash

  • Crystal Reports 10, Want to pass values from subreports to main report

    Post Author: playmkr278
    CA Forum: General
    Is there a way to just share values out of subreports.
    The reason I ask is that I am having problems pulling the correct information in one subreport so I'd like to use 2 subreports to pull out Billable hours on one and Billed Hours on another and then add them together to display on the main report.

    Post Author: Jedit
    CA Forum: General
    Yep there is!
    In your sub report
    I the formula editor create a shared variable then create the same variable in your main report.
    EG
    IN your SUB
    Create new formular called tothrs etcu2026..
    whileprinting records;
    shared numbervar tothrs: sum({table.fieldname}]
    In Your Main Report
    whileprinting records;
    shared numbervar tothrs
    this passes the value from your sub to the main, check help for different types of format as the one above is only for a number there are others for time & date etc..
    hope this helps!
    I have been doing a similar exercise myself but got stuck summing the parameter values in my main report, if you solve this let me know?
    Please see http://technicalsupport.businessobjects.com/cs/forums/thread/6210.aspx

  • Passing Array From Subreport to Main Report then Summing

    Hi,
    I am having troble passing an array from a sub report to the main repport.  I have managed to create the array, pass it and display it in the main report, however the first value of the array is displayed twice.  Here is the  formulae I have used:
    In the sub report:
    whileprintingrecords;
    shared stringvar str;
    str:=str{@value}","
    In the main report:
    whileprintingrecords;
    shared stringvar str;
    stringvar array arr;
    arr:=split(str,",");
    join(arr,",")
    Also, when I have managed to resolve the problem of the first value printing twice, I hope to change the array back to a number array and sum all of the values together.  I'm not too sure how to do this either.
    I hope you can help.
    Julie

    Ummm... Isn't Join(Split(str,","), ",") = str?  Why bother with the two extra lines of code?  Also, are you sure the subreport isn't creating the "duplicate first value"?  (I.e.  The data has the same value on two records, so it's being added twice?)
    Also if you're looking for the sum, why not create another shared variable and sum the value in the subreport as you're building the array (assuming you need the array for other purposes)?
    HTH,
    Carl

  • Passing values from subreport to main report

    Dear All,
           I have used shared values in my sub report and i want to use that shared variable in my main report in one of the formulas for average calculation but i see the values as 0.
    Can someone let me know what I am missing.
    Regards,
    Sonali

    Hi
    The most important thing to remember when using shared variables is that Crystal Reports must first evaluate the formula where the value is stored before evaluating the formula that retrieves the shared variable.
    For example if you want to pass a grand total from the subreport to do a calculation in the main report, follow these steps:
    1. In the subreport, create a formula similar to the one below:
    //@SubFormula
    //Stores the grand total of the
    //{Orders.Order Amount} field
    //in a currency variable called 'myTotal'
    WhilePrintingRecords;
    Shared CurrencyVar myTotal := Sum ({Orders.Order Amount})
    2. Place this formula in your subreport.
    3. In the main report, create a formula that declares the same variable name:
    //@MainFormula
    //Returns the value that was stored
    //in the shared currency variable called
    //myTotal in the subreport
    WhilePrintingRecords;
    Shared CurrencyVar myTotal;
    myTotal
    4. Place @MainFormula in a main report section that is beneath the section containing the subreport.
    NOTE:
    For the shared variable to return the correct value in the main report, you must place @MainFormula in a main report section that is beneath the section containing the subreport. This ensures Crystal Reports evaluates the @SubFormula before @MainFormula.
    One way to do this is to insert a section below the section containing the subreport, and place @MainFormula in this new sub-section:
    · On the 'Format' menu, click 'Section'.
    · On the 'Sections' list, click the section containing the subreport.
    · Click 'Insert' (at top of dialog box). This inserts an additional subsection.
    · Click 'OK' to return to the report, and insert @MainFormula into this new sub-section.
    The next time you preview the report, @MainFormula displays the value from the subreport. In this particular example, that value was the grand total of the {Orders.Order Amount} field.
    5. Once you have verified that @MainFormula is returning the correct value from the subreport, you can include this formula in other main report formulas, such as:
    //@NewFormula
    //includes data from subreport
    {@MainFormula} + Sum ({Customer.Last Year's Sales})
    · Place this formula in the same section as @MainFormula, or in a section further down on the report.
    You have now successfully shared data from a subreport with the main report.
    NOTE:
    This is not possible with On Demand Subreports in Crystal Reports since the report will not be processed until after clicking report.
    Regards
    Sourashree

  • Passing Shared Variable from subreport to main report

    Hello,
    I am having difficulty passing the shared variable from the subreport to the main report.  For some reason, when viewing the data, the value for the very first row is returning a 0 but the second row is returning the value that should be in the first row.   Does anyone have an idea of what I'm taking about?
    Thanks.
    Z

    In Subreport there is a group based on the client.  There is a summarized amount field in this grouping.  I placed a formula in the grouping and suppressed it.  The suppressed formula is listed below.
    {@ store client payments}
    WhilePrintingRecords;
    Shared CurrencyVar cRelatedPayments;
    cRelatedPayments := cRelatedPayments+Sum ({amount.amt}.{client.client_number});
    cRelatedPayments;
    In the main report, there is 2 groupings, first grouping is the client and second is the invoice.  The client grouping is displayed while the invoice grouping is suppressed.
    The following is the formula in the main report to get the shared value.
    WhilePrintingRecords;
    Shared CurrencyVar cRelatedPayments;
    cRelatedPayments;
    This is placed in the client grouping.
    I hope this helps.
    Z

  • Passing a variable from subreport to main report

    Hello,
    Was hoping to get some assistance on this issue I'm facing.  I've got a sub-report that calculates a monthly goal based off the date selection criteria. And I'd like to pass this goal back to the main report.
    In my sub-report, I created a new formula named ProcGoalVariable:
    WhilePrintingRecords;
    Shared Numbervar ProcedureGoal := cdbl({#ProcGoal})
    While {#ProcGoal} is a running total I created for the sub-report and now I'd like to pass it back to the main report.
    In the main report, I created a new formula named ProcGoalVariable:
    Shared NumberVar ProcedureGoal;
    ProcedureGoal;
    But when I drop this into my report, it is returning a value of 0.  In the screen shot, the Proc. Needed should actually equal the Proc Goal:
    Any suggestions on how to pass this correctly?

    Thanks for the advice,
    I want to rewind a bit to make sure I am explaining myself clearly.  My sub-report is pulling the correct numbers and it is located in GF#3 and contains two values that fall under "Proc Goal" and "Prod Goal". These are being calculated correctly and I would then like to pass them back to the main report for additional calculations done on this.
    In the sub-report, a formula was created "ProcGoalVariable":
    WhilePrintingRecords;
    Shared Numbervar ProcedureGoal := cdbl({#ProcGoal})
    In the main report, a formula was created "ProcGoalVariable"
    Shared NumberVar ProcedureGoal;
    ProcedureGoal:=ProcedureGoal;
    Would having the same name inside the formulas being causing the issue? And I've tried inserting a new section below the section where my subreport lives and I still get a value of 0.
    Not sure what else to try at this point.

  • Display different footer in main report of SSRS based on sub report

    I have a main report in which there are two sub reports and then those two sub reports each contain one sub-subreport.
    The following will give you an idea
    Main Report
    ----->Sub Report 1
    ------------>Sub Sub Report 1
    ----->Sub Report 2
    ------------>Sub Sub Report 1
    I am trying to display name of subreport in footer of main report depending on which subreport user is currently in. So let's say if user is viewing Sub Report 1 then it should display in footer of main report "Sub Report 1" (this is actually coming
    from database and is not like displaying some static text but for the time being ignore this)  
    If user is viewing Sub Sub Report 1 then footer of main report should say "Sub Report 1: Sub Sub Report 1"  
    After searching a bit I found out that:
    1. Sub report footer will not be shown in Main report hence this option is ruled out
    2. You cannot pass parameter from sub report to main report so this option is also ruled out
    But looks like you can use Shared Variables between Sub Report and Main Report. I tried to do this but looks like it doesn't work. Here's what I did:
    In my Sub Report 1, I declared a shared variable as below:
    Public Shared Dim sharedVariable as String = "Sub Report 1"
    Now in my Main Report I wrote the following function in code just to test if it prints it on screen on not.
    Public Function PrintSharedVariable() as String
    Return sharedVariable
    End Function
    But when I run this report, it shows error that sharedVariable is not declared in Main Report. How do I use shared variables and will it work in my case?

    Hi Frank,
    According to your description, you want to show the subreport name in the main report. Right?
    In Reporting Services, all the custom code is only work for the current report. The sharedVariable you created in subreport can't be used in main report. That's the reason why it throws the error because there's no sharedVariable in main report. For your
    requirement, the most effective workaround is having a textbox with go to report Action and passing the report name as parameter back to main report.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to calculate percentage and difference of two values in matrix report in ssrs 2008

    Hi everyone,
    DB--SQL server
    SSRS-2008
    I am creating matrix report with grouping on WEEK and Fiscalyearweek,
    I need to calculate of difference between FY14W01,FY15W01 ande  percentage of those..
    how to calculate in ssrs level.
    Thank You, Manasa.V

    Hi veerapaneni,
    According to your description, you want to calculated the increment percentage and difference between two fiscal year week within each week. Right?
    In this scenario, since we need to do calculation based on values between dynamically generated cells, we can't simply use expression to achieve this goal. In this scenario, we need to use custom code to record the value for fiscal 14 and fiscal 15, then
    we can calculate the difference and percentage within the column group. We have tested your case in our local environment, please refer to the steps and screenshots below:
    1. Add the custom code below into the report (you may need to modify the data type based on your scenario:
    Public Shared Value1 as Integer
    Public Shared Value2 as Integer
    Public Shared previous as string
    Public Shared previousweek as string
      Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
    If product =previous and Week =previousweek  Then
         Value2=Value
    Else
    previous=product
    previousweek=Week
    Value1=Value
    End If
         return Value
      End Function
      Public Shared Function GetPct()
         return (Value2-Value1)/Value1
      End Function
    Public Shared Function GetDiff()
         return Value2-Value1
      End Function
    2. Design the matrix like below:
    3. The result look like below:
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Severe Error Ocurred on the Current Command REPORT BUILDER SSRS 2008

    Hi,
         I have a report with 6 tabs, I am using totally 8 Stored Procedures for it.I am using SQL SERVER 2008 R2 and the same in production also.
    Everything works fine when I run the report in my local machine's BIDS, however, when I deploy it into the Production, it occasionally gives an error which reads "An error has occurred during local report processing. (rsProcessingAborted). Query execution
    failed  for dataset 'DS_xxxx'. (rsErrorExecutingCommand)
    A Severe error occurred on the current command. The results, if any, should be discarded. Operation cancelled by user.
    When I ran the SPs individually in the SSMS they are executing fine and the report itself works fine always in my local BIDS.
    Also, This issue happend several weeks after the report was deployed to the production, i.e. it was working fine but suddenly it started giving this error, so I changed the global temp table I was using to a permanent table and then it worked fine for a
    few more weeks, now, again, I am getting the same error occasionally, is there any way to avoid this error completely and can you list all the possible causes for this error, because it happens 2 times out of 5 runs so it is difficult to debug it also.
    As for the Report it self, It is a simple report with a few spark line Charts and a mostly data charts. I am not using any CTEs or Global Temp Tables anywhere in the report.
    Thanks You.

    Hi,
    I would suggest you increase the time out on the reports to 3600 and how it works.
    You can set a default value for all reports in the Site Settings page.
    The default timeout in SSRS for reports is 1800 seconds.
    If still no progress, please check the RS log.
    For more information, see
    Set Report Processing Properties.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • In Drill through report pass hyperlink value as parameter to another report using ssrs 2008 R2

    Hi All,
    I have one drill through SSRS report in which if I click one hyperlink in the summmary report it should be passed as parameter for detail report, like this....
    Summary:
    AccountType
    A1
    A2
    If I click A1 then that should be passed as parameter to detail report and display A1 data in detail report
    If I click A2 then that should be passed as parameter to detail report and display A2 data in detail report.
    Please give me some ideas or expression code to achieve this in using SSRS 2008R2. Its very urgent.
    Thanks,
    RH
    sql

    Thanks the folowing is my source data for the parameter I am including to the drill through
    SELECT DISTINCT
    case
    when EA_STATUS in ('E4', 'U4', 'P5', '02', '03', '04','B2','B3','B4','12')
    then CAST('Project' AS VARCHAR(15))
    else CAST('Non-Project' AS VARCHAR(15))
    end as EA_PROJECT_GROUP_DESC
    FROM TEAMS.FMPROD_V_EA
    As you can see it has only 2 values.So how do you suggest I wirte the expression to include in the report.
    The name of the parameter I will be using is EAProjectGroup.but below is the error I am getting trying to run the report
    rsMissingFieldInDataSet] The dataset Trends contains a definition for the Field EA_PROJECT_GROUP_DESC. This field is missing from the returned result set from the data source.
    [rsErrorReadingDataSetField] The dataset Trends contains a definition for the Field EA_PROJECT_GROUP_DESC. The data extension returned an error during reading the field. There is no data for the field at position 45.
    Preview complete -- 0 errors, 72 warnings
    what does the position 45 mean?

  • How to Design Multi Page Report in SSRS 2008

    Hi All,
    I have managed to create a multi page report. When I am preview mode i can see that the report has 2 pages.
    But when I am in design view I cannot view the second page. How can I view the second page. Reason being I am trying to create a template where the table for certain data needs to be at the top of the page and some data at the middle and so on.
    Thanks in advance.
    Aash.
    Aash

    Hi Aash2,
    According to your description, the behavior of cannot view the second page in design view is expected, in another way, there is only one page in design view.
    Report Designer supports two views: Design to define the report data and report layout, and
    Preview to display a rendered view of the report. If you would like to show a table on the first page, and show the other table on the second page, you can add a page break on the first table like followings:
    1. Click the gray handle in the first table, select “Tablix Properties”
    2. Click “Add a page break after” check box under Page break options in General Tab
    After do above, you can see the first table in the first page, and the other table in the second page.
    For more details about report designer, please see the following article,
    Working with Report Designer in Business Intelligence Development Studio:
    http://msdn.microsoft.com/en-us/library/cc281300(v=sql.110).aspx
    If you have any question, please feel free to ask.
    Thanks,
    Eileen

  • Shared DateVar in Subreport and datediff calculation in Main Report?

    Hello experts,
    I am using CRXI sp2.  I have a report that contains two subreports for different dates in the same date field that are identified by a Service Code.  The subreports have been placed in the same group footer 1a to be displayed and the calculation resides in the main report group footer 1b.  The shared variables are as follows:
    whileprintingrecords;
    shared datevar Codedate5473;
    Codedate5473:={@Codedate5473};
    and
    whileprintingrecords;
    shared Datevar Codedate5623;
    Codedate5623:={@Codedate5623}
    The main report has the following calculation is in group footer 1a.
    Whileprintingrecords;
    Shared numbervar daysbetween;
    if (isnull({@Shared 5623})or isnull({@Shared 5473})) then 0
    else daysbetween:= datediff("d",{@Shared 5623},{@Shared 5473})
    This returns negative numbers as well as calculations where one of the shared variables is null.
    I reset the calculation in the report header as well.
    Thanks for your help in advance.
    Kevin

    Hi Kevin,
    I can reproduce your issue, As per my knowledge the crystal will make some issues in null value computation as well as  shared variable  computation
    In your report i can see , you tried to access values from subreport to main report through shared variable. that will make problem. we can access values from main report to subreport without any issue using shared..dont ask me the reason..i am not the right person to say that... lol.
    The another wrong thing  i was found in your formula is , you are not resetting the shared variable any where.. so once the date field is null, the shared variable returning the previous value.
    So this is the solution for you..
    1,You have to add one more subreport for displaying your result., Lets say 'Sub report3'
    and create a formula, like.(Same which you have write before for the result)
    shared datevar Codedate5473;
    shared Datevar Codedate5623;
    numbervar daysbetween;
    WhilePrintingRecords;
    daysbetween:= datediff("d",Codedate5473,Codedate5623);
    daysbetween;
    2, Re- write your first two formulas like this
    For Subreport1,
    WhilePrintingRecords;
    shared dateVar Codedate5473;
    if isnull({Codedate5473}) then
    Codedate5473:=date(0,0,0)
    else
    Codedate5473:=date({Codedate5473});
    For subreport2
    WhilePrintingRecords;
    shared dateVar Codedate5623;
    if isnull({Codedate5623}) then
    Codedate5623:=date(0,0,0)
    else
    Codedate5623:=date({Codedate5623});
    Hope this will works for you,
    Cheers,
    Salah.
    Edited by: salahudheen muhammed on Aug 7, 2009 1:05 PM

Maybe you are looking for

  • IPhone 4 froze and can't connect to iTunes or turn off.

    My iPhone 4 froze and wont connect to iTunes due to  an invalid response recived from the device. I already tried Apple support but I can't exactly call them when my phone is froze and wont work, now can I? It's stuck on the unlock screen with the sl

  • System.Diagnostics.EventLog - A device attached to the system is not functioning

    I was getting an error .... System.ComponentModel.Win32Exception was caught   ErrorCode=-2147467259   HResult=-2147467259   Message=A device attached to the system is not functioning   NativeErrorCode=31   Source=System   StackTrace:        at System

  • Email settings: POP vs. IMAP...Which is better?

    I use my iPhone for work, like many of us do.  I came from a balckberry, so I am use to getting my emails instantly..... I will say that is about the only thing I miss..... I can set up my work email as either a pop or imap.  Which is better?  Do the

  • Access denied in an applet that uses the jai jars

    Hello there I have a problem while I am using ParameterBlockJAI pb = new ParameterBlockJAI("scale"); Interpolation interp = Interpolation.getInstance( Interpolation.INTERP_BILINEAR); pb.addSource(orig); pb.setParameter("xScale", dScale); pb.setParame

  • Reg: Process Chain, query performance tuning steps

    Hi All, I come across a question like,  There is a process chain of 20 processes.out of which 5 processes are completed at the 6th step error occured and it cannot be rectified. I should start the chain again from the 7th step.If i go to a prticular