Sum of average in report with many joins

hello all.  i have read a few other threads that are similar to my situation but nothing i've found that helps my specific situation.  it is probably in part to my lack of expertise but i am pretty much a newbie here so go easy on me. 
in summary, i have an employee table (em), a rooms table (rm), and an organizational hierarchy table (org_hier).  em and rm tables are joined on the building, floor, and room fields that are in each table.  org_hier table can be linked to either em or rm.
basically i am just trying to take the average area of each room (rm.area). here may be multiple occupants in a room and i don't want rm.area to be counted more than once which is the reason for the average.  i then want a sum of that average at each level of the org hierarchy by using groups and a grand total at the end.  the trick is that i am only looking for rooms that house certain employees, restricted by the em.em_id.  that is the only reason for the em table being included.
would you all suggest using subreports somehow or is there a SQL function that would work best?  let me know if i am being too vague here.  what should my joins be? 
thanks in advance,
js

thanks Sharon.  i think i'm getting closer to what i need.
should i use the same running total in each group or will i need to create a new running total for each grouping?  should the running total evaluate on each record and reset on change of rm.rm_id?  is a manual running total different? 
right now i am getting the right values at the room level but it is totalling all records of the room area at the floor level, not just the one instance.
i can email a screenshot if it is helpful.  thanks for your help so far!

