Refreshing subreport data on change of group in the main report

I have created three comma delimited strings in a subreports and then introduced them to the main report. The subreports are simple with no groups. I have one subreport for Authors, one for Departments and one for Schools. This is ok if I filter the data down to one publication. If I remove the filter then I get every instance of each of the subreports. ie all authors in a comma delimited string, all departments and all schools.
I have two groups in the main report, Publication Year (Group #1) and Publication Title (Group #2). This is where I have the problem. The data coming from the subreports show all instances as mentioned above. I want the subreports data to refresh each time the group changes. I need it to only show the necessary comma delimited string for each publication, not every instance.

Hi Abhilash,
The logic has worked correctly but the performance is really poor. Is this because I have there subreports doing similar funcitons? Is this a topic for another discussion?
Also, when I try to export the report to xls data only it starts the export but then a msg comes up on the screen relating to the second formula you gave me for comma delimited strings for schools:
SAP Crystal Reports
String length is less than 0 or not an integer.
This relates to the third line in the code:
Left(schools, len(schools)-2);
It then aborts the export. Is this a topic for another discussion also?
Thanks

Similar Messages

  • Get data in a subreport based on a shared variable from the main report.

    Goodd morning,
    My question/problem is how to manage this scenario.
    I am transfering 2 shared variables (pereiod from /period To, ) from the main report to a subreport and now  i would like to get data in this subreport based on these 2 variables...
    The problem is that i can not find the shared one in select expert icon...
    Could anyone point me to solve this issue?
    Thks for any help.
    Jose Marin
    Crystal Report XI SR3

    Hello Jos,
    I recommend to post this query to the [Crystal Reports Design|SAP Crystal Reports; forum.
    This forum is dedicated to topics related to the creation and design of Crystal Report documents. This includes topics such as database connectivity, parameters and parameter prompting, report formulas, record selection formulas, charting, sorting, grouping, totaling, printing, and exporting but also installation and registering.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Crystal Reports Design queries remain in one place and thus can be easily searched in one place.
    Best regards,
    Falk

  • Can a subreport select records based on values in the main report record?

    Post Author: calvin
    CA Forum: General
    Perhaps my understanding of a subreport is incorrect as this is the first time I've used one, but it seems to me that the subreport should be able to use the values from the main report record in its (the subreport's) operations-but my subreport doesn't seem to be working that way.In my main report, I select a set of records from a 'request' table. I have a subreport in the detail section so the subreport is processed for each of the request records. That works, but I'm simply getting the same data reported multiple times. It's as if the subreport only uses the last request record rather than the current one. Stating it this way I can see that the problem might be evaluation time-it's processing the request records first, then processing the subreport, and only then printing everything. If this is correct then putting WhilePrintingRecords on the subreport should work-but the only way I know of to do that is in a formula. Can I call the subreport from a formula? Or am I totally off-track?Thanks.

    Post Author: foghat
    CA Forum: General
    Have you established a link(s) between your main report and subreport?When viewing the main report, click edit --> subreport links and link the 2 based on whatever values from the main report you want.

  • Linking Subreports based on group in the main report

    Hello,
    I have a main report that groups by department, month, and then employee name.  I put a subreport in at the month and name level (it brings back statistics for a particular employee for the chosen month).  The subreport is based on a completely different set of data.  I want the subreport to pull just the data for the individual month and employee into that employees monthly section.  How do I link the subreport?  It seems like it should be pretty straightforward, but I can't get it to work.  Do I need to set up groups in the subreport?  I am a beginner and appreciate your help.
    Thanks,
    Al

    How I would do it is as follows
    Create a Formula Field and choose the group name e.g.
    GroupName ({migsol_oppact.COMPANY})
    Then link the sub report using that Formula Field

  • Data Passing from a Subreport to the Main Report

    <p>Hello,</p><p>I have been able to pass data from a subreport to a main report using shared variables. The Complete Reference: CR XI (p. 313) states that you should be able to now suppress the subreport to prevent it from showing on the main report, however this is not working. I want to get the data from the subreport and then further manipulate it in the main report, and I do not want the subreport shown on the main report. I tried suppressing/hiding the section where the subreport is placed as well as suppressing the subreport itself. The formula values on the main report become null when I do this though. Is it possible to keep the subreport off the main report?</p><p>Thanks.</p>

    Search forums, this has been answered multiple times.

  • Passing a variable from subreport to the main report

    Hi guys, was unable to google this, so Im urning to you guys:
    I was wondering whether it was possible to do this:
    I have a subreport taking data from a table. In the main report, in the suppres condition of details section containing this subreport, I need to have a variable containing the total count of rows in that table. I know there are shared variables for that, but the problem is, that the variable in the condition is processed sooner than the one in the subreport.
    Any ideas on this?
    Thanks a lot

    To Sharma:
    Hi, unfortunately I can't. The subreport has its specific position in constallation with previous and following sections and must be right there.
    To Raghavendra:
    Hi, that was my first idea, but the problem is as I explained in my first message.
    To both:
    I have a table in subreport. This subreport is in main report positioned in details section "x". and I want to use that shared variable in the suppress condition of section "x". The problem is that the formula in suppress condition is processed sooner than the formula assigning a value to the shared numbervar inside the subreport.
    and thats what im looking for - a workaround for that. btw im using CR 8.5
    thanks again guys

  • Show Subreport Name in the header part of the main Report subreport wise

    Hi,
    I want to create a Report which contains a collection of Subreport.
    In header part of the main report I have one expression which shows specific text for specific subreport.
    In Detail
    I have three subreport named as
    Sureport1
    Subreport2
    Subreport3
    I have given page name for all the three subreport as subreport name.
    Now I create one Main report. Where I drag one table and delete the group.
    I created three rows in this tablix.
    And in each textbox I have inserted one rectangle.
    and place all the three subreport.
    and here my expression is mentioned below.
    =IIf(Globals!PageName Like "Subreport1","Subreport1",
    IIf(Globals!PageName Like "Subreport2","Subreport2",
    IIf(Globals!PageName Like "Subreport3","Subreport3","")))
    This expression is working when I am placing all the subreports inside separate rectangle but not working when I am placing all three subreports in one tablix.
    For both case it is showing in report designer window but in second case it is not showing in the pdf.
    Thanks,
    Aswini Rout

    Hi,
    As the description, I understand that you want to display the subreports’ name on the page header of the main report. When the page display a subreport, display the corresponding subreport name in the header part of the main report.
    Base on my understanding, you should have page break on each subreport(suppose you add the subreports without Rectangle) since there is no group in the main report and there should not be a page break in the main report. If I have misunderstood, please correct
    me.
    I was not able to reproduce the issue currently. How did you define the page name of your main report. If it is possible, please upload your rdl file to your OneDrive and share the link here. You can also capture the screenshot so that I can understand the
    problem in more details.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How to add a sub report at the end of the main report whilst grouped

    Hi!
    I have a main report that is grouped by the Customers name and then details of transactions they did with the company.
    I need to add a letter at the end of each group for each customer (With their name displayed in the letter). I tried adding a sub report in the report footer, but it only appears once at the end of the report, rather than at the end of each group for each customer.
    How can I achieve the desired result?
    Regards
    Vik

    Vik,
    You are on the right track with the sub-report.
    1. Create your letter in a separate report.
    2. Add the Letter Report to your original report as a sub report in the group footer.
    3. Set the report links on the "Group By" field.
    This will give you a letter record for each report record with the same grouping as the main report.
    Hope this helps,
    Jason

  • Not having to refresh the data in the main report but only in the subreport

    Hi SAP,
    I have a report that uses a stored procedure in the main report and uses regular database tables in the subreport.  The data returned from the stored procedure reports information from the month-end database (a cutoff point from the previous month's numbers) while the subreport reports information from the live database.  This report gets run everyday to show the changes in numbers from the live database.  Obviously the numbers from the month-end database remainds static until the next month's cutoff database is created. 
    My problem is that everyday when I run the report, the data needs to refresh from both the stored procedure in the main report and the live database tables in the subreport.  How can I leave the data returned from the stored procedure static or as is without refreshing the stored procedure returned data and just have the subreport data refresh itself?  The stored procedure really puts a strain on the database and I would like to cut-out the time to process the report as well.  Does anyone have any ideas?
    Zack

    Hi Zack,
    Try the following under Report options.
    1. Clear the check box of "Verify Stored Procedures on First Refresh" in the Main report.
    2. Select the check box of "Verify on First Refresh" in  the sub report.
    Hope this helps.

  • After changing a subreport I loose data in the main report.

    Hi All,
    I have a main report that has two parameter fields and two subreports linked to the parameter fields.  The two subreports access the database and work fine separately.  When I add the two subreports to the main report it works fine.  As soon as I make a change to a subreport it works fine standalone.  But as soon as I update the main report (reimport subreport) the subreport no longer returns data to the main report.  To get the report to work after a change to a subreport I have to delete the subreport from main and then add it back in again.
    Does anyone have any suggestions?
    I am using Crystal Reports 10 and I'm totally at my wits end.  I've been working with Crystal for about 5 years and this is the first time I've seen this.  Maybe I'm missing something small but I just can't seem to find the answer.
    Thanks for any help,
    Jim

    Jim:
    I usually edit my subreports from within the main report.  I right click the subreport and then click edit subreport.  This eliminates the need to reimport the subreport.  I've done a lot of work with subreports and this always works for me.
    I hope this is not too late and helps you out.
    Ralph

  • Subreport data use to group Values in Main Report

    Hello,
    I create a Subreport in my header to calculate values, the formula is based on a specific sorting and comparison of previous values.
    In my main report I need to Group my values depending on the result. Because the group I will made on the Main Report can't be the same sorting of the SubReport.
    SUB-REPORT
    1 Paris (result "Capital")
    2 Lille (result "Same Country of Paris")
    3 Lyon (result "Same Country of Paris")
    4 London (result "Capital")
    5 Manchester ("Same Country of London")
    MAIN-REPORT
    Group
    - CAPITAL (Paris, London)
    - Same Country of London (Manchester)
    - Same Country of Paris (Lille, Lyon)
    My issue, is that I don't know how to group values on MainReport based on a formula Result of the SubReport
    OR, may be there is a way to search on value in the sub-report ?

    You can't use a shared variable to group on from a sub report in the main report since a shared variable evaluation time is done whileprintingrecords.
    Try using a SQL expression to return the same result as the subreport would. You  can  then group on the SQL expression
    Edited by: Zilla Eh on Jan 15, 2009 6:39 PM

  • 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 make a common parameter for two subreports in the main report.

    Hi,
    I have a crystal report which has 2 subreports in it. Both the subreports have the same code and I need to create a parameter for Project Cost in both the subreports for filtering the data.
    When i create the same parameter in both the subreports, i see two parameters with same name on my prompt page while refreshing the report. however I just want 1 parameter on my prompt page and data should get filtered in both the reports.
    Can anyone please suggest something, How can I do that? is there a way for sharing same parameter between two subreports?
    Thanks!
    Neha.

    hi Neha,
    here's how to do this:
    1) create a new parameter with the same name on the main report
    2) right click on your first subreport and choose Change Subreport Links
    3) in the Field to Link To list drag over your new main report parameter
    4) open the Subreport Parameter Field to Use select menu and choose your subreport parameter
    5) repeat steps for the 2nd subreport
    now you'll only get prompted once.
    cheers,
    jamie

  • How to develp a subreport in the same page of the main report and processed when is called

    SSRS 2012
    Hi guys,
    I am developing a report that includes a subreport.
    therefore The report is made up by 2 sections:
    1) Show a grid (several rows - may be 100 or more - and some columns). It represent high level info  (Each row represent a specific item)
    2) The user click on a Row/column (eg: Item1, to see details that must be shown as graph.
    Here the problem: Searching info about SSRS reporting for subreports, drilldown, nested report and so on, no ones accomplish the requirements for the following reasons:
    1) Subreports: NOT open in the same page. The user must <go back> to see detail for other items, such as Item 2....
    2) Nested and DrillDown: Process data as the Main report (they are hidden and displayed after user action). In my case this leads to performance problem, because: if the main report has 200 objects (it means 200 graphs processed and hidden at the same time
    for the main reports).
    3) DrillThrough and Subreport: The detail data are processed only when the user select the interested item in the main report. Here the problem: the report is shown externally.
    Please, it there any possibility to have a subreport (or anything else) to be executed in the same report as the main report and processed only when the user make action?
    Thanks for your help.

    Hi Fasttrack2,
    According to your description, there is a main report with more than 100 rows of summary information, when users click the item of the row, the report need to jump to detail information shows as graph. The problem you are facing is that you are not sure
    subreport, drilldown or drillthrough report should be used? You hope to set display detail information in the main report and keep high performance of report.
    In Reporting Services, each subreport instance is a separate query execution and a separate report processing task. Subreports are recommended when there are just a few subreport instances. We should not use subreports inside a group when there are many
    group instances, instead, consider using drillthrough reports. Drilldown reports process all data even when the data is first hidden. In order to improve the performance of the report, we can split drilldown reports into parameterized drillthrough reports,
    because Drillthrough reports do not run until a user clicks the drillthrough link in the main report.
    In this case, we can consider using drilldown or drillthrough report. In drilldown report, when we click a plus or minus button to expand or collapse a section of a report, the detail data will be displayed in place. By using drillthrough report, when we
    click the link in the main report, the detail data will be displayed, we can come back to the main report by click return button in the drillthrough report.
    Reference:
    Troubleshooting Reports: Report Performance
    Drillthrough, Drilldown, Subreports, and Nested Data Regions
    If you have any more questions, please feel free to ask.
    Best Regards,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • Concatenate data in a Sub-report then copy in the Main report

    Hello,
    I'm using Crystal Report XI R2, I succeed to retrieve data as decribe in SAP Note 1212454 - How to Share Subreport Data with the Main Report
    But when I hide section A, my values in section B are empty
    So my answer is, how to retrieve dataset from the subreport group Footer Group concatenated and show it as a Header group data in the Main Report

    I'm currently trying was is explained in:
    1218324 - How to suppress a subreport but still evaluate and pass a shared variable
    Symptom
    In Crystal Reports (CR), subreports are frequently used to calculate and pass data to the main report. In many instances the business requirement is that the subreports not be visible to the end users. However, suppressing the subreport object or suppressing the section of the main report in which the subreport is located causes the shared variables to display incorrect data when passed to the main report.
    How can you suppress a subreport but still pass a shared variable with the correct data?
    Resolution
    In Crystal Reports 9 and later, you can suppress a subreport but still pass a shared variable with the correct data to the main report by following the steps below:
    In the Subreport
    1. Remove all conditional suppression formatting formulas.
    2. Delete all drawing objects such as boxes, lines, etc.
    3. Suppress all remaining subreport objects such as database fields, formulas, etc.
    4. For all sections that contain no objects, select the 'Suppress' option in the Section Expert.
    5. For all sections that contain suppressed objects, select the 'Suppress Blank Section' option in the Section Expert.
    In the Main Report
    1. Select the 'Suppress Blank Subreport' option in the subreport Format Editor.
    2. Remove all borders from the subreport object in the subreport 'Format Editor'.
    3. Select the 'Suppress Blank Section' option in the 'Section Expert' for the section containing the subreport.
    Background Information
    When working with subreports, the 'Suppress Blank Section' option forces CR to evaluate the subreport contained within the section to determine if the final subreport output is blank. The 'Suppress' option allows CR to bypass the subreport completely, because the section is suppressed. By forcing Crystal Reports to evaluate the suppressed shared variable formulas in the subreport, the data can be correctly passed from the subreport to the main report even though the subreport is not visible to the end user.

