Select where in (select ...) in the main report

<p>I have 3-tables and one report with one subreport:</p><p> My first table is a lookup table of locations, the second table is the crash information, and the 3rd table is the vehicles involved in the crash.</p><p> In the main part of the report I have the locations and crash tables.  In the subreport I have the vehicle information.  <em>(One crash has many Vehicles)</em></p><p> I would like to select the records on the main report based on the child records (see below SQL stmt.)</p><p>SELECT locations.mp, locations.county, crashes.numberofdrivers, crashes.lane FROM locations,crashes where crashes.id IN (select * from vehicles where vehicle.type = "Trailer")</p><p> How do I create a Report->Selection Formulas->Record to mimic the SQL stmt.?</p><p>&#160;</p>

Command Object

Similar Messages

  • 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

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

  • Dynamic selections for the FBL5N report

    Hi Experts,
    Can any body help how to add the account assignment group field in dynamic selections for the FBL5N report.
    rgds / Srini

    Hi Alex,
    Thanks for your quick response, here for the report FBL5N the logical database is DDF and the field which should be add in dynamic selection is (KTGRD) account assignment group is available in KNVV table but this table is not available in DDF logival database.
    Please suggest us how we can pickup this field into the report FBL5N for dynamic selections.
    regards / Srini

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

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

  • 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

  • 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

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

  • 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

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p> </p>

    <p>You can do a couple of things - one would be to pass the information using the data linking expert.  Right click on the subreport, choose &#39;Change Subreport Links&#39; and select the field(s) you are wanting to pass to the subreport.  CRW will build parameters and a record selection formula for you in the subreport, and if that&#39;s what you want, then great.  But you can also remove the selection formula from the subreport and work with the parameter fields in the subreport however you would like.</p><p>Alternatively, you can look to passing Shared variables back and forth from the main and subreport.  this link talks about the method to do this: http://diamond.businessobjects.com/node/251</p><p> </p>

  • 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

  • Where do I find the main.db File?

    Sorry to be a pain, can you please tell me where do I find the main db file in skype?
    I wrote :
    Surely someone who works for Skype knows the answer, I can't log in to Skype until I update it and I don't want to lose the conversations that are in text. How about people that have already updated, did you lose the text conversations? Thank you
     Ruwim wrote:
    Updates do not remove your chat history. If you want to be 100% sure not loos the chat history, then you can make a copy of the main.db database file:

    Teenah.c wrote:
    Hi there, I'm trying to save my conversation history and I understand that I can do that by copying the main.db file , however when I try to open it, it's asking to select the appropriate program file. I would like to open the chat history in word or other, can someone help pls.
    main.db is a standard SQLite 3 database file, and you can open this file using a SQLite browser. There are several such applications available for download on the web. A browser, that is especially designed to view chat messages saved in the main.db file is the free SkypeLogView application:
    http://www.nirsoft.net/utils/skype_log_view.html

  • 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

  • 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

Maybe you are looking for

  • Unable to create virtual folder. Too many folders

    Hi, We are getting this error while trying to create new folder in UCM (even trying directly from UCM throws same error) oracle.stellent.ridc.protocol.ServiceException: Unable to create virtual folder. Too many folders Has anyone experienced this? If

  • Book with Table of Contents and Index

    I want to write a genealogical book over 100 pages long, including photos, charts, and lots of text. My last book was on a PC using Adobe PageMaker, and I liked its ability to create a Table of Contents and an Index, both of which adjusted automatica

  • I cant connect my TomTom to my Iphone 4 via blue tooth.

    I was told it is because of the lack of Bluetooth DUN??  Does anyone know when this will be corrected or a way to get around it without jailbreaking my phone?

  • Lucene Bottom N type report

    I have a requirement to write a report which shows the least occurances of some events. I have found example of Top N type reports, but is it possible to reverse the order to get Bottom N report in lucene? For Top N we have following: GROUP BY $P{Eve

  • Keynote to PC

    is it possible to make a keynote presentation and download it on a flash drive and then plug the flash drive back into a PC and play the presentation