Values displayed in report do not match those in underlying data source

hi -- I have a report based on a view. The view contains a date (never null) and several numeric value columns
which can be null. The dates are outer joined to a date table, so even in Feb of 2011, the view will
have a month date for every month of the year, but the other columns are null values for Feb - Dec.
January does have values.
So,  the view data (queried from sqlplus) is correct. However, when that view is queried via a Crystal report, all
data except the date is null -- even for complete years where there's a value for every month.
When I modify the view to replace nulls with 0s, all values (even the ones that are not null / not 0 when querying the view)
are now displayed as 0.
The dates are correct, and the database fields in question are in a details section; I can't figure out what's going on.
Ideas?
Thanks,
Carol

hi Brian -- First, I did try the other suggestion Convert Database Null Values to Default, and that didn't work.
Here's the info you requested:
Crystal Reports version: 12.3.3.812, product type Full
  (I'm pretty sure this whole thing was working a couple of months back; I thought
   maybe I was remembering incorrectly when it started behaving the way it is now.
   I can't recall for sure, but it's possible that my upgrade to SP3 (is that the
   latest one?) and the hotfixes were applied betweeen then and now...I just thought
   of that as I was writing up this response.
Oracle database: same results on 9.2.0.8 and 10.2.0.4
Connection type: I'm not (I don't think) using ODBC.
  My connection type for both databases is Crystal's Oracle Server.