Maybe you are looking for

  • Hooking up iMac G5 (2005) to hdmi

    I have an old iMac G5 (2005) that has been sitting in the basement for years and so I thought I would put it to good use. I want to hook up an hdmi (ultimately to hdmi mini) to the computer. I'm planing on using it as a spare monitor for when i do vi

  • How to email a pdf file (attachment with password) using ABAP?

    Hi Colleagues, I n abap, how do you email a pdf file that contains password? (pdf with password, not the whole email). A custom program is created. Inside this program, it retrieves the spool number and converts it to a pdf file (using function modul

  • [SOLVED] Arch freezes after scanning LVM VGs at boot

    Hi there, recently ArchLinux started printing some udev errors at boot. After an update the system freezes at startup after detecting the LVM volume groups (3 lvm volumes found in volume group "Laptop" or something similar). This is my hard disk conf

  • Global vars in as3 and code run order

    two questions: 1)how can i declare a global variable in as3, like in as2 i could write for example : _global.variableName = "variableValue" and then access the var from anywhere. 2)how can i tell a part of the code from the root to run only after the

  • Download Font file from SAP system to local system

    Hi, How to download Font files (.TTF) from SAP to local system. Is there any Reports or Tcodes available? I need to download font from one SAP system and upload it to another system. I am referring to Russian fonts. Kindly help me. Thanks