Controlling Record Selection for Subreports from the Main Report

Post Author: Horizon57
CA Forum: Formula
Hello - I am generating a standard report template that will be applied to all of my accounts and I am connecting to an Access DB that has multiple tables. Each table corresponds to a single Subreport within my Mainreport and contains the data for all of the accounts. Essentially I would like to be able to write some logic in the Formula section of my Mainreport whereby I can control which account to run the report for based on the Account Name.  I am having sucess with this method when I change the parameters of the formula in each subreport, but how do I modify my code to allow me to control this from the mainreport.  An example of a formula is below. // Account AAA//{Subreport1.Account } = "AAA" and {Subreport2.Account } = "AAA" and {Subreport3.Account } = "AAA" and {Subreport4.Account } = "AAA"// Account BBB//{Subreport1.Account } = "BBB" and {Subreport2.Account } = "BBB" and {Subreport3.Account } = "BBB" and {Subreport4.Account } = "BBB"// Account CCC//{Subreport1.Account } = "CCC" and {Subreport2.Account } = "CCC" and {Subreport3.Account } = "CCC" and {Subreport4.Account } = "CCC" Essentially, I am looking to just uncomment the particular Account I would like to produce the report for and have that filter down to all the subreports. How do i Modify the logic? Is there a better way to approach this?

Post Author: Horizon57
CA Forum: Formula
Thanks for all the responses..... Just to clarify, I am essentially trying to control the record selection of each subreport with a forumula in the mainreport. To this end I am trying to avoid having to modify the formula in each subreport to change accounts each time i need to run a set of reports. I am still not having any luck modifying the subreport links as mentioned above. The only way I have been able to control the data is with formulas in each subreport. If anyone has accomplished what I am attempting, could you post an actual formula from both the subreports and mainreport so I can try to mirror them. Also, if anyone can point me to an example where I can integrate a dialog box to automatically control the record selection (as mentioned above), that would be great. Thanks,Mike

