0PS_WBS_EVA (earned value) returns zero records

Hello,
I've activated the business content datasources for Project systems. I'm unable to get any records for earned values from R/3. The following datasources show zero records:
0PS_WBS_EVA
0PS_NWA_EVA
0PS_ORD_EVA
0PS_NAE_EVA
Can anyone tell me the tables to where these datasources are hitting? Help.SAP wasn't much of a help. I have already looked there.
Are there any settings within ECC that need to be changed in order to get data for the above datasources?
I'm getting data for the CO datasources related to project systems, such as 0CO_OM_WBS_6, 0CO_OM_OPA_6 and so on.
Due to zero records from the above datasources, there is no data coming in the Earned Values cube of Project systems.
Regards,
Sameer

Dear Oscar,
Thanks for your response,
The Actual Cost posted by our Functional Consultant is USD 250, but i am getting the Total Actual cost is ZERO (Sum of -250 +250) as i shown above.
the posted  actual cost is +250, finally we need this figure only,
if i do restriction on Sender receiver Indicater field with S than i will get Actual Cost 250, but in SAP standard RKF for Actual Cost there is no restriction on Sender receiver Indicater field (S & H)
I hope you got my point now.
Thanks
Amar Reddy

Similar Messages

  • Global Temp Table, always return  zero records

    I call the procedure which uses glbal temp Table, after executing the Proc which populates the Global temp table, i then run select query retrieve the result, but it alway return zero record. I am using transaction in order to avoid deletion of records in global temp table.
    whereas if i do the same thing in SQL navigator, it works
    Cn.ConnectionString = Constr
    Cn.Open()
    If FGC Is Nothing Then
    Multiple = True
    'Search by desc
    'packaging.pkg_msds.processavfg(null, ActiveInActive, BrandCode, Desc, Itemtype)
    SQL = "BEGIN packaging.pkg_msds.processavfg(null,'" & _
    ActiveInActive & "','" & _
    BrandCode & "','" & _
    Desc & "','" & _
    Itemtype & "'); end;"
    'Here it will return multiple FGC
    'need to combine them
    Else
    'search by FGC
    SQL = "BEGIN packaging.pkg_msds.processavfg('" & FGC & "','" & _
    ActiveInActive & "','" & _
    BrandCode & "',null,null); end;"
    'will alway return one FGC
    End If
    ' SQL = " DECLARE BEGIN rguo.pkg_msds.processAvedaFG('" & FGC & "'); end;"
    Stepp = 1
    Cmd.Connection = Cn
    Cmd.CommandType = Data.CommandType.Text
    Cmd.CommandText = SQL
    Dim Trans As System.Data.OracleClient.OracleTransaction
    Trans = Cn.BeginTransaction()
    Cmd.Transaction = Trans
    Dim Cnt As Integer
    Cnt = Cmd.ExecuteNonQuery
    'SQL = "SELECT rguo.pkg_msds.getPDSFGMass FROM dual"
    SQL = "select * from packaging.aveda_mass_XML"
    Cmd.CommandType = Data.CommandType.Text
    Cmd.CommandText = SQL
    Adp.SelectCommand = Cmd
    Stepp = 2
    Adp.Fill(Ds)
    If Ds.Tables(0).Rows.Count = 0 Then
    blError = True
    BlComposeXml = True
    Throw New Exception("No Record found for FGC(Finished Good Code=)" & FGC)
    End If
    'First Row, First Column contains Data as XML
    Stepp = 0
    Trans.Commit()

    Hi,
    This forum is for Oracle's Data Provider and you're using Microsoft's, but I was curious so I went ahead and tried it. It works fine for me. Here's the complete code I used, could you point out what are you doing differently?
    Cheers,
    Greg
    create global temporary table abc_tab(col1 varchar2(10));
    create or replace procedure ins_abc_tab(v1 varchar2) as
    begin
    insert into abc_tab values(v1);
    end;
    using System;
    using System.Data;
    using System.Data.OracleClient;
    class Program
        static void Main(string[] args)
            OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger");
            con.Open();
            OracleTransaction txn = con.BeginTransaction();
            OracleCommand cmd = new OracleCommand("begin ins_abc_tab('foo');end;", con);
            cmd.Transaction = txn;
            cmd.ExecuteNonQuery();
            cmd.CommandText = "select * from abc_tab";
            OracleDataAdapter da = new OracleDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);
            Console.WriteLine("rows found: {0}", ds.Tables[0].Rows.Count);
            // commit, cleanup, etc ommitted for clarity
    }

  • Query returns zero records in coldfusion context, but works fine in Navicat

    I've got a query that's returning zero records when I load a page.  If I copy and paste that same query (from the debug output) into navicat, I get rows returned (as I expect).  Has anyone seen this?  It happens locally (CF9) AND remotely on our staging server (CF10).  Even weirder, it's a query that was previously working fine - I simply added an if statement to the where clause, and all of a sudden... 
    Here's the query:
            <CFQUERY name="LOCAL.getEncounterServices" datasource="#REQUEST.dsn#"> 
            SELECT
                a.EncounterProductID,
                a.DateTime AS ServiceDate,
                aa.CartItemID,
                aaa.CartID,
                aaaaa.CartStatus,
                b.ProductID,
                b.ProductName,
                b.CPTCode,
                b.Price,
                c.EncounterID,
                c.DateTimeClosed AS EncounterClosedDate,
                d.FirstName,
                d.LastName
            FROM
                EncounterProducts a
                    LEFT JOIN CartItemProduct aa ON (a.EncounterProductID = aa.EncounterProductID AND aa.Active = 1)
                    LEFT JOIN CartItem aaa ON (aa.CartItemID = aaa.CartItemID)
                    LEFT JOIN Cart aaaa ON (aaa.CartID = aaaa.CartID)
                    LEFT JOIN CartStatus aaaaa ON (aaaa.CartStatusID = aaaaa.CartStatusID),
                Product b,
                Encounters c,
                Contacts d,
                EncounterStatuses e
            WHERE
                1 = 1
                AND (aa.CartItemID IS NULL OR aaaaa.CartStatus = 'Deleted')
                AND a.Active = 1
                AND a.ProductID = b.ProductID
                AND a.EncounterID = c.EncounterID
                AND c.PatientID = d.ContactID
                AND c.EncounterStatusID = e.EncounterStatusID
                AND e.EncounterStatus = 'Closed'
              <CFIF IsDefined("ARGUMENTS.encounter") AND IsObject(ARGUMENTS.encounter)>
                     AND c.EncounterID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.encounter.getID()#">
             <CFELSE>
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
               </CFIF>
                AND c.LocationID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.locationID#">
                AND c.CustomerID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.customerID#">
            </CFQUERY>
    All of this worked just fine before I added the lines:
             <CFIF IsDefined("ARGUMENTS.encounter") AND IsObject(ARGUMENTS.encounter)>
                     AND c.EncounterID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.encounter.getID()#">
             <CFELSE>
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
              </CFIF>
    Previously, it had just been:
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
    With no IF/ELSE statement.
    Anyone seen anything like this before?  Any ideas? 
    Thanks.

    Right, I'll start disabusing myself of the DateFormat!
    I'm sorry, I should've posted the actual query too.  It's inserting the first part - "AND c.EncounterID = ....."
    Here's the full query:
    LOCAL.getEncounterServices (Datasource=xmddevdb, Time=9ms, Records=0) in /Applications/ColdFusion9/wwwroot/XMD_NEW/xmd_dev/cfc/ShoppingGateway.cfc @ 16:56:28.028
    SELECT
                a.EncounterProductID,
                a.DateTime AS ServiceDate,
                aa.CartItemID,
                aaa.CartID,
                aaaaa.CartStatus,
                b.ProductID,
                b.ProductName,
                b.CPTCode,
                b.Price,
                c.EncounterID,
                c.DateTimeClosed AS EncounterClosedDate,
                d.FirstName,
                d.LastName
            FROM
                EncounterProducts a
                    LEFT JOIN CartItemProduct aa ON (a.EncounterProductID = aa.EncounterProductID AND aa.Active = 1)
                    LEFT JOIN CartItem aaa ON (aa.CartItemID = aaa.CartItemID)
                    LEFT JOIN Cart aaaa ON (aaa.CartID = aaaa.CartID)
                    LEFT JOIN CartStatus aaaaa ON (aaaa.CartStatusID = aaaaa.CartStatusID),
                Product b,
                Encounters c,
                Contacts d,
                EncounterStatuses e
            WHERE
                1 = 1
                AND (aa.CartItemID IS NULL OR aaaaa.CartStatus = 'Deleted')
                AND a.Active = 1
                AND a.ProductID = b.ProductID
                AND a.EncounterID = c.EncounterID
                AND c.PatientID = d.ContactID
                AND c.EncounterStatusID = e.EncounterStatusID
                AND e.EncounterStatus = 'Closed'
                     AND c.EncounterID = ?
                AND c.LocationID = ?
                AND c.CustomerID = ?
    Query Parameter Value(s) -
    Parameter #1(cf_sql_integer) = 28
    Parameter #2(cf_sql_integer) = 16
    Parameter #3(cf_sql_integer) = 6
    Thansk again for the help!

  • 0fi_ar_4 INIT returning zero records

    Hi gurus,
    0fi_ar_4 INIT is returning zero records while loading into ODS.I have checked in RSA3 it is returning zero records with INIT selection but is it is fetching records with Full update.Can ne one tell me what to do.how to solve this problem.
    rgds,
    ***Points Assured**

    Hi Suravi,
    Check at the Info Package selection-- Init with out data transfer.
    Make it with data transfer..
    Hope it helps..

  • Parameter Field Value returns "no records"

    I am using Crystal 11 and am new to Crystal but not to other Reportwriters.  I have a Crystal report that has 2 parameter fields, one is "Enter Date" that prompts for the start and end date, the other "Select Items" prompts for the supply Item Numbers to be included in the report.  In the "Edit Parameter: Select Items:" edit/create parameter dialog, the Select Item parameter has "Allow Multiple values" and "Allow discrete values" set to true. The report runs fine and returns any items entered in the "Select Items" prompt that has usage during the start & end date.  My problem is ... if the entered Item Number for the Select Items parameter returns no records, I cannot report that Item Number as having zero usage.  I cannot find a way at the time of report running to identify and report the "not found" items.  I would also like to report the Start and End Dates parameters requested, but cannot, the Enter Date parameter returns an empty parameter field across the whole report.  I'm sure other users have had this problem of reporting the requested parameter values.   Need assistance.  

    Jeff's answer is one way to do it.  There are others:
    If you want the items with no data interspersed with the other items (say, in item number order), then you'd change the report to use your item master table and do a left join from that to the usage data.  If a field from the usage table is null, then there was no usage, and you can condition a message based on that.
    Or, if your parameter selects item numbers without some type of "ALL" option, then you can use arrays to keep track of which if the selected items printed.  Then in the report footer, compare the list of items reported to the parameter items, and show which item numbers had no usage.  (This might run a tad faster than the separate subreport that Jeff suggested - but maybe not...)
    HTH,
    Carl

  • Infospoke on a Cube returns zero records

    Hi
    I am working on BW 3.5.
    I am trying to extract data from a Cube using Infospoke.
    Every time I run the Infospoke it returns 0 records!
    I tried to extract to Table/File with same result.
    When I use infospoke on ODS's or IO it works ok.
    Any idea's?
    Reg's
    Edan

    Pl check if  you have data in the cube.
    Secondly, if you have selections in the characteristics selection, pl check that out.
    Ravi Thothadri

  • Zero records in Delta Queue for Non-LO Datasource

    Hi,
    I have a process chain which loads data daily and last loaded on 5th of this month which is a delta load to DSO, and then I have triggered process chain on 10th  and now the process chain got successful but delta is returning zero records. I have gone through the Delta queue monitor, in that the data source is showing 0. what could be the reason for this? The data source is a Generic data source built on View and it is not a LO data source and delta is on timestamp.
    Thanks,
    Karan.

    Hi lokesh.
    Repair Full delta option it wont distub existing deltas.....
    repair full delta put full update indicate request as repair request.
    Via the Scheduler menu we can indicate a request with full-update mode as Repair Full Request. This request can be updated into every data target even if the data target already contains data from an initialization run or delta for this Data Source/ source system combination, and has overlapping selection criteria.

  • Export Datasource Returning 0 Records

    Hi,
    I have an export datasource on a COPA cube. This data source returns zero records when the infopackage is run. However, in RSA3 and LISTCUBE it returns records correctly.
    I set a breakpoint in Function Module RSDRC_CUBE_DATA_GET. This worked fine in RSA3 but on running the InfoPackage the breakpoint was not reached so I guess the problem is before this.
    I tried deactivating the V fact table view but this has no effect.
    Any ideas why this may be happening? Or any ideas how I can debug this further? What Function Modules are called when an Infopackage is executed?
    Regards, Lea

    Do you have any restriction on your infopackage? Ar eyou making a full load?
    if you do not have any restriction, try to regenerate again the Export Datsource and restart the loading.
    Which is your release?
    Mike

  • SPD 2013 workflow making a REST call to Search returns no records, even though I can take the exact URL and get back records in the browser

    I am making the following REST call from a SharePoint Designer workflow:
    Site-URL/_api/search/query?querytext='WorkEmail:*zafgen.com'&rowlimit=10&startrow=0&selectproperties='LastName,FirstName,WorkEmail,JobTitle,Path,PictureUrl,PreferredName,Department,AboutMe'&SourceId='b09a7990-05ea-4af9-81ef-edfab16c4e31'
    When I make this call from a designer workflow running as the user who started it (The user is a site collection admin) I get the results shown below.  NOTE that I get ZERO records.  If I take the url above and place it in the address bar
    of any browser, I get back 10 users.  (Exactly what I asked for.)  Furthermore, if I try to put the call to a REST service in a APP Step, I get a failure return code:
    {"error":{"code":"-1, Microsoft.Office.Server.Search.REST.SearchServiceException","message":{"lang":"en-US","value":"An unknown error occurred."}}}
    I have no issues making REST calls to SharePoint Lists and Libraries, but a call to search seems to have issues.  Any thoughts?
    {"d":{"query":{"__metadata":{"type":"Microsoft.Office.Server.Search.REST.SearchResult"},"ElapsedTime":135,"PrimaryQueryResult":{"__metadata":{"type":"Microsoft.Office.Server.Search.REST.QueryResult"},"CustomResults":{"__metadata":{"type":"Collection(Microsoft.Office.Server.Search.REST.CustomResult)"},"results":[]},"QueryId":"deba5b38-d89e-46d6-9911-a4280beead31","QueryRuleId":"00000000-0000-0000-0000-000000000000","RefinementResults":null,"RelevantResults":{"__metadata":{"type":"Microsoft.Office.Server.Search.REST.RelevantResults"},"GroupTemplateId":null,"ItemTemplateId":null,"Properties":{"results":[{"__metadata":{"type":"SP.KeyValue"},"Key":"GenerationId","Value":"9223372036854775806","ValueType":"Edm.Int64"},{"__metadata":{"type":"SP.KeyValue"},"Key":"indexSystem","Value":"","ValueType":"Edm.String"},{"__metadata":{"type":"SP.KeyValue"},"Key":"ExecutionTimeMs","Value":"63","ValueType":"Edm.Int32"},{"__metadata":{"type":"SP.KeyValue"},"Key":"QueryModification","Value":"WorkEmail:*zafgen.com
    ContentClass=urn:content-class:SPSPeople","ValueType":"Edm.String"},{"__metadata":{"type":"SP.KeyValue"},"Key":"RenderTemplateId","Value":"~sitecollection\/_catalogs\/masterpage\/Display
    Templates\/Search\/Group_Default.js","ValueType":"Edm.String"},{"__metadata":{"type":"SP.KeyValue"},"Key":"StartRecord","Value":"0","ValueType":"Edm.Int32"},{"__metadata":{"type":"SP.KeyValue"},"Key":"IsFirstBlockInSubstrate","Value":"true","ValueType":"Edm.Boolean"},{"__metadata":{"type":"SP.KeyValue"},"Key":"IsLastBlockInSubstrate","Value":"true","ValueType":"Edm.Boolean"}]},"ResultTitle":null,"ResultTitleUrl":null,"RowCount":0,"Table":{"__metadata":{"type":"SP.SimpleDataTable"},"Rows":{"results":[]}},"TotalRows":0,"TotalRowsIncludingDuplicates":0},"SpecialTermResults":null},"Properties":{"results":[{"__metadata":{"type":"SP.KeyValue"},"Key":"RowLimit","Value":"10","ValueType":"Edm.Int32"},{"__metadata":{"type":"SP.KeyValue"},"Key":"SourceId","Value":"b09a7990-05ea-4af9-81ef-edfab16c4e31","ValueType":"Edm.Guid"},{"__metadata":{"type":"SP.KeyValue"},"Key":"CorrelationId","Value":"6288bf51-64fc-45de-a9ca-d62c36e3ebd1","ValueType":"Edm.Guid"},{"__metadata":{"type":"SP.KeyValue"},"Key":"WasGroupRestricted","Value":"false","ValueType":"Edm.Boolean"},{"__metadata":{"type":"SP.KeyValue"},"Key":"EnableInterleaving","Value":"true","ValueType":"Edm.Boolean"},{"__metadata":{"type":"SP.KeyValue"},"Key":"piPageImpression","Value":"16620813_415_1033","ValueType":"Edm.String"},{"__metadata":{"type":"SP.KeyValue"},"Key":"SerializedQuery","Value":"","ValueType":"Edm.String"}]},"SecondaryQueryResults":{"__metadata":{"type":"Collection(Microsoft.Office.Server.Search.REST.QueryResult)"},"results":[]},"SpellingSuggestion":null,"TriggeredRules":{"__metadata":{"type":"Collection(Edm.Guid)"},"results":[]}}}}
    Marcel Meth

    Hi,
    We are currently looking into this issue and will give you an update as soon as possible.
    Thank you for your understanding and support.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Popularity Trends report always returns zero

    Hello,
    I have a SharePoint installed on “Windows server 2008 -R2”.
    I have a SQL Data base installed on the same machine.
    I create a new web application with port “2020”. Then I create w new site collection “Publishing”.
    I activate the feature “Reporting” in the site collection level.
    I Open central admin “Monitoring >> Configure usage and health data collection”. I checked “Enable usage data collection” Check box. And I Checked All “Events to Log” check boxes.
    I have configures the following services applications :
           -Business Connectivity Service
           -Excel Services Application
          -Search Service Application
         -Security Token Service Application
         -Application Discovery and Load Balancer Service Application
         -WSS_UsageApplication.
    I run the crawl search. And it is completed successfully.
    The search service account is member of “WSS_WPG” group.
    I have checked the following values from SharePoint PowerShell:
             AppEventTypeId          : 00000000-0000-0000-0000-000000000000
             EventTypeId                 : 1
             EventName                   : Views
             LifeTimeManagedPropertyName : ViewsLifeTime
             RecentManagedPropertyName   : ViewsRecent
            ApplicationName             :
            RecommendationWeight        : 1
           RelevanceWeight             : 1
          RecentPopularityTimeframe   : 14
          AggregationType             : Count, UniqueUsers
         Rollups                     : SiteSubscriptionId, SiteId, ScopeId
        TailTrimming                : 2
       Options                     : AllowAnonymousWrite
        IsReadOnly                  : False
    I open the “default.aspx” page on the portal (I have opened it more than 10 times in different browser window).
    Next day I open “popularity Trends” report, I found that it returns zero.
    I open the “Analytics Report” data base. Then I open “AnalyticsItemData” table. There are already items in the table.
        So I need to know why the “popularity Trends” excel sheet report returns zeros all the time.
    ASk

    Hi,
    According to your description, the popularity Trends report always returns no records.
    Please check the status of the 3 timer jobs: Microsoft SharePoint Foundation Usage Data Import, Microsoft SharePoint Foundation Usage Data Processing and Web Analytics
    Trigger Workflows to see if they are configured to run at regular intervals.
    Also you can take a look at the two links about the similar issue for more information:
    http://www.myriadtech.com.au/blog/Ben/Lists/Posts/Post.aspx?ID=7
    http://sharepoint.stackexchange.com/questions/66476/whats-popular-webpart-is-empty
    Feel free to reply if there any progress.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Account Transformation CALCACCOUNT.LGF returns 0 records

    Hi,
    Account transformation through CALCACCOUNT.LGF returning 0 records.
    Created a Account Transformation Business rule as follows -
    Transformation group Name - AST
    Source Account - CASH
    Category - ACTUAL
    Source Flow - NONE
    Source DatsSrc - SYSTEM
    Similarly maintained values for -
    Destination Account  - D_CASH
    Destination Category - ACTUAL
    Destination Source Flow - ENDBAL
    Destination DatsSrc - SYSTEM
    Source period = -1
    all other values like Source Year,Apply to YTD,Remark,Level, Forced into Member are left blank.
    Scrip Logic -
    *RUN_PROGRAM CALC_ACCOUNT
    CATEGORY = %CATEGORY_SET%
    CURRENCY = %RPTCURRENCY_SET%
    TID_RA = %TIME_SET%
    ENTITY=%ENTITY_SET%
    CALC=AST
    *ENDRUN_PROGRAM
    Script runs succesfully, however returns 0 records.
    RUN CALC_ACCOUNT
    0  SUBMITTED, 0  SUCCESS, 0  FAIL.
    SCRIPT RUNNING TIME IN TOTAL:1.94 s.
    LOG END TIME:2011-06-28 01:38:25
    Can some one please advise on the "checks" to be performed to run the script succesfully.
    I know out of experience even if a simple property is not set, script does not run.
    Inputs appreciated.
    Thanks.

    With this, one thing to be aware of is that if you have run an account transformation rule on a data set already, and you a re-running it yet the data has not changed - there will be 0 records generated.
    I recommend changing the data - do a simple zero and input data then save - then re-run, check if that works.
    Nick

  • Bug Report: ResultSet.isLast() returns false when queries return zero rows

    When calling the method isLast() on a resultset that contains zero (0) rows, false is returned. If a resultset contains no rows, isLast() should return true because returning false would indicate that there are more rows to be retrieved.
    Try the following Java source:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    public class Test2 {
    public static void main (String [] args) throws Exception {
    Connection conn = null;
    String jdbcURL = "jdbc:oracle:thin:@" +
    "(DESCRIPTION=(ADDRESS=(HOST=<host computer>)"+
    "(PROTOCOL=tcp)(PORT=<DB port number>))"+
    "(CONNECT_DATA=(SID=<Oracle DB instance>)))";
    String userId = "userid";
    String password = "password";
    try{
    // Load the Oracle JDBC Driver and register it.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // *** The following statement creates a database connection object
    // using the DriverManager.getConnection method. The first parameter is
    // the database URL which is constructed based on the connection parameters
    // specified in ConnectionParams.java.
    // The URL syntax is as follows:
    // "jdbc:oracle:<driver>:@<db connection string>"
    // <driver>, can be 'thin' or 'oci8'
    // <db connect string>, is a Net8 name-value, denoting the TNSNAMES entry
    conn = DriverManager.getConnection(jdbcURL, userId, password);
    } catch(SQLException ex){ //Trap SQL errors
    // catch error
    //conn = new OracleDriver().defaultConnection(); // Connect to Oracle 8i (8.1.7), use Oracle thin client.
    PreparedStatement ps = conn.prepareStatement("select 'a' from dual where ? = ?", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); // Use any query that will return zero rows.
    ps.setInt(1, 1); // Set the params so that the query returns 0 rows.
    ps.setInt(2, 2);
    ResultSet rs = ps.executeQuery();
    System.out.println("1. Last here? " + rs.isLast());
    while (rs.next()) {
    // do whatever
    System.out.println("2. Last here? " + rs.isLast());
    ps.close();
    rs.close();
    EXPECTED RESULT -
    1. Last here? true
    2. Last here? true
    ACTUAL RESULT -
    1. Last here? false
    2. Last here? false
    This happens to me on Oracle 9.2.0.1.0.

    387561,
    For your information, I discovered this problem from
    running a query that did access an actual DB table.
    Try it and let me know.I did say I was only guessing, and yes, I did try it (after I posted my reply, and before I read yours). And I did check the query plan for the queries I tried -- to verify that they were actually doing some database "gets".
    In any case, the usual way that I determine whether a "ResultSet" is empty is when the very first invocation of method "next()" returns 'false'. Is that not sufficient for you?
    Good Luck,
    Avi.

  • Using a session object to hold the value of a record set?

    Hi,
    I'm trying to hold the value of a record set (or literally the content of a column in a query in a db) in a session variable so that I can call on this later and insert into another table.
    I'm not sure of the correct syntax, I've already made a connection to the DB. I'm trying the following but it doesnt seem to like the code:
    <% session.setAttribute("code",rs("column_name")); %>
    <%String attrib =
    String.valueOf ( session.getAttribute("code")); %>
    Hello <%= attrib %>
    Any ideas, I dont know how to reference the record set, I declared the recordset previously as rs. Help! Can't find examples anywhere on the net!

    So just to recap. I appear to be seeing the column name "custorderno" within the Microsoft Access query "lastcust". But I get "no data found" when I run the following code (which I have sectioned off)
    <!-- connect to database and lastcust query --!>
    <%
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    Connection conn = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Tomcat/jakarta-tomcat-4.1.31/webapps/ROOT/Oatcake.mdb","","");
    Statement statement = conn.createStatement();
    String sql = "SELECT * FROM lastcust";
    ResultSet rs = statement.executeQuery(sql);
    while (rs.next()) {
    %>
    <TR><TD><%= rs.getString("custorderno") %></TD>
    </TR>
    <% session.setAttribute("code",rs.getString("custorderno")); %>
    <% String attrib =
    String.valueOf ( session.getAttribute("code") ); %>
    Hello <%= attrib %> [B]
    <%
    %>
    </TABLE>
    <%
    if (statement != null)
    statement.close();
    if (conn != null)
    conn.close();
    catch (Exception e) {out.print(e);}
    %>
    </BODY>
    </HTML>
    No as mentioned I am (as you can see) declaring everything as a string when in actual fact the contents of the "custorderno" within the query is set to a autonumber within MS Access.
    The while loop does work by returning the contents but the session object part is not working correctly with the following result returned:
    [B]java.sql.SQLException: No Data Found
    Help please!

  • SQL Command returns multiple records, but I see only one record in report

    I work with Crystal Reports XI R2 SP3 and Oracle 10g R2 database.
    I have an SQL Command that returns multiple records. Command name is "CommDivisionNames" and it returns column "CommDivisionNames.DIVISION_NAME". When I place this field into report details section of the report, I can see all 10 records returned and this is how it should be. I actually need this field to be placed in the report header section, and when I place the field there, then I see only the first record. I set that field as "can grow = true". When I do "browse field data" for this field, I see that all 10 records are there, but only the first one is displayed in report header section.
    I thought that I can place SQL Command field anywhere on the report (page header, footer, details) and that it will always show all records that it returns from the database. Can that be done?
    My "main part" of the report returns different set of records, and that's what I have in "report details" section. I need this list of divisions to be in the report header section, so user can see that the report was executed for DivA, DivC, DivE.
    Thank you,
    Milan

    sharonamt:
    Users select divisions from parameter, but the parameter multi values are division_numbers (1,5,10), not division_names. Division_names are visible in parameter_prompt_window as description, but parameter remembers only numbers and I don't know how I can reuse division_names later in formula.
    I do join for division_numbers and make them into one string variable and pass to sub-report, but I think that I can only get these division_names by calling an SQL command or calling stored procedure.
    If I try to do join({MySQLcommand.DIVISION_NAME}) I get error message "A string array is required here".
    Carl:
    I'm playing with cross-tab and I can use it to see all division_names in the report-header section. Since I need them in only one column or only one row, I have to edit cross-tab object and turn all unneeded border lines to white to make them look invisible. So, cross-tab could be a solution for my problem here.
    Another option could be to re-write my SQL command. Since I've read here that SQL command could be written in the same way as I would write a stored procedure, then I could use a bit more complex code to get all multiple division names from the database table into a local cursor, and then use do-while loop to concatenate them into one string, and then to return that string as one record (like 'DivA, DivB, DivC'), and then it should not be a problem to display only that one record/string in report header. It is my understanding that Crystal Reports can call stored procedure that works with many cursors/recordsets and CR will use only the last recordset from the stored procedure. Do you think it could be done this way?
    Thank you,
    Milan

  • Returning only records that have no entry in a specific field

    Hello,
    I'm new to this forum and relatively new to Crystal Reports, so I apologize if this information is "plain as day" somewhere.  I've been hunting for this info for quite a while and can't find anything that makes sense!
    I am trying to put together a very simple report that will return only records where a certain field is blank.
    It is an Access database, in an information management program specific to our type of business.  CR 11 software was included with the LIMS (Laboratory Information Management System), as the reports generated from the LIMS software are in CR.  I've learned enough to be able to tweak reports and make some basic reports, but I can't find a simple answer to what I think is a simple question! 
    I have the report set up to access the following fields in the database:  Invoice number, Client name, Due date, Invoice amount, and Payment Received.  This will be used as a "cross check" - not as any major accounting tool - as the Payment Received field is simply the date that the payment was received.  If no payment has been received, the field is left blank.
    I want the report to return ONLY those records where that field is blank (i. e. a list of invoices/clients whose payment has not yet been received).
    Ideally, I would also like to be able to return only those records where that field is blank OR within a certain date range (i. e. less than 30 days from the date that the report is run).  However, we'll probably only use this report a couple of times a month, so that is not as critical.
    I know I need to filter the records according to the Payment Received field, but don't know how to construct a formula that says "just show the fields where there is nothing entered."
    Thank you!
    Brenda

    This is the hardest function to find:  IsNull
    If isNull(field) then  
        //  if the above fails on a numberic field or text field then see the following two-some databases are picky.
    If IsNull(field) or field=0 then  //this one maybe needed for a numeric field
    If IsNull(field) or field=""    //  this one maybe needed for a text field
    if IsNull(field) or field=<value>
    or
    if IsNull(field) or field like <value*>
    You always want the IsNull statement to be the first statement, and it is especially usefull when testing for not equal
    If IsNull(field) or field <>  <value>

Maybe you are looking for