Report on date parameters bipublisher 10g

Hi,
We have a report and we have date parameters to be passed to the report. We were able to generate it.
Our requirement is, if we select dates then the report should be generated based on given dates. If we didnt select the dates, the report should come for all the dates.
Thanks.

where
and (parameter_date is null or parameter_date between date1 and date2) --1 may be
and (parameter_date is null or parameter_date = date3) --2 may be
and (parameter_date is null or trunc(parameter_date) = trunc(date4)) --3 may be
and date5 = nvl(parameter_date, date5) --4 may be
...choose appropriate for you

Similar Messages

  • Date Parameters in Report

    Hello,
    I am using the Where property of an Open Report for date parameters.  There are reason i can not use the query criteria process.
    Can I do this with more than one parameter?
    Private Sub EligibilityReportPreview_Click()DoCmd.OpenReport "EligibilityRpt2",acViewPreview,,"effective_date >= LowEffectiveDate And effective_date <= HighEffectiveDate"End Sub
    How do add another parameter like
    DoCmd.OpenReport "EligibilityRpt2", acViewPreview, , "effective_date >= LowEffectiveDate And effective_date <= HighEffectiveDate"
    Or "termination_date >= LowTerminationDate And termination_date <= HighTerminationDate"
    Gee

    If all names referred to are fields in the record source of the report, you can use
    DoCmd.OpenReport "EligibilityRpt2", acViewPreview, , "effective_date >= LowEffectiveDate And effective_date <= HighEffectiveDate Or termination_date >= LowTerminationDate And termination_date <= HighTerminationDate"
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Report painter -output parameters,Data source,Extract parameter, report

    Hi expert,
    1)What report painter -output parameters,Data source,Extract parameter, report mean for and what are the difference?
    2)I have create new report painter and transport to  Test server using T-code:GCTR and I find that the T-code always point to old report. As I had check the SE93 the D_SREPOVARI-REPORT is point to report group.Why this happen?
    3) Does creation of new report or modification of the report always need to select the extraction option so that it will able to display the relected changes? Because, I have done modification on the report but it is not reflected the changes even i save until i have to create the extraction is able to display the report but every time i run the report need to select the extraction with option to choose new extract or old. Kindly advice how to save and create the report painter and save will display reflected result .
    Please help

    Hi BR Christian,
    Thank you for the prompt reply.
    I have few querys as below:
    1)Do we every time create new report by copying the existing report painter need to select output parameter, data source and extract parameter in order to be able to display the new report?
    2)when modify existing report painter and save it do we need to select output parameter, data source and extract parameter in order to be able to display the modify report correctly?
    3) What are the different between right click copy the report inreport painter compare with create report painter with copy GRR1?
    4) What are the T-code for modify the report group?
    5) When I create a new report with the right click copy in GRR1 and modify the report painter column only and everything remain the same just the report name different why when execute the report it always appear in the selection screen with report button which have option button to select the 2 version  of report which one is the destination report that I copy from and one is the new report? How to set the report when execute will only display the new report only without need to select the option with just new report only?
    6)For transferring reports you can use GR37 (export) and GR38 (import) can be use to transport from one client to another client? What is difference between GR37 compare with  GCTR?
    7) If I use GR37 and GR38 it is mean no need to create the transport request which as usual we create transport se10?
    we can directly import to another client ussing GR38?
    8)When we create a new report with copy with the existing report with just modify the report colunm and the report name difference only what are the setting example: report,report group need to be selected to be include to export/transport to another client?
    9) What are the difference between library and report group?
    10) Can we set Se93 to execute only report not report group? How?
    11) when using GR37 to transport it is also include the report group,library and the particular report?
    12) Can I include the variable in the column header to display fiscal year which I have selected from the selection screen?
    How and which variable should i use?
    please help.
    many thanks
    Edited by: KH on Jun 18, 2011 6:52 AM
    Edited by: KH on Jun 18, 2011 6:55 AM
    Edited by: KH on Jun 18, 2011 7:06 AM

  • Controling Date Parameters using SRW.DO_SQL in Reports!

    Hello Friends,
    I Need to Control the Date Parameters in Reports.
    (Dev/2000 rel2.1) In SRW.Do_SQL package
    For Example:
    'Insert into x
    select * from Y
    where Y.date between f_date and t_date';
    Here: X,Y are two tables
    f_date and t_date are two different date parameters in
    format (dd-mm-yyyy).
    NOTE: Without these two date parameters, the Query is working
    fine. But I need to Use these Parameters. Could You Please find a
    solution for Me. Thanks in advance.
    Regards
    Manoj (India)
    (Dt:18thNov'99)
    null

    Manoj (guest) wrote:
    : Hello Friends,
    : I Need to Control the Date Parameters in Reports.
    : (Dev/2000 rel2.1) In SRW.Do_SQL package
    : For Example:
    : 'Insert into x
    : select * from Y
    : where Y.date between f_date and t_date';
    : Here: X,Y are two tables
    : f_date and t_date are two different date parameters
    in
    : format (dd-mm-yyyy).
    : NOTE: Without these two date parameters, the Query is working
    : fine. But I need to Use these Parameters. Could You Please
    find a
    : solution for Me. Thanks in advance.
    : Regards
    : Manoj (India)
    : (Dt:18thNov'99)
    Hi Manoj
    your goal is to supply all three as dates (y.date, f_date,
    t_date). if some of them are not date but char, varchar, ...
    then use to_date conversion function with proper format mask.
    hope this helps.
    null

  • Default date parameters to trunc(sysdate,'IW') in BI Pub Reports 11G

    Hi All,
    I have a requirement to default the date parameters in the BI Pub Report to the following when the reprot is scheduled to run.
    Start Date - Trunc(sysdate,'IW') - 8
    End date - Trunc(sysdate,'IW') - 2
    Steps followed:
    1. I have created 2 Date parameters in the data model as :P_START_DATE and :P_END_DATE.
    2. Created one data set with the query select Trunc(sysdate,'IW') - 8 "P_START_DATE" ,                                 Trunc(sysdate,'IW') - 2   "P_END_DATE
    I have used the same names for the dates so that they are referenced, but its not working as expected.
    Is there any other step i need to follow so that when i run the report from the dashboard, these default values populate which should be editable also.
    Can anyone please help.
    Thanks &Regards
    Geetha

    Hi Neeraj
    Not null parameters are not supported in the current release. All you could do it either default a value in there for the user - check the doc for details. Or drop a msg into the report if that value was null and not return any data. The second is not great I admit :0)
    Tim

  • How to have date parameters nullable in fetch xml crm report

    Hi All ;
    Below is my report parameter query
    <fetch distinct="true" mapping="logical">Date.getTime()
    <entity name="new_programmeoutput">
    CrmDateTime @Search = new CrmDateTime { Value = String.Format("{0:MM/dd/yyyy}", DateTime.Now) };
    CrmDateTime @Search1 = new CrmDateTime { Value = String.Format("{0:MM/dd/yyyy}", DateTime.Now) };
    <attribute name="new_claimdate" />
    <filter type ="and">
    <condition attribute="new_claimdate" operator="ge" value="@Search" />
    <condition attribute="new_claimdate" operator="lt" value="@Search1" />
    </filter>
    <order attribute="new_claimdate" />
    </entity>
    </fetch>
    which works fine if the start date and the end date is entered
    but if the start date and end date is made null ... it doesn't display any values
    In fact if these ( start date and end date)parameters are made null i need to display all the values in the report irrespective of the date parameters
    Any help much appreciated
    Thanks
    Pradnya07

    Unfortunately, not works :(
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
    <entity name="activitypointer">
    CrmDateTime @dFrom = new CrmDateTime { Value = String.Format("{0:dd.MM.yy}", DateTime.Now) };
    CrmDateTime @dTo = new CrmDateTime { Value = String.Format("{0:dd.MM.yy}", DateTime.Now) };
    <attribute name="activitytypecode" />
    <attribute name="subject" />
    <attribute name="statecode" />
    <attribute name="prioritycode" />
    <attribute name="modifiedon" />
    <attribute name="activityid" />
    <attribute name="instancetypecode" />
    <attribute name="community" />
    <attribute name="regardingobjectid" />
    <attribute name="stageid" />
    <attribute name="ownerid" />
    <attribute name="modifiedby" />
    <attribute name="createdon" />
    <attribute name="actualstart" />
    <attribute name="actualend" />
    <attribute name="actualdurationminutes" />
    <order attribute="modifiedby" descending="false" />
    <order attribute="modifiedon" descending="false" />
    <order attribute="activitytypecode" descending="false" />
    <filter type="and">
    <condition attribute="modifiedon" operator="on-or-after" value="@dFrom" />
    <condition attribute="modifiedon" operator="on-or-before" value="@dTo" />
    </filter>
    </entity>
    </fetch>
    when run report, receive error:
    The date-time format for 22.01.2015 0:00:00 is invalid, or value is outside the supported range.
    Default values are correct (=22.01.15).
    No any limitations on values

  • Passing 2 date parameters in report

    I have to create a report in such a way that ...i have to pass 2 date parameters to get the report..
    For example..
    I get report parameter pagein reports and then I enter the parameter
    Parameter1: 27-MAY-10
    Parameter2: 30_JUN-10
    and then i click RUN REPORT
    can any1 help me out how to pass this parameter in report... i am stuck at this point
    NOTE: I want to use the parameter form feature in report builder....

    @ Sarah
    what you do is to call a refort from a form. i think it is not what Suhail want.
    @ Suhail
    if i understand, you want to pass the parameters from the parameterform your report to the report.
    i think you must create a parameterform and save it als html like this:
    To create a simple Parameter Form in HTML:
    1. In a text editor or HTML editor, create an HTML page that contains a form. The
    form should contain a list of values, a field, and a button. The code for this form
    can look something like the following:
    <form name="form1" method="post" action="*NAME_form.jsp*">
    <h2>Parameter Form</h2>
    <input id="connect" type="hidden" name="userid" value="*hr/hr@db-connect*">
    <input type="hidden" name="destype" value="*cache*">
    <input type="hidden" name="desformat" value="*html*">
    <br> Date_beginn: <input type="text" name="Date Beginn" value="">
    <br> Date_end: <input type="text" name="Date end" value="">
    <input type="submit" name="Submit" value="Run Report">
    </form>
    you can save this code als .html.
    Now you can open the code in the report builder and save it als .jsp.
    you can yet start with the copilation of the report.
    i hope this code will help you.

  • SSRS 2012 SP2, Native / Report Manager, non-IE browsers show date parameters in US format MM/DD/YYYY, ignoring locale settings

    I have a server running SSRS 2012 SP2, in Native / Report Manager mode. The server, reports, desktop etc are all set to en-AU.
    Using IE, date parameters show as expected in DD/MM/YYYY format.  However using Chrome or Firefox, they show in US format MM/DD/YYYY.
    Does anyone know how to fix this?

    Hi Jiri,
    Thanks for that speedy tip - that has solved it for Chrome.
    I followed a similar path to get it fixed for Firefox - Settings / Content / Languages / add English/Australia [en-au] / Move Up to top spot.
    Mike

  • Compare Date Parameters on Report Viewer

    Visual Studio 2010 (VB.NET)
    Crystal Reports 2010
    I have two date parameters in my report viewer (Start and End dates). When the user clicks the "Apply" button in the parameter panel is there any way to display a dialog box if the Start date is after the End date?
    I don't see any event for the "Apply" button, just the "Refresh" button (the ReportRefresh event).

    I actually got a hack job workaround to get this to work without having to write my own parameter panel or edit any of my 150+ reports:
    At the form load I can loop through the controls in the crystal viewer until I find the toolbar that holds the "Apply" button and add an event handler to it's ButtonClick event.
    I am using VB.NET:
    'Because there is no event handler for the "Apply" button in the parameter panel,
    'loop through the controls until we find the toolbar that holds that button. We can then
    'add an event handler to the button click event so we can check if the "Apply" button is clicked.
    For Each ctl As Control In CurrentCrystalReportViewer.Controls
        If ctl.Name = "InteractiveParameterPanel" Then
            'This control is the parameter panel
            For Each subCtl As Control In ctl.Controls
                If TypeOf subCtl Is Windows.Forms.ToolBar Then
                    'This controls is the toolbar that holds the "Apply" and "Delete" parameter buttons
                    Dim parmTool As ToolBar = subCtl
                    'add event handle so we can catch when a button is clicked
                    AddHandler parmTool.ButtonClick, AddressOf ParmToolBar_ButtonClick
                    Exit For
                End If
            Next
        End If
    Next
    When the "Apply" button is clicked this event will then be called:
    Private Sub ParmToolBar_ButtonClick(ByVal sender As Object, ByVal e As ToolBarButtonClickEventArgs)
            If e.Button.Text = "Apply" Then
                'check if there are date parameters
                If CurrentCrystalReportViewer.ParameterFieldInfo.Count > 0 Then
                      'loop through and find the start and end date parameters to compare the dates.
                End If
            End If
    End Sub

  • How to display the SQL query's date parameters to the report

    Hi all,
    I'd like to take the date parameters that are contained in my query and have them appear on the report and/or have the sysdate appear on the report. Any ideas on how to do this? Thanks!

    Hi..
    To display parameters which are part of SQl Query in the output..
    http://blogs.oracle.com/xmlpublisher/2008/07/where_are_the_parameter_values.html
    HTH..

  • Trigger a SQL Reporting Service Data Alert when a SharePoint List is updated & need to pass parameters to report

    We have been able to get a SSRS Data Alert to trigger a report to be emailed whenever an item is added to a specific SharePoint List.   The report can accept parameters but would like to be able to pass parameters that are used in the report.   
    Is this possible? (I cross posted over at SharePoint dev. and was referred here)
    Thanks
    Νικοσ Γιαννιοσ

    Hi Nikos,
    Based on my understanding, you have deploy a parameter report to SharePoint site, then you have created a data alter for this report. Then you want to pass parameters to report then send alter, right?
    In Reporting Services, if the report has parameters, we should select values for the parameter, after report display, we can create a new data alter. Otherwise, the New Data Alter button is grayed out in the drop-down list of the Action button. So that the
    rule is created based on the filtered report. Please refer to below screenshot:
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Report showing data only when preview in Eclipse is executed

    Hi people,
    I intend to do a dynamic report sending two parameters and displaying on browser.
    My application runs under Coldfusion 9 and i'm using Java Reporting Component for report generation and Crystal Reports Design for Eclipse 2.0 for design and Oracle 10g database.
    In first preview it shows the parameter window and after confirmation the report is generated. But when i preview again the report is generated with the older data. It seems that the data in the first execution is cached.
    In Coldfusion execution the report appears in browser when the value on the line parameter.setCurrentValue("","Pessoa",value); is the same used in preview. After change this an generic exception Error loading JDBC driver. Class 'oracle.jdbc.driver.OracleDriver' not found is throwed.
    The Coldfusion code is below.
    <cfscript>
         byteRead                    =     '';
         exportFormat               =     createObject('java','com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat').PDF;
         reportBuffer               =     createObject('java','java.io.ByteArrayOutputStream');
         reportDocument               =     createObject('java','com.crystaldecisions.reports.sdk.ReportClientDocument');
         reportParameter               =     createObject('java','com.crystaldecisions.reports.sdk.ParameterFieldController');
         printOutputController     =     createObject('java','com.crystaldecisions.reports.sdk.PrintOutputController');
         connInfo                    =     createObject('java','com.crystaldecisions.sdk.occa.report.data.ConnectionInfo');
         reportPath                    =     expandPath('report/DividasPessoas.rpt' );
         reportDocument.open(reportPath, 0);
         parameter = reportDocument.getDataDefController().getParameterFieldController();
         parameter.setCurrentValue("","Credor","1");
         parameter.setCurrentValue("","Pessoa","226426");
         printOutputController = reportDocument.getPrintOutputController().export(exportFormat);
         reportDocument.close();
         do{
              byteRead = printOutputController.read();
              reportBuffer.write(byteRead);
         }while( printOutputController.available() NEQ 0 );     
         reportBuffer = reportBuffer.toByteArray();
    </cfscript>
    <cfheader name="content-length" value="#ArrayLen(reportBuffer)#" />
    <cfheader name="content-disposition" value="inline;filename=Report.pdf" />
    <cfcontent type="application/pdf" variable="#reportBuffer#" />
    I googled a lot about the problem, reviewed all Eclipse options to disable the "cache" but everything was unsuccessful.
    I don't know if missing code is causing this or another component that i need to use.
    Any suggestions?
    Thanks everybody for attention and sorry for english errors.
    Ian

    Hi,
    Regarding your query that when you preview a report that has parameters in it, the prompts daillog box comes when you first preview the report.when you again preview you get the old values again.
    For this there is a refresh button, click on refresh, it will again promt you for parameters.
    Thanks
    Prithvi

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • How can I reference records outside the two date parameters?

    Hi all,
    I have a query that fetches records based on the two date parameters defined (Startdate and Enddate).
    If the Startdate is 2014-12-01 and the Enddate is 2014-12-12, I want to pull records outside these two date parameters, that is      2014-09-01 and 2014-11-30.
    I want to add up the records from  2014-09-01 and 2014-11-30 and include them in one of the columns in my report.
    I tried using this query:
     SUM(CASE WHEN FilteredIncident.Statuscodename IN ('QUEUED', 'ASSIGNED') AND (EnteredOn >= '2014-09-01' AND EnteredOn<= @StartDate) THEN 1 ELSE 0 END) AS OpenRecords
    Please help with any ideas..thanks

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you probably need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    There is no such crap as a “status_code_name” in RDBMS. It has to be a “<something in particular>_status”; think about how silly that data element name is! Want to keep going and have a “status_code_name_value_id”? LOL! 
    The name “Filtered_Incident” is also wrong. Tables are sets, so unless you have only one element in this set, the table name should be a plural or (better) collective name. But a better question is why  did you split out “Filtered_Incidents” from “Incidents”?
    Would you also split “Male_Personnel” and “Male_Personnel” from “Personnel”? 
    Get a book on data modeling and learn some basics. 
    >> I have a query that fetches records [sic: rows are nor records] based on the two date parameters defined (report_start_date and report_end_date). If the report_start_date is 2014-12-01 and the report_end_date is 2014-12-12, I want to pull records [sic]
    outside these two date parameters, that is 2014-09-01 and 2014-11-30. I want to add up the records [sic] from 2014-09-01 and 2014-11-30 and include them in one of the columns in my report. <<
    Having no DDL and no sample data makes this hard. Does your boss make you program without any documentation, DDL, etc? This spec is vague; you say to do a total, but show a count, etc. 
    One of the many nice things about DATE data types is that the BETWEEN predicate works with them, so you can quite writing 1960's BASIC predicates with primitive logic operators. 
    Here is a guess: 
    SELECT SUM(CASE WHEN incident_date BETWEEN '2014-09-01' 
               AND @report_start_date THEN 1 ELSE 0 END)
           AS open_record_cnt 
      FROM Incidents
     WHERE incident_status IN ('QUEUED', 'ASSIGNED')
        AND incident_date <= @report_end_date; 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • AWR Report - no data!!

    Oracle Version: 11.1.0.7 64x
    OS Version: Windows 2008 Server 64x
    Hi There,
    We're just trying to generate a awr report for one of our databases and the report is coming out with no data.
    statistics_level parameter is set to "TYPICAL"; any idea to what's going on please?
    Thanks
    SQL>
    SQL> @?/rdbms/admin/awrrpt.sql
    Current Instance
    ~~~~~~~~~~~~~~~~
       DB Id    DB Name      Inst Num Instance
    1391811405 WEBTST              1 webtst
    Specify the Report Type
    ~~~~~~~~~~~~~~~~~~~~~~~
    Would you like an HTML report, or a plain text report?
    Enter 'html' for an HTML report, or 'text' for plain text
    Defaults to 'html'
    Enter value for report_type: text
    Type Specified:  text
    Instances in this Workload Repository schema
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       DB Id     Inst Num DB Name      Instance     Host
    * 1391811405        1 WEBTST       webtst       WEBDBTST
    Using 1391811405 for database Id
    Using          1 for instance number
    Specify the number of days of snapshots to choose from
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Entering the number of days (n) will result in the most recent
    (n) days of snapshots being listed.  Pressing <return> without
    specifying a number lists all completed snapshots.
    Enter value for num_days: 1
    Listing the last day's Completed Snapshots
                                                            Snap
    Instance     DB Name        Snap Id    Snap Started    Level
    webtst       WEBTST           43973 12 May 2011 00:00      1
                                  43974 12 May 2011 01:00      1
                                  43975 12 May 2011 02:00      1
                                  43976 12 May 2011 03:00      1
                                  43977 12 May 2011 04:00      1
                                  43978 12 May 2011 05:00      1
                                  43979 12 May 2011 06:00      1
                                  43980 12 May 2011 07:00      1
                                  43981 12 May 2011 08:00      1
                                  43982 12 May 2011 09:00      1
                                  43983 12 May 2011 10:00      1
                                  43984 12 May 2011 11:00      1
                                  43985 12 May 2011 11:02      1
    Specify the Begin and End Snapshot Ids
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Enter value for begin_snap: 43984
    Begin Snapshot Id specified: 43984
    Enter value for end_snap: 43985
    End   Snapshot Id specified: 43985
    Specify the Report Name
    ~~~~~~~~~~~~~~~~~~~~~~~
    The default report file name is awrrpt_1_43984_43985.txt.  To use this name,
    press <return> to continue, otherwise enter an alternative.
    Enter value for report_name:
    Using the report name awrrpt_1_43984_43985.txt
    WARNING (-20023)
    ORA-20023: Missing start and end values for time model stat: parse time elapsed
    WARNING (-20023)
    ORA-20023: Missing start and end values for time model stat: DB CPU
    WARNING (-20016)
    ORA-20016: Missing value for SGASTAT: free memory
    WARNING (-20016)
    ORA-20016: Missing value for SGASTAT: free memory
    WARNING (-20009)
    ORA-20009: Missing System Statistic logons current
    WARNING (-20009)
    ORA-20009: Missing System Statistic logons current
    WARNING (-20009)
    ORA-20009: Missing System Statistic opened cursors current
    WARNING (-20009)
    ORA-20009: Missing System Statistic opened cursors current
    WARNING (-20023)
    ORA-20023: Missing start and end values for time model stat: sql execute elapsed
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter undo_management
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter db_block_size
    WARNING (-20016)
    ORA-20016: Missing value for SGASTAT: log_buffer
    WARNING (-20023)
    ORA-20023: Missing start and end values for time model stat: DB time
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter timed_statistics
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter timed_statistics
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter statistics_level
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter statistics_level
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter sga_target
    WARNING (-20008)
    ORA-20008: Missing Init.ora parameter pga_aggregate_target
    WARNING (-20023)
    ORA-20023: Missing start and end values for time model stat: background cpu time
    WARNING (-20023)
    ORA-20023: Missing start and end values for time model stat: background elapsed
    WARNING (-20023)
    ORA-20023: Missing start and end values for time model stat: connection manageme
    WARNING (-20016)
    ORA-20016: Missing value for SGASTAT: buffer_cache
    WARNING (-20016)
    ORA-20016: Missing value for SGASTAT: buffer_cache
    WARNING: Since the DB Time is less than one second, there was
             minimal foreground activity in the snapshot period.
             Some of the percentage values will be invalid.
    WORKLOAD REPOSITORY report for
    DB Name         DB Id    Instance     Inst Num Startup Time    Release     RAC
    WEBTST        1391811405 webtst              1 29-Apr-11 04:50 11.1.0.7.0  NO
    Host Name        Platform                         CPUs Cores Sockets Memory(GB)
    WEBDBTST         Microsoft Windows x86 64-bit                           .00
                  Snap Id      Snap Time      Sessions Curs/Sess
    Begin Snap:     43984 12-May-11 11:00:01
      End Snap:     43985 12-May-11 11:02:00
       Elapsed:                1.98 (mins)
       DB Time:                0.00 (mins)
    Cache Sizes                       Begin        End
    ~~~~~~~~~~~                  ---------- ----------
                   Buffer Cache:MM  Std Block Size:K
               Shared Pool Size:         0M         0M      Log Buffer:K
    ORA-01403: no data found
    Error encountered in Report Summary
    Continuing to Report Sections
    Time Model Statistics              DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Operating System Statistics         DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Operating System Statistics - DetailDB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Foreground Wait Class               DB/Inst: WEBTST/webtst  Snaps: 43984-43985
    -> s  - second, ms - millisecond -    1000th of a second
    -> ordered by wait time desc, waits desc
    -> %Timeouts: value of 0 indicates value was < .5%.  Value of null is truly 0
    -> Captured Time accounts for %  of Total DB time            .00 (s)
    -> Total FG Wait Time:    (s)  DB CPU time:            .00 (s)
                                                                      Avg
                                          %Time       Total Wait     wait
    Wait Class                      Waits -outs         Time (s)     (ms)  %DB time
    DB CPU                                                     0              100.0
    Foreground Wait Events             DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Background Wait Events             DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Wait Event Histogram               DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Service Statistics                 DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Service Wait Class Stats            DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by Elapsed Time        DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by CPU Time            DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by Gets                DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by Reads               DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by Executions          DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by Parse Calls         DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by Sharable Memory     DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    SQL ordered by Version Count       DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Instance Activity Stats            DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Instance Activity Stats - Absolute ValuesDB/Inst: WEBTST/webtst  Snaps: 43984
                      No data exists for this section of the report.
    Instance Activity Stats - Thread ActivityDB/Inst: WEBTST/webtst  Snaps: 43984-
                      No data exists for this section of the report.
    Tablespace IO Stats                DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    File IO Stats                      DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Buffer Pool Statistics             DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Instance Recovery Stats             DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Buffer Pool Advisory                       DB/Inst: WEBTST/webtst  Snap: 43985
                      No data exists for this section of the report.
    PGA Aggr Summary                   DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    PGA Aggr Target Stats               DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    PGA Aggr Target Histogram           DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    PGA Memory Advisory                        DB/Inst: WEBTST/webtst  Snap: 43985
                      No data exists for this section of the report.
    Shared Pool Advisory                      DB/Inst: WEBTST/webtst  Snap: 43985
                      No data exists for this section of the report.
    SGA Target Advisory                        DB/Inst: WEBTST/webtst  Snap: 43985
                      No data exists for this section of the report.
    Streams Pool Advisory                      DB/Inst: WEBTST/webtst  Snap: 43985
                      No data exists for this section of the report.
    Java Pool Advisory                         DB/Inst: WEBTST/webtst  Snap: 43985
                      No data exists for this section of the report.
    Buffer Wait Statistics              DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Enqueue Activity                   DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Undo Segment Summary               DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Undo Segment Stats                  DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Latch Activity                     DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Latch Sleep Breakdown              DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Latch Miss Sources                 DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Mutex Sleep Summary                 DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Parent Latch Statistics            DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Child Latch Statistics              DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Segments by Row Lock Waits         DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Segments by ITL Waits               DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Segments by Buffer Busy Waits       DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Dictionary Cache Stats             DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Library Cache Activity              DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Memory Dynamic Components          DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Memory Resize Operations Summary    DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Memory Resize Ops                   DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Process Memory Summary             DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    sum
    SGA breakdown difference            DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Streams CPU/IO Usage               DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Streams Capture                     DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Streams Apply                       DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Buffered Queues                     DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Buffered Subscribers                DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Rule Set                            DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Persistent Queues                   DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Persistent Subscribers              DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    Resource Limit Stats                      DB/Inst: WEBTST/webtst  Snap: 43985
                      No data exists for this section of the report.
    init.ora Parameters                DB/Inst: WEBTST/webtst  Snaps: 43984-43985
                      No data exists for this section of the report.
    End of Report

    SQL> show parameter statistics
    NAME                                 TYPE        VALUE
    optimizer_use_pending_statistics     boolean     FALSE
    statistics_level                     string      TYPICAL
    timed_os_statistics                  integer     0
    timed_statistics                     boolean     TRUE
    SQL>
    SQL> SELECT statistics_name,
      2             session_status,
      3             system_status,
      4             activation_level,
      5             session_settable
      6      FROM   v$statistics_level
      7      ORDER BY statistics_name;
    STATISTICS_NAME                                                  SESSION_ SYSTEM_S ACTIVAT SES
    Active Session History                                           ENABLED  ENABLED  TYPICAL NO
    Adaptive Thresholds Enabled                                      ENABLED  ENABLED  TYPICAL NO
    Automated Maintenance Tasks                                      ENABLED  ENABLED  TYPICAL NO
    Bind Data Capture                                                ENABLED  ENABLED  TYPICAL NO
    Buffer Cache Advice                                              ENABLED  ENABLED  TYPICAL NO
    Global Cache Statistics                                          ENABLED  ENABLED  TYPICAL NO
    Longops Statistics                                               ENABLED  ENABLED  TYPICAL NO
    MTTR Advice                                                      DISABLED DISABLED TYPICAL NO
    Modification Monitoring                                          ENABLED  ENABLED  TYPICAL NO
    PGA Advice                                                       ENABLED  ENABLED  TYPICAL NO
    Plan Execution Sampling                                          ENABLED  ENABLED  TYPICAL YES
    Plan Execution Statistics                                        DISABLED DISABLED ALL     YES
    SQL Monitoring                                                   ENABLED  ENABLED  TYPICAL YES
    Segment Level Statistics                                         ENABLED  ENABLED  TYPICAL NO
    Shared Pool Advice                                               ENABLED  ENABLED  TYPICAL NO
    Streams Pool Advice                                              ENABLED  ENABLED  TYPICAL NO
    Threshold-based Alerts                                           ENABLED  ENABLED  TYPICAL NO
    Time Model Events                                                ENABLED  ENABLED  TYPICAL YES
    Timed OS Statistics                                              DISABLED DISABLED ALL     YES
    Timed Statistics                                                 ENABLED  ENABLED  TYPICAL YES
    Ultrafast Latch Statistics                                       ENABLED  ENABLED  TYPICAL NO
    Undo Advisor, Alerts and Fast Ramp up                            ENABLED  ENABLED  TYPICAL NO
    V$IOSTAT_* statistics                                            ENABLED  ENABLED  TYPICAL NO
    23 rows selected.
    SQL>Thanks
    Edited by: rsar001 on May 12, 2011 11:33 AM

Maybe you are looking for

  • Adobe Premiere has encountered an error... over and over again

    Hello I've been a happy Adobe Premiere Pro CC customer for 4 months until recently when I strated experiencing a problem with re-opening saved projects. I can easily start new project save them, work on them and so on but as soon as I close them and

  • How validation & transformation handled in ETL

    Hi, I am new to OWB (We are using Oracle 8i). I have to extract data from source, do the required validation and transformation and then finally load the data into target table.I need help on validation and transformation handled in ETL. Illustration

  • No Power Nap option Late 2011 MacBook Pro

    Here is what the specs for Power Nap say: Power Nap Supports MacBook Air (Mid 2011 or newer), MacBook Pro with Retina display. Does that mean that Power Nap is not supported with my Late 2011 MacBook Pro?

  • FCP 7 on Mavericks

    Will FCP 7 work with Mavericks

  • Installation very slow

    Hello everybody, I downloaded the auto install of the last Windows 10 TP from the website (not the iso) on Windows 7. Everything was fine at first (Windows update downloaded everything perfectly) but when the PC restarted, the first install process (