Similar Messages

  • List down all subreports in the main report

    Hi All,
    I am developing reports in Crystal XI R2. I am working on the listing all the subreport names in the main report. I tried to use Filename function but it is not showing any report name even in the subreport itself.
    Is it possible with any work around? Please help.
    Regard,
    Ashish

    Hi ashish
    Do you mean you want to have a hyper link of all the subreports from the main report.
    main report
    subreports
    link1
    link2
    link3
    You can just do like this insert->subreport->select the report name and place it whereever you want. You can select many reports like this.
    Is this answers your question?
    Regards
    usama

  • 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.

  • 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

  • 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.

  • How to print out multilingual reports from the main report using Xliff temp

    Hi all,
    How to print out multilingual reports from the main report using Xliff temp?
    When I want main report call subtemplate and finish xliff tranlation
    <?for-each@section:INVOICE?><?end for-each?>
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    <?start:body?><?call:Header?><?call:Line?><?call:Weights?><?call:Banks?><?end body?><?call:Footer?>
    Prints out fine with Finnish translation
    But if I want in main program to check what language is used e.g.
    if trx_number = 142 call Finnish translation and if trx_number =144,
    call English translation.
    <?for-each@section:INVOICE?><?end for-each?>
    <?if:TRX_NUMBER=’142’?>
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    <?start:body?><?call:Header?><?call:Line?><?call:Weights?><?call:Banks?><?end body?><?call:Footer?>
    <?end if?>
    <?if: TRX_NUMBER=’144’?>
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.US/?>
    <?start:body?><?call:Header?><?call:Line?><?call:Weights?><?call:Banks?><?end body?><?call:Footer?>
    <?end if?>
    Prints out always in English and never the Finnish translation.
    Program goes fine to if branch but does not print out Finnish
    Does anybody know what could be wrong?
    BR
    Kari

    Thanks Amit,
    I have two layout, main-layout and sub-layout
    Main layout call subtemplate
    I have registered layout and xliff-file
    Main template
    Localized Templates
    File Name           Language Territory
    XXNS_INVOICE_MAIN.rtf      English
    SUB template
    Localized Templates
    File Name           Language Territory
    XXNS_INVOICE_SUB.rtf      English
    Translatable Template
    File Name           Language      Territory
    XXNS_INVOICE_SUB.rtf      English      United States
    Available Translations
    Language Territory Progress
    English Finland Complete
    If main report call subtemplate and finish xliff tranlation
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    Prints out fine with Finnish translation
    But if I want in main program to check what language is used e.g.
    if....
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    .....end if;
    if....
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.US/?>
    .....end if;
    Prints out always in English and never the Finnish translation.
    Program goes fine to if branch but does not print out Finnish
    Do you it's set up problem or program problem
    BR
    Kari

  • 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

  • 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

  • I want to make a video where the user can select a film from the main menu and it plays over and over.

    How can I do that? Segmentation Markers? Thanks in advance for answering my noob question.

    The function of looping a media file (i.e. movie) is typically a function of the media player software, it can not be embedded into a movie file.
    As an alternative a video DVD can be programmed during authoring to loop any file (i.e. at end, jump to, start of file)

  • Link subreport to the main report in Crystal

    Hi expert,
    I have a Crystal Report with a row that cointais a Total Field.
    Is possible to add a hypertext link, that open a subreport with all the details?
    Exaple: CardCode: C00001 Account Balance: 14120,50. If i click on the Total of account balance, i open a subreport (linked with the key). Is the same of drill down (perhaps), but I can't use drill down.
    Anybody can help me??
    Regards
    Marco

    Marco,
    try the following:
    make the report into the structure of:
    Group: CardCode
    In the group header delete your group name field, and add your subreport.
    Right click on the subreport, and on format subreport.
    On the subreport tab, there is an option: on demand subreport. Check that in.
    After that you can define a formula ( for example your cardcode ) at On-demand Supreport Caption.
    Hope this helps.
    Regards,
    D

  • Subreports won't show when put inside a tablix in the main report

    I have a main report containing 5 subreports. My ultimate goal is to have a header with an image in it to only show within 2 of the subreports. I'm trying to achieve this by using a tablix and putting all of my subreports into the tablix on the main report,
    and putting the image into the header of the tablix and using a hide/show query based on subreport name.
    The problem is that when I put the subreports into the tablix and upload it to CRM it won't display at all. If I remove the tablix the subreports will run and display perfectly. Can anyone tell me what I'm missing here or an alternative if there is an easier
    way to achieve what I want? 
    Thanks.

    Hi Ssizz,
    Per my understanding your are experiencing the issue with the subreport which added to the tablix not displayed after upload to the CRM, right?
    I have tested on my local environment and try to reproduce your issue but failed.
    The issue can be caused by many factors, could you please try to provided us more details information according to questions below, and we will be more effective to give an solution:
    Did the issue occurred only when your upload the main report to CRM, and Is there any error message,such as "Subreport Could Not Be shown"?
    Did you run to check all the subreports and the main report which include the tablix with the 5 subreports in both the designer and the CRM one by one? Did they all running with no error?
    Did you have add any parameters in the subreport and the main report, if did, please check if all the parameters work fine in the designer.
    You have mentioned that when you remove the tablix, the subreports will run perfectly, Is that mean you put the subreport outside the tablix and have a test then all works fine? in the designer or in the CRM? 
    Please also take reference to the solution of some possible factors:
    1. If you got the error "Subreport Could Not Be shown" only in the CRM and all works fine in the designer, the issue can be caused by the relationship between parent report and sub report got disturbed and CRM doesn't able to link these sub reports.
    From Reports section select the sub report and click on edit
    Remove the value in Parent Report look up field
    Map Parent Report again
    Re-publish the reports. Below steps will help us in publishing the reports again
    Open command prompt on CRM application server
    Go to Microsoft Dynamics CRM\Tools folder
    PublishReports.exe NameOfYourOrg
    Ex: C:\Program Files\Microsoft Dynamics CRM\Tools\PublishReports.exe mytestcrm
    If the above setting still doesn't work, please try to delete both the subreport and main report in CRM and try to upload once again, If it possible, please first redesign the main report in designer.
    Similar thread for your reference:
    http://blog.customereffective.com/blog/2008/07/resolving-error.html
    https://social.msdn.microsoft.com/Forums/en-US/60542d2e-c888-442f-9b8a-5ed779f7e3d9/crm-reports- error-subreport-could-not-be-shown?forum=crm
    Article about details setting with main report and subreport in CRM:
    http://dynamicscrmgirl.wordpress.com/2014/06/29/crm-2013-ssrs-report-and-sub-reports/
    2.  Another alternative method is using an rectangle instead of the tablix to put the subreports, you can use  this to see if the problem still exists.
    Any problem, please feel free to ask.
    Regards
    Vicky Liu

  • 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

  • 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.

  • How to use a subreport field as selection criteria for the main report

    Dear All,
       I created a report with one subreport and im comparing information from both reports but i need to apply selection criteria in the main report using one of the fields in the subreport, the problem is that the subreport field doesnt appear in the select expert screen. By any chance, someone knows how make a subreport field be used by the select expert.
    Thanks,
    Martha Medrano

    Dear Dom,
       I created the subreport table called IIM (748 items) in sql in the main report as you suggested with the below code:
    SELECT "IIM"."IPROD", "IIM"."IDESC", "IIM"."IID"
    FROM   "S102F360"."BPCS405CDF"."IIM" "IIM"
    WHERE   NOT ("IIM"."IDESC" LIKE 'GEN%' OR "IIM"."IDESC" LIKE 'OBS%') AND "IIM"."IID"<>'IZ' AND "IIM"."IPROD" LIKE '3%'
    and i have another table called ITEM_MASTER (3221 items):
    SELECT "ITEM_MASTER"."ITEM_ID", "ITEM_MASTER"."DESCRIPTION"
    FROM   "WHSPRO"."dbo"."ITEM_MASTER" "ITEM_MASTER"
    ORDER BY "ITEM_MASTER"."ITEM_ID"
    and im trying to display all items in the ITEM_MASTER table that are not in the IIM file but i haven't been able to accomplish this, i am using as primary the ITEM_MASTER table with 'Inner Join' as Join Type,  and '!=" as Link Type. Do you have any ideas on how can i display the requested items.
    Thanks for your help

  • TFS Workitems:Bugs : I want ot select different lists, from the global list, for fields basd upon user group

    Hi,
    I am customizing the bug workitem workflow.
     I want ot select different lists, from the gllobal list, for fields basd upon user group
    I am aware that I can use "when" clauses in the allowed/suggested values of the field.
    My question is : how do I get the group(s) that the current user is in and how do use this to select different lists?

    Hi!
    You can not do this through standard way. You must to create the custom work item control:
    http://witcustomcontrols.codeplex.com/
    And get the user group through IIdentityManagementService.
    IIdentityManagementService IdentityService = _workItem.Store.TeamProjectCollection.GetService<IIdentityManagementService>();
    TeamFoundationIdentity _curid = null;
    _workItem.Store.TeamProjectCollection.GetAuthenticatedIdentity(out _curid);
    string _group = "Admin";
    var _gr = IdentityService.ReadIdentity(IdentitySearchFactor.AccountName, _group, MembershipQuery.Direct, ReadIdentityOptions.None);
    if (_gr.Members.Where(s => s.Identifier == _curid.Descriptor.Identifier).Count() > 0) return true;

Maybe you are looking for