The results in SQLPlus for both queries (the one that returns all
0s and the one that returns all nulls in Crystal) are correct. That is, there
are values where there are supposed to be values, nulls/0s where
there are no values.
I'm sure the problem is with the outer join to the date table. Here's
(part of) the sql for the view definition. Dates_between is a function
that returns a full list of sequential dates from the indicated start date
to the indicated end date, at the interval specified.
select *
from
(select
rep.report_name
REPORT_NAME,
to_char(start_date_time, 'yyyy')
YEAR,
start_date_time
START_DATE_TIME,
round(sum(decode(site_datatype_id, 45110, nvl(value, 0), 0)), 2)
COCHITI_ELEV,
    FROM r_month,
      ref_wa_report rep,
      TABLE(dates_between('01-JAN-2005',TRUNC(sysdate,'yyyy')+366,'month')) dates
    WHERE rep.report_id = 45
    AND date_time       = start_date_time(+)
    GROUP BY rep.report_name,
      dates.date_time
    ORDER BY rep.report_name,
      dates.date_time
When I don't use the date table, and the WHERE clause is as follows, the report
returns the correct data (that is, it actually returns the data that's in the DB).
The problem is that it doesn't return any rows if there isn't any data -- and I need
rows with dates only in that case:
from r_month, ref_wa_report rep
where rep.report_id = 45
group by rep.report_name, start_date_time
order by rep.report_name, start_date_time
The SQL query in Crystal was the same for all 3 different views:
SELECT "WA_45_SEDIMENT_STOR_SJC_VIEW"."START_DATE_TIME", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_ELEV", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_RG_CONT",
"WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_SJC_CONT", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_MONTH_SED", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_ACCUM_SED",
"WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_CONT", "WA_45_SEDIMENT_STOR_SJC_VIEW"."YEAR", UPPER(RTRIM("WA_45_SEDIMENT_STOR_SJC_VIEW"."REPORT_NAME"))
FROM   "ALBHDBA"."WA_45_SEDIMENT_STOR_SJC_VIEW" "WA_45_SEDIMENT_STOR_SJC_VIEW"
ORDER BY "WA_45_SEDIMENT_STOR_SJC_VIEW"."START_DATE_TIME"
I'm including the definition of dates_between below. Sorry, this is a ton of info, but might as well
include it all now!
create or replace
FUNCTION dates_between(start_date_time IN DATE,
                                         end_date_time IN DATE DEFAULT NULL,
                                         interval VARCHAR2 DEFAULT 'day')
RETURN date_array
PIPELINED
end_date DATE := end_date_time;
start_date DATE := start_date_time;
dates date_object := date_object(NULL);
temp_chars VARCHAR2(30);
BEGIN
  IF end_date < start_date THEN
    deny_action('End date must be after start date!');
  END IF;
  BEGIN
    SELECT interval_name
    INTO temp_chars
    FROM hdb_interval
    WHERE interval_name = interval;
  EXCEPTION WHEN others THEN
    deny_action('Dates between function INVALID ' || interval || ' interval');
  END;
  CASE interval
  WHEN 'instant' THEN
    deny_action('Cannot use instant interval in dates_between! Use instants_between.');
  WHEN 'hour' THEN
    IF end_date IS NULL THEN
      end_date := TRUNC(sysdate,   'HH24') + 1 / 24;
    END IF;
    FOR i IN 0 ..(end_date -start_date) *24
    LOOP
      dates.date_time := start_date_time + i / 24;
      pipe ROW(dates);
    END LOOP;
  WHEN 'day' THEN
    IF end_date IS NULL THEN
      end_date := TRUNC(sysdate,   'DD') + 1;
    END IF;
    FOR i IN 0 ..(end_date -start_date)
    LOOP
      dates.date_time := start_date_time + i;
      pipe ROW(dates);
    END LOOP;
  WHEN 'month' THEN
    IF end_date IS NULL THEN
      end_date := TRUNC(sysdate,   'MM');
    END IF;
    /* months_between takes the later date first */
    FOR i IN 0 .. months_between(end_date,   start_date)
    LOOP
      dates.date_time := add_months(start_date,   i);
      pipe ROW(dates);
    END LOOP;
  WHEN 'year' THEN
    IF end_date IS NULL THEN
      end_date := TRUNC(sysdate,   'YYYY');
    END IF;
    /* months_between takes the later date first */
    FOR i IN 0 .. months_between(end_date,   start_date) / 12
    LOOP
      dates.date_time := add_months(start_date,   i *12);
      pipe ROW(dates);
    END LOOP;
  WHEN 'wy' THEN
    IF end_date IS NULL THEN
      end_date := add_months(TRUNC(sysdate,   'YYYY'),   -3);
    END IF;
    /* months_between takes the later date first */
    FOR i IN 0 .. months_between(end_date,   start_date) / 12
    LOOP
      dates.date_time := add_months(start_date,   i *12);
      pipe ROW(dates);
    END LOOP;
  END CASE;
  RETURN;
END dates_between;

Similar Messages

  • Reports are not matching

    Hi,
    There is a reporting problem with one of our projects. We use reports S_ALR_87013542 (Display Actual Cost Line Items for Project) and CN41(Structure Overview). The balance being displayed by these two reports are not matching. Why the different amounts are showing up in these two reports and how do I find out the correct amount which still remains in the Project.
    Your suggestions/inputs will be highly appreciated.
    Regards,
    Bala

    Hi,
    Thanks for your inputs. I have 2 queries here...
    1. Whether the reports S_ALR_87013542 & CN41 are same displaying the same information?
    2. How can I check the Balance amount still remaining in the project? Is there any report?
    Thanks & regards,
    Bala

  • The cumulative balance displayed in FS10N does not match the sum of the det

    Hello,
    The cumulative balance displayed in FS10N does not match the sum of the details.  For example, we have a GL disbursement account that has a ***. Balance of 8 million.  The debit is 2 million and the credit is 10 million. But, when you drill down on the ***. Bal. for the current period, the sum of the details is 9 million.  According to our users, the 2 balances should equal.  I did a search in this forum and found 1 post stating they had the same issue and the answer was to run f.16. Has anyone experienced this and if so, how did you handle it?  I'm not sure how f.16 functions.  Do we have to run it for each consecutive year?  I'm not a FI specialist.  I'm responsible for data archiving and the users think it's related to archiving.  However, we have a test system that was resynced with production prior to when archiving was done and it shows that this issue is pre-existing.
    Thank you very much in advance,
    Lourdes

    Hello,
    There is a possibility that you have activate line item display for some of the accounts at a later stage. Meaning that earlier postings were not be shown for the earlier postings but only totals will be made available. Therefore, obviously there is bound to be difference between line item report and totals report.
    You need to identify which accounts are being changed with line item display at a later stage.
    In case if you forget to keep GL Line item display for an account, but the posting are already made the following steps you would required to get the line item display retrospectively.
    1. Note that you are NOT required to make the balance of that GL account to ZERO. Please do not confuse with Open Item Management.
    2. Put the check box line item display for the account in FS00. Make sure you are entering right company code.
    3. Block the account for posting in COA Segment and Company Code Segment in FS00
    4. Go to SA38 and run program RFSEPA01 (Give correct GL Account and Company Code)
    5. Now, remove the block you kept on the GL Account in FS00.
    This will reset the line item display retrospectively.
    Hope this will solve your problem.
    Regards,
    Ravi

  • New Apple Terms and Conditions do not match those on website

    The new terms and conditions/privacy policy presented in the app store update window for iTunes do not match those currently on the website.
    At least the dates don't match.  The app store shows: "Last Updated:September 30, 2012". The apple website has: "Last Updated: May 23, 2012".
    I don't know what else is different because I can't select text in the app store update window.
    The "Printable Version" link in the app store update window goes to same apple web page which, as I said, doesn't match what's displayed in the scroll box dialog.

    Hey neil1010101,
    I understand you are having issues accepting the Terms & Conditions. If you have not already done so, you may want to restart your iPhone:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    You may also want to make sure cookies are not blocked and private browsing is turned off in Settings > Safari (you can also take this opportunity to Clear Cookies and Data):
    Safari settings - iPhone User Guide
    http://help.apple.com/iphone/7/#/iph3d7aa74dc
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • The creditors report is not matching with the G/L account

    Hi Gurus,
    The creditors report is not matching with the G/L account ,where i can go and find out the differences ?
    Please give me advice,
    I will assign points
    Thanks&Regards,
    Kumar

    Hi Kumar,
    There could be three reasons.
    1. You may have more than one recon accounts for different vendor groups. So, you need to select all the GL accounts when reconcile with Vendor balances.
    2. You may have some special GL transactions, which may post to different reconciliation accounts. Please check Special GL transactions (Down payments so on)
    3. Your vendor recon accounts may be changed after some postings. Please check. If changed, you need to select these GLs also for reconciliation with vendor balances.
    Hope this will help you. If not clear please reply, I will explain you.
    Pl. assign points if useful.
    Thanks

  • Use tax reports do not match

    Use tax reports do not match. One shows the GL account balance using FAGLB03 and the other is the use tax report S_ALR_87012394.  I need to use S_ALR_87012394 to determine the location of the tax and pay it but since it doesnu2019t match with the GL there will be issues.

    Hi,
    Under  these two cases i had found difference between vat reports and vat gl accounts.
    1) When the users are manual input the vat amount on the input invoice , resulting vat amount will be updated on the invoice and gl account BUT not the vat report.To find the these items go to the GL line item report and find the line items with BLANK VAT CODE.usually this will tend to use by the users when there are any rounding differences in the vat calculation. Also to avoid these cases hide the manaul vat amount field blank.
    2) When the users manually inputed the vat amount on the gl accounts, provided GL master are not checked with automatic postings only option.
    Best Regards
    Suresh Addagiri

  • India cash/bank book report is not matching with GL balance

    We have Changed one segment in cash account and cash clearing account for internal petty cash account.
    After changing the segment, Closing balance of India cash/bank book report is not matching with GL balance.
    Please help.
    Regards
    Suresh

    user702249 wrote:
    We have Changed one segment in cash account and cash clearing account for internal petty cash account.
    After changing the segment, Closing balance of India cash/bank book report is not matching with GL balance.
    Please help.
    Regards
    SureshPlease do not post duplicates -- India cash/bank book report is not matching with GL balance.

  • MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source DS_TraceEvents

    Hello,
    On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink.
    A data source has not been supplied for the data source DS_TraceEvents
    SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX)
    1. exec sp_executesql N'SELECT
    dtb.name AS [Name]
    FROM
    master.sys.databases AS dtb
    WHERE
    (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX'
    this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server).
    2. USE [datatbaseX]
    this produces the following error:
    Msg 911, Level 16, State 1, Line 1
    Database 'databaseX' does not exist. Make sure that the name is entered correctly.
    why is the report looking for the database on my server?
    thanks
    Jag
    Environment: MDW (Management Data Warehouse) on SQL 2008 R2

    Hi Jag,
    Based on my test, while this database is offline, we will encounter this issue. This is because that while we click the certain database in “Disk Usage Collection
    Set” report, it will query some information with that certain database. If this database is offline, we will not access this database to acquire related information and generates this error.
    Therefore I recommend that you check the status of this database by using this system view:
    sys.databases. If it is not online, please execute
    the following statements in a new window to make this database to be online:
    USE master
    GO
    ALTER DATABASE <database name> SET ONLINE
    GO
    If anything is unclear, please let me know.
    Regards,
    Tom Li

  • Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of '

    When I deploy the cube which is sitting on my PC (local) the following 4 errors come up:
    Error 1 The datasource , 'AdventureWorksDW', contains an ImpersonationMode that that is not supported for processing operations.  0 0 
    Error 2 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Adventure Works DW', Name of 'AdventureWorksDW'.  0 0 
    Error 3 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed.  0 0 
    Error 4 Errors in the OLAP storage engine: An error occurred while the 'Customer Alternate Key' attribute of the 'Customer' dimension from the 'Analysis Services Tutorial' database was being processed.  0 0 

    Sorry hit the wrong button there. That is not entire solution and setting it to default would work when using a single box and not in a distributed application solution. If you are creating the analysis database manually or using the wizard then you can
    set the impersonation to your heart content as long as the right permission has been set on the analysis server.
    In my case I was using MS Project Server 2010 to create the database in the OLAP configuration section. The situation is that the underlying build script has been configured to use the default setting which is the SQL Service account and this account does
    not have permission in Project Server I believe.
    Changing the account to match the Project service account allowed for a successful build \ creation of the database. My verdict is that this is a bug in Project Server because it needs to include the option to choose impersonation when creating the Database
    this way it will not use the default which led to my error in the first place. I do not think there is a one fix for all in relations to this problem it is an environment by environment issue and should be resolved as such. But the idea around fixing it is
    if you are using the SQL Analysis server service account as the account creating the database and cubes then default or service account is fine. If you are using a custom account then set that custom account in the impersonation details after you have granted
    it SQL analysis administrator role. You can remove that role after the DB is created and harden it by creating a role with administrative permissions.
    Hope this helps.

  • Problem while displaying all the table names from a MS Access Data Source.

    I started preparing a small Database application. I want to display all the Table Names which are in the 'MS Access' Data Source.
    I started to executing by "Select * from Tab" as if in SQL.
    But i got an error saying that "Not able to resolve Symbol 'Tab' in the query".
    Please let me know how can i display all the table Names in the MS Access Dats Source.

    Here i am developing the application in Swing using JDBC for accessing the database.
    I want to display all the Table names from the data source in a ListBox for easy selection of tables to view their details.

  • Not getting connected to a data source in obiee 11g

    Hi friends,
    In OBIEE 11g I cannot able to import meta data into a new repository...
    It is not connecting to data source for importing meta data
    It throws the error like connection is failed....
    I have also restarted the services and also checked for the odbc connectivity it is showing connection is
    successful..
    I also entered the corresponding details in TNS notepad...
    These are the following details
    TEST =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = 172.16.1.110)
    (PORT = 1522)
    (CONNECT_DATA =
    (SID = TEST)
    The data source name that i was given is ORCLBI for my reference...
    Then why it is not getting connecting to the data source..Help me friends For importing tables to my repository as soon as it is connected to the data source...
    Thanks
    Harry...

    Hi,
    Go through venkat reply in this...May help you..Re: Cannot connect to Database from the OBIEE 11g upgraded RPD
    Regards,
    Srikanth

  • Actual cost value in report CJI3 & s_alr_87100185 report is not matching

    Hi,
    We are executing the report CJI3 & s_alr_87100185 for month of December.
    Values in the both reports are not getting matched.
    Please help me...
    Regards,
    Pradip Shelke

    Dear Sam
    While using the standard report CJI3 - Project Information System - Actual Cost, choose the column "Business Transaction" and apply a filter for "Not Equal To" KOAO - Settlement.
    It will display only the actual cost for the project excluding the settlement line items.
    Hope this helps...
    Regards
    Kaashif M

  • Interactive Report download not matching displayed data

    Hi
    I have an interactive report with a simple where clause in:
    select * from table etc
    where a.entry_date > :P2_DATE
    P2_DATE is a select list with redirect, with 2 options. Selecting the first option (the default) should return ~200 rows, the second should return ~800 rows. This functionality works correctly in the interactive report display, however the download to csv option only ever exports the ~200 rows - as if the IR download is fixed to the original query results. I'm using version 3.1.2.00.02.
    Is this a known bug?
    Thanks
    -Marc

    Hi
    Have you tried changing it to a Select List with Submit?
    Typically, this sort of behaviour means that the value selected from the list is not being stored in the session, so the report does not know that value - only the preivious value.
    Also, how are you setting the default? I tend to do this using a page computation (conditional on the item being null)
    Andy

  • Disabled Segment Values Displayed in Report Parameters

    Hi All,
    I have disabled some segment values (by using effective dates) in my Chart of Accounts structure but those
    disabled values are displayed as account parameters when I run the General Ledger report in GL responsibility.
    Is there a way to remove those disabled segment values from the Report parameters?

    I do not think these values can be removed from the report parameters. You should be able to query balances or report on any combinations which is end dated. Ensure that these values are not displayed when you are creating a new transaction.
    Hope this helps.
    Vinit

  • Aging Report does not match Balance Sheet Receivables/Payables Account

    Hi experts,
    I am requesting your help to find out why our customer receivables/vendor payables aging reports total does not match our balance sheet accounts receivable/ accounts payable account for the same period.
    I would expect
    Customer Receivables Aging Report Total = Balance Sheet Accounts Receivables Account
    Vendor Aging Report Total = Balance Sheet  Accounts Payables Account
    Thank you.
    Jane

    When you run the report with an ending/aging date in the past (like the end of last month), if you do not display BP's with zero balances, it will leave out BP's who have a zero balance AT THE TIME YOU RUN THE REPORT.  Some of them may have had a non-zero balance at the end of the month, but they will be left off anyway.  So if a customer owed money on the last day of the month and he paid it on the first of the next month, his balance will not be shown on the report if you run it even one day later.
    I feel this is a design defect in the report, but it is the system behavior.
    Marcia

Maybe you are looking for

  • Iweb comments issue!

    i have an iweb site and am using a third party code for comments as i do not have a MobileMe account for the built in comment system with iweb. and im having an issue... so i use the html snippet widget and all works fine until there are enough comme

  • IPod Touch "No Wi-fi" problem

    Have a problem in my iPod Touch that's driving me crazy, it's about on Settings and is writting in grey "No Wi-Fi" on it, how do I fix it? I've tried everything, cleaning the back up of the iPod, resetting it, moving some musics and deleting it, let

  • Read / Get the link destination name in PDF file by JavaScript

    Is there is any way to read or retrieve the link destination name by the JavaScript? In my document there is more then 100 of link with destination name of the named destination, now I want read all the link and retrieve the destination name in the l

  • Setting final Instance variables in Child Classes

    Hello: Is it possible to declare (not initialize) a final variable in an abstract parent class and set it in a non-abstract child class. An example for clarification. I have an abstract parent class (call it P) and two child classes (call them (C1 an

  • ABAP Memory Validity Period

    Hi All,           I am exporting a value to ABAP memory using EXPORT nametab FROM it_error_messg TO MEMORY ID mem_id_export. Now after reading the value I am unable to clear free the memory as the control comes multiple times i.e., in a loop. I think