Similar Messages

  • Converting a Crystal Report with Many Sub-Reports into CF Report Builder

    I am trying to rewrite a Crystal Reports report which has 11
    subreports in CF Report Builder. In the CR report, each subreport
    has it's own report footer seciton. I have not been able to find
    anything in CF Report Builder that allows me to do the same. Is CF
    Report Builder capable of producing a report with multiple
    subreports?

    Having successfully created a report with 5 or 6 subreports
    (with each sub-report containing a multiple sub-sub reports) I can
    say with confidence, "Yes you can." However the real question you
    should ask is, "
    Should I create a report with multiple sub-reports in CF
    ReportBuilder?" And the answer to that is.... NO, WHAT ARE YOU
    CRAZY!
    If you have something that works in Crystal Reports I would
    suggest you stick with that. Otherwise you're setting yourself up
    for a lot of headaches. Now maybe it was because I started using
    the report builder that came with MX7, but it seems there are still
    quite of few bugs that will leave you shaking your fist at your
    computer. If however you do continue and do the CF Report Builder
    route, be prepared for your application to crash unexpectedly, and
    for many things to not work they way you expect them to. And if you
    ever need help good luck. Take the fact that you had difficulty
    finding good documentation as a sign of how little Adobe supports
    this product.
    CF Report Builder is fine for very simple reports, but don't
    get fancy with it, you'll only regret your decision in the
    end.

  • Reports with many Dynamic Parameter

    Post Author: Lalit
    CA Forum: Data Connectivity and SQL
    Hi
    I created a report with 5 dynamic parameter in CR XI. There are total 6 SQL command . First one is used for the report purpose and rest is for parameter of the report. There SQL commands are not linked to each other. Performnce of the report is very slow. Data is coming fine on the report. The Command one is returning around 50000 records.
    Paramter are used in record selction to further filter the records
    Please help how i can increase the performance .
    Lalit

    Post Author: yangster
    CA Forum: Data Connectivity and SQL
    eeekwhy don't you create 5 business view objects based on each of your dynamic promptsthis way you can share these parameters in other reports instead of having them all imbedded inside a single reportyou should also be able to schedule the list of values too so they will load faster

  • Interactive Report with many columns scroll possibility?

    Hello,
    i have an interactive report that has many columns. As so they cannot fit into a page and a scroll bar is used in the bottom of screen, which is not a desired effect.
    What i would like to do (if it's possible) is to have a scroll bar before the pager. Up to now i have found a "fix" for this problem but after the pager and it does scroll the rendering of the report but the pagers' also. My solution is to put the following code in the Region Definition, in Header and Footer group, in Header:
    <style type="text/css">
    #apexir_DATA_PANEL {
    clear:both;
    width:1220px;
    height:650px;
    overflow:auto;
    </style>
    That was in 3.2. Is there any other option/possibility or idea now with 4.0 ?
    TIA

    Hi TIA,
    I hope that following link will help you in regards to your query:
    Jon Fortney implemented and blogged on it: http://jfortney.blogspot.com/
    Alternatively, you can use ExtJS Grid or jQGrid functionality.
    This might help, Horizontal Scrollbar required in  Interactive Report
    Regards,
    Bhavin
    Edited by: Bhavin on Nov 16, 2010 4:32 AM

  • Upgraded reports with left join no longer working in Visual Studio 2008

    I've upgraded an ASP.NET project, which has lots of reports, from Visual Studio 2003 to Visual Studio 2008. Any reports that  contain a left outer join relationship no longer work and it's driving me mad as I've spent hours on this now. Basically, the join fails because there's no rows on the right side of the relationship. I'm checking for nulls in the formula's and there's no record selection criteria. The report is pulling data from 2 stored procedures and a couple of tables. Any ideas?

    Hi Ludek,
    Thanks for your reply. I've already applied SP1 and I assumed it worked, but looking at it in depth I'm not so sure. The installer runs and says its configuring windows etc and it l looks like it finishes, but it doesn't display a message to say installation was successful. When I look in the event log there are warnings during the install, I don't know if I should be worried about them. They are as follows:
    Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetEntityDataModelVB_ASPNET.zip), file (ModelObjectItemVB_ASPNET.vstemplate). Invalid template element (TemplateID) value (Microsoft.Data.Entity.Design.VSTemplate.ModelObjectItemVB_ASPNET)
    Error in Template (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetDataServiceVBWebsite.zip), file (WebDataService.vstemplate).  Unknown attribute (_locID).
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    As for the report itself, Its connecting to SQL Server and getting the data from 2 stored procedures and a few tables. There are no errors reported in the report, the only warning we have is when you close the database expert it says:
    "More than one datasource or a stored procedure has has been used in this report. Please make sure that no SQL expression is added and no server-side group-by is performed." We've always had that message and it's never caused any problems before.

  • CRVS2010 Beta - Report with many tables

    Hi,
    I was developing my application first with a test Database with few tables. Now that I am changing to the actual database (with about 200 tables) I noticed that the ReportDocument takes a really long time to load when I tried to access the DataDefinition for the first time.
    Is there one way to avoid this?? The tables are all there because I need to have the option the select the table that I wanna use in the application, but after this I just use the table chosen and the linked tables in the Report.
    thanks

    OK where to start...
    First the act of adding 200 tables, and I assume none of them are linked is the first problem you are going to have. CR is a relational database reporting tool. Not linking tables generates multiple SELECT statements.
    If you only need one or two then use RAS to add the tables and then the fields, Bascially you are creating the report designer for your users. All of the user interface needs to be created by you.
    There may be one option that could help but what you are doing is likely never going to be fast....
    Open regedit32.exe and go to:
    HKEY_CURRENT_USER\Software\SAP BusinessObjects\Suite XI 4.0\Crystal Reports Designer Component\DatabaseOptions
    In there you'll find a key called - DoAutoSmartLinking
    Set the value to No
    What that key does is when a report is open CR tries to link all tables and all fields.
    Good luck
    Don

  • Hide total, but show subtotal in classic report with breaks

    Hi,
    Is it possible to use the sum function for a report with a break, but not display the total sum? I have a financial report with a break on currency. But I don't want to display the total sum, because it is meaningless.
    I don't have a clue how to fix this.
    Jacob

    Hi Jacob,
    I'm not sure of your overall target but perhaps this will help: http://apex.oracle.com/pls/otn/f?p=31517:86:3502666127312777
    Mike

  • Printing large report with Desktop - Scaling?

    Hello,
    given is a report with many cols which should be printed on one sheet of paper.
    I tried menu File --> Page Setup. There is a option "Scale", but it is greyed out. Why? Is it possible to scale the report in Discoverer Desktop?
    Thank you
    Tobias

    This is similar to another thread I just commented on.
    However, if the scale option is greyed out ...
    I remember a few years ago I had this problem and the answer was that Oracle was not handling the actual printing of the document, but used the MS printer info (ie: your Printers setup).
    What I did at the time was - once I found out the printer it was going to supported scaling (ie: can't remember the term for when a printer supports scaling, but is it something like PCL?).
    Anyway, I simply installed the driver for this on the printer I was sending the output to - and voila' ... scaling worked.
    So again, I think it's a printer thing so either redirect output to a printer that has the appropriate driver for scaling, or install the correct driver, etc. to the printer you're going to - again assuming the actual printer supports scaling.
    Russ

  • Apex report with details below for one record

    Hi,
    I'm looking for an answer to my problem:
    We have a report with many columns ~60.
    And is not very user friendly because it is so wide table.
    If it is possible to display some less important columns like additional information below report,
    for single record in report. E.g. user selects radio button from first column and details are refreshed for that record.
    (if it is possible to group details in tabs)
    Thank you for your answers.

    Hi,
    Here is one example
    https://apex.oracle.com/pls/apex/apex/f?p=39006:41
    Create hidden item that is not protected. In my case item name is P41_DEPTNO
    First report query
    select
    APEX_ITEM.RADIOGROUP(1,DEPTNO,:P41_DEPTNO) AS rg,
    EMPNO,
    ENAME,
    JOB,
    MGR,
    HIREDATE,
    SAL,
    COMM,
    DEPTNO
    FROM EMP
    Second report query
    select LOC,
      DNAME,
      DEPTNO
    from DEPT
    WHERE DEPTNO = :P41_DEPTNO
    In second report region set Page Items to Submit your hidden item name.
    Create dynamic action
    - event: Change
    - Selection Type: jQuery Selector
    - jQuery selector: input[name=f01]
    - Action: Set Value
    - Set Type: JavaScript Expression
    - JavaScript Expression: this.triggeringElement.value;
    - Selection Type: Item(s)
    - Item(s): <Your hidden item name>
    Then add another true event to dynamic action
    - Action: Refresh
    - Selection Type: Region
    - Region: <select second report region>
    Regards,
    Jari

  • Right way to preserve all parent table entries in a join with many tables!!

    This problem is quite interesting to me. I have asked this question to others but no body is able to provide me with proper answers.
    The problem is: How do I join a huge parent table with many child tables (more than 5 child tables) preserving all of the parent table entries. Lets say there is the parent table parentTable and three child tables childTable1, childTable2, childTable3. In order to get the data after joining these tables the query that I have been using was:
    select parent.field1, parent.field2, parent.field3, child1.field4, child1.field5, child2.field6, child3.field7 from ParentTable parent, childTable1 child1, childTable1 child2, childTable3 child3 where parent.fielda = child1.fieldb and parent.fieldc = child.fieldd and parent.fielde = child.fieldf.
    Although the tables are huge (more than 100,000 entries), this query is very fast, however those parent table entries which do not have child entries are lost. I know that I can left join a parent table with a child table and then with the next child table and then with the next child table and continue. Isn't there a simple solution for this commonly happening problem?
    Please provide suggestions please...

    Hello Lakshmi,
    Although I do not know exactly how to achieve what you want to achieve but I have seen DBAs/ABAPers in my experience can run queries/scripts using the COUNT function to give the actual number of line items per table for all your 100 or odd tables.
    Rgds
    CONMJI

  • SSRS report with tabular model – MDX query how to get the sum and count of measure and dimension respectively.

    Hello everyone,
    I am using the following MDX query on one of my SSRS report.
    SELECT NON EMPTY { [Measures].[Days Outstanding], [Measures].[Amt] } ON COLUMNS,
    NON EMPTY { ([Customer].[Customer].[Customer Key].ALLMEMBERS) }
    HAVING [Measures].[ Days Outstanding] > 60
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM ( SELECT ( STRTOSET(@Location, CONSTRAINED)) ON COLUMNS
    FROM ( SELECT ( {[Date].[Fiscal Period].&[2014-06]}) ON COLUMNS
    FROM [Model]))
    Over here, the data is being filtered always for current month and for a location that is being selected by user from a report selection parameter.
    I would like to get the count of total no. of customers and sum of the amount measure.
    When I am using them in calculated members it gives incorrect values. It considers all records (ignores the sub-select statements) instead of only the records of current month and selected location.
    I also tried with EXISTING keyword in calculated members but there is not difference in output. Finally, I manage the same at SSRS level.
    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Hi Ankit,
    We can use SUM function and COUNT function to sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension. Here is a sample query for you reference.
    WITH MEMBER [measures].[SumValue] AS
    SUM([Customer].[Customer].ALLMEMBERS,[Measures].[Internet Sales Amount])
    MEMBER [measures].[CountValue] AS
    COUNT([Customer].[Customer].ALLMEMBERS)
    MEMBER [Measures].[DimensionName] AS [Customer].NAME
    SELECT {[Measures].[DimensionName],[measures].[SumValue],[measures].[CountValue]} ON 0
    FROM [Adventure Works]
    Besides, you ask that does it make any difference if I manage it as SSRS level and not at MDX query level. I don't thinks it will make much difference. The total time to generate a reporting server report (RDL) can be divided into 3 elements:Time to retrieve
    the data (TimeDataRetrieval);Time to process the report (TimeProcessing);Time to render the report (TimeRendering). If you manage it on MDX query level, then the TimeDataRetrieval might a little longer. If you manage it on report level, then the TimeProcessing
    or TimeRendering time might a little longer. You can test it on you report with following query: 
    SELECT Itempath, TimeStart,TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
    TimeDataRetrieval, TimeProcessing, TimeRendering, ByteCount, [RowCount],Source
    FROM ExecutionLog3
    WHERE itempath like '%reportname'
    Regards,
    Charlie Liao
    TechNet Community Support

  • I have a report with 2 queries and prompts on same object tell me how many times it request for I/P?

    Hi
    i have a report with 2 queries and prompts on same object tell me how many times it request for I/P? can any one please guide me.
    Regards,
    Mahendra

    Is this question related to Dashboards or webi ?

  • We get many report with same computer in the SCEP alerts.

    Hi,
    We get many report with same computer in the SCEP alerts.
    I have an email sent to support desk for "Malware detection", but same computer ends upp severaltimes long time after it have been cleand with success. I dont have "repeated malware detection" alerts enable.
    So why same alerts reported several times even if it have been removed?
    /SaiTech

    Hi,
    Please refer to the link below:
    How to Configure Alerts for Endpoint Protection in Configuration Manager
    http://technet.microsoft.com/en-us/library/hh508782.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • One-to-Many implemented with a join Table

    Hello,
    Is it possible to implement a One-to-Many relationship with a join table, just like
    the Reference Implementation does.
    Regards,
    Jeroen

    "Jeroen Ferdinandus" <[email protected]> wrote in
    news:[email protected]:
    Is it possible to implement a One-to-Many relationship with a join
    table, just like the Reference Implementation does.Not with our CMP, you will have to resort to BMP for that.
    Cedric

  • Crystal Report with 2 oracle datasources (left outer join) very slow

    I've made a crystal report with 2 oracle datasources (2 commands). I'm using crystal 10.
    These 2 data sources are linked with a left outer join.
    The report takes a while to run (more then one hour).
    i can run Both query's in a couple of seconds/minutes, but it looks like crystal is runniing the second query for each record in the first query.
    When i make the same report in BO. Just 2 queries with merged dimensions in the report, it is taking a couple of minutes to complete the report.
    Question is if somebody knows how crystal is handling these 2 different data sources.
    Is there any way to say to crystal to fetch the data of both queries and do the join after that?
    At the moment it looks like that crystal is going to the other datasource for each record in the first query, which will cost a lot of time.

    Joris,
    I've always had a bad time combining a Command with any other object. Performance seems to drop dramatically, just as you've described.
    I can't tell you specifically why, it falls off so bad...
    The solution I've used is to do a linked  server query (at least that's what it's called in MS SQL Server) I've never used Oracle, but I'd be VERY surprised if it didn't have that same feature. This will keep 100% of the processing on the server(s) and will get your run times back to what you would expect.
    HTH,
    Jason

Maybe you are looking for