Returning ResultSet data
i want my class to return data to another class. I know i cant return a ResultSet because my connection closes. Can i return some collection similar to a ResultSet ( something 2 dimensional). Can i return metadata from this class?
thanx
A typical solution is to return an ArrayList (or some other datatype) that contains several objects, each containing the data from the row. For example, if I wanted to return a username/password combination, you can create a User class that simply holds those two values, then each iteration through your ResultSet, create a new object, put the two values in it, and stick it in your ArrayList.
This is probably the most effective way, since any datastructure is generally intended to handle data of a certain type, and since data from your database is most likely varying in types, creating one two-dimensional datastructure is probably not going to be as effective.
Similar Messages
-
ResultSet date into JavaScript Function HELP!!
I am developing an auction web site for a end year project in college, it is all done except this countdown thingy. I got the 'endDate' of an auction in a table. I can get the date out no problem at all, where im stuck is where i gotta pass the date from the result set into the javascript countdown function so it can countdown to the end of the auction. Code below
<%@ page language = "java" contentType = "text/html"%>
<%@ page language = "java" import = "com.sybase.jdbcx.SybDriver" %>
<%@ page language = "java" import = "java.sql.*" %>
<%@ page language = "java" import = "java.util.*"%>
<% Connection dbConn = null;
try
Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
dbConn = DriverManager.getConnection("jdbc:sybase:Tds:compserver:5000/syb3044","
syb3044", "syb3044");
Statement b = dbConn.createStatement();
ResultSet bid = b.executeQuery("select * from bid where carID=1");
if(bid.next()){}
%>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
mDate = new Date("20 April 2004 16:45") //Hard Coded Date Here, Want ResultSet Date Passed Here
function countdown()
var now=new Date()
var diff=mDate.getTime()-now.getTime()
if (diff <= 0)
document.bid.mseconds.value = 0
return 0;
document.bid.days.value = Math.round(diff/(24*60*60*1000))
document.bid.hours.value = Math.round(diff/(60*60*1000))
document.bid.minutes.value = Math.round(diff/(60*1000))
document.bid.seconds.value = Math.round(diff/1000)
document.bid.mseconds.value = diff
var id=setTimeout("countdown()",0)
</SCRIPT>
</HEAD>
<BODY onLoad="countdown()">
<BR>
<form name="bid" method="post" action="">
<p>Timeleft</p>
<TABLE BORDER=0>
<TD width="79">Days: </TD>
<TD width="81">
<INPUT TYPE="text" NAME="days" SIZE=15></TD> <TR>
<TD width="79">Hours: </TD>
<TD width="81">
<INPUT TYPE="text" NAME="hours" SIZE=15></TD> <TR>
<TD width="79">Minutes:</TD>
<TD width="81">
<INPUT TYPE="text" NAME="minutes" SIZE=15></TD> <TR>
<TD width="79">Seconds: </TD>
<TD width="81">
<INPUT TYPE="text" NAME="seconds" SIZE=15></TD> <TR>
<TD width="79">Milliseconds:</TD>
<TD width="81">
<INPUT TYPE="text" NAME="mseconds" SIZE=15></TD> <TR>
</TABLE>
</form>
</BODY>
</HTML>
<%
bid.close();
catch (SQLException sqle)
out.println(sqle.getMessage());
catch (ClassNotFoundException cnfe)
out.println(cnfe.getMessage());
catch (Exception e)
out.println(e.getMessage());
finally
try
if(dbConn != null)
dbConn.close();
catch (SQLException sqle)
out.println(sqle.getMessage());
%>
...........................................................SQLTable.......................................................................................................................
create TABLE bid
bidID integer primary key,
carID numeric NOT NULL,
seller varchar(50) NOT NULL,
username varchar(50),
startDate varchar(25) not null,
endDate datetime not null
PS, tried putting endDate as varchar but same result
Please note I am a computer science student
Regards Don Colvinorg.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 19 in the jsp file: /Test.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat\work\Catalina\localhost\Mess\org\apache\jsp\Test_jsp.java:55: cannot resolve symbol
symbol : class SimpleDateFormat
location: class org.apache.jsp.Test_jsp
out.print( new SimpleDateFormat("dd MMMM YYYY hh:MM").format(bid.getDate("endDate")) );
^
1 error
It throwing back this error, any suggestions -
In what order will select * return the data?
hi guys,
1) if we just do a select * from emp, will it return the data in the order of the data blocks in the extents. i.e. return all data blocks from extent 1, then from extent 2 and so forth?
2) if we do a select * from emp, and say half the data blocks are already in the database buffer cache, how does Oracle know that the data blocks from emp are already in the database buffer cache? Does it keep some lookup table?
thanksOracleGuy777 wrote:
thanks guys,
I will mark the question as closed, even though I am still a bit unsure as to why if we just start up a database so that the db cache is empty, and do a select * on a small table that is all on one disk, why the Oracle kernel would from a logical point of view choose different order to return the rows.
but thanks anywayThe order in which rows are returned is a side effect of the execution plan chosen by the Query Optimizer (which is one reason why the ORDER BY clause exists), in plain relational theory both your underlying table and the results are relations (simply an unordered set of tuples) so consequently the optimizer is free to follow whatever method it likes to return the results. In the case of a Rule Based optimizer then there is simply a set of rules that determine the choice of execution plan, in the case of a cost based optimizer then the optimizer attempts to minimize the time taken to return the resultset by choosing an execution plan based on statistical information and algorithms. The existence of the buffer cache is in fact ignored for most practical purposes and certainly for the purposes you imagined.
Now if your table is just that, a straight forward heap table with no indexes then you will likely get what you expect, that is rows returned in the order that the blocks in which they are held are located on disk; this isn't insert order necessarily by the way especially if ASSM is involved. This is only however because a full tablescan is the only available option for satisfying the query. Most tables however aren't like that, they have indexes, the query involves joins and filters and so on. Once you start allowing the possibility of other access paths then you allow the possibilty that rows or rather blocks will be visited in a different order to the simplistic one described above.
Niall Litchfield -
Hi,
I'm using a javabean that returns a resultset from oracle and i need that resultset to execute another query so i can return the data to a jsp. My problem is it will only execute through a while loop once as i have passed it to a String. Does anyone have any idea how i could go about this? So far I've been using while loops eg.
result = select.executeQuery("select * from score where stu_score = 10 and level_id = 1");
while(result.next())
String s = result.getString("stu_id");
System.out.println(s);
result = select.executeQuery("Select stu_name from Student where stu_id = '"+s+"'");
while(result.next())
String r = result.getString("stu_name");
System.out.println(r);
This will return one stu_id and one stu_name. Any ideas?Hi,
You are getting results from the database and storing them in result. Inside your outermost while loop you are overwriting the same object i.e. result, by saying
result = select.executeQuery("Select stu_name from Student where stu_id = '"+s+"'");
That is why you only get one stu_id and one stu_name. Outside the first while loop, declare another ResultSet object, call it result2, and use that one inside.
However, I strongly recommend not to run such code in a jsp. Do this in a servlet, and set your results that you get through the resultsets in a data transfer object, store it in the request or session, and then get it in the jsp. Also, remeber to close your resultset, statment, and connection objects, otherwise you will suffer from the open cursors problem - eventually! And above all, that is the right way of doing stuff.
Hope this helps. -
Discoverer Report returning ' no data found '
Hi ...
i have an issue with one discoverer report .
Discoverer report name : EDI Price Exception Report.
when i ran the report in Discoverer Desktop edition It is returning 'No Data Found ' But i am taken the Query from admin edition and tried to ran in PL/SQL Developer/TOAD by setting Org_id condition
it's returning Data . the Desktop Edition of Discoverer for some specific date Range it's giving Data But from last month on wards it's not returning any Data.
in Discoverer Report Desktop it's not retuning the Data from November to till date
Oracle Applications 11i
Discoverer 4i
Oracle Data base :9i
OS : Windows.
Attached the Sql which i used to generate the Report :
I HAVE USED THE FOLLOWING :-for initialize the profile options
EXEC FND_GLOBAL.APPS_INITIALIZE (0,52163,660);
EXEC APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(2922);
SELECT A.CUST_PO_NUMBER,
A.ORDER_NUMBER,
A.ORDERED_DATE,
A.ORDER_TYPE,
-- C.CUSTOMER_ID,
C.CUSTOMER_NUMBER,
C.CUSTOMER_NAME,
B.LINE_NUMBER,
B.ORDERED_ITEM,
MSI.SEGMENT1 ACCO_ITEM, -- GRW 20060407
MSI.DESCRIPTION,
-- MSI.INVENTORY_ITEM_ID,
(SELECT MCI.CUSTOMER_ITEM_NUMBER
FROM MTL_CUSTOMER_ITEMS MCI,
MTL_CUSTOMER_ITEM_XREFS MCIX,
MTL_SYSTEM_ITEMS_B MSIB
-- MTL_PARAMETERS MP
WHERE MCI.CUSTOMER_ID = C.CUSTOMER_ID --1814924
AND MCI.CUSTOMER_ITEM_ID = MCIX.CUSTOMER_ITEM_ID
AND MCIX.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
AND MSIB.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID --869899
AND MSIB.ORGANIZATION_ID = MTP.ORGANIZATION_ID --MP.ORGANIZATION_ID
AND MTP.ORGANIZATION_CODE = 'BRM'
AND MCI.CUSTOMER_ITEM_NUMBER = B.ORDERED_ITEM
AND NVL (mci.inactive_flag, 'N') <> 'Y'
AND NVL (mcix.inactive_flag, 'N') <> 'Y')
CUSTOMER_ITEM,
XXAB_ITEM_XREFS.GET_GBC_ITEM_NUM (B.ORDERED_ITEM) GBC_ITEM_NUMBER,
B.ORDERED_QUANTITY,
B.PRICE_LIST,
B.UNIT_SELLING_PRICE,
B.UNIT_LIST_PRICE,
TO_NUMBER (B.ATTRIBUTE7) CUST_SENT_PRICE,
apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
B.ordered_item,
B.header_id,
B.line_number,
B.unit_selling_price,
B.attribute7,
B.pricing_quantity_uom,
B.attribute4)
CUST_SENT_PRICE_CONVERTED,
ABS ( (B.UNIT_SELLING_PRICE
- apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
B.ordered_item,
B.header_id,
B.line_number,
B.unit_selling_price,
B.attribute7,
B.pricing_quantity_uom,
B.attribute4)))
DIFFERENCE,
MTP.ORGANIZATION_CODE,
B.SHIP_TO_LOCATION
FROM OE_ORDER_HEADERS_V A,
OE_ORDER_LINES_V B,
RA_CUSTOMERS C,
MTL_PARAMETERS MTP,
MTL_SYSTEM_ITEMS_B MSI
WHERE A.HEADER_ID = B.HEADER_ID
AND A.SOLD_TO_ORG_ID = C.CUSTOMER_ID
-- Added by Gati on 19-Oct-2012, tkt - INC000000118962
AND ROUND (TO_NUMBER (apps.XXAB_CUST_SENT_PRICE_CONV_SO (
C.customer_number,
B.ordered_item,
B.header_id,
B.line_number,
B.unit_selling_price,
B.attribute7,
B.pricing_quantity_uom,
B.attribute4)),
2) <> B.UNIT_SELLING_PRICE
--AND ROUND(TO_NUMBER(B.ATTRIBUTE7), 2) <> B.UNIT_SELLING_PRICE
--AND a.ship_from_org_id = mtp.organization_id
AND B.SHIP_FROM_ORG_ID = MTP.ORGANIZATION_ID -- GRW 20060413
--AND a.ship_from_org_id = msi.organization_id
AND B.SHIP_FROM_ORG_ID = MSI.ORGANIZATION_ID -- GRW 20060413
AND B.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID -- GRW 20060407
AND A.ORDER_SOURCE_ID = 6
AND A.ORG_ID = B.ORG_ID
AND TO_CHAR (A.ordered_date, 'DD-MON-YYYY') between '01-NOV-2013' and '03-NOV-2013'
and mtP.organization_code='BRM'
AND A.ORG_ID = (SELECT HOU.ORGANIZATION_ID
FROM HR_OPERATING_UNITS HOU
WHERE HOU.NAME = '50 ACCO Canada')
AND B.cancelled_flag <> 'Y'
AND B.flow_status_code <> 'CANCELLED'
AND B.ORDERED_ITEM <> 'INVALID_ITEM'
ORDER BY a.order_numberHi,
Assuming your initialization matches your discoverer login, it is pretty weird that you get no data.
I am not sure how you got the SQL but i suggest you trace the session to get the exact SQL ran by the discoverer.
You may find another condition or join that limits your data.
Also another thing that you should try is to initial the session by using all the parameters (including the security group as you have in your discoverer login):
begin
fnd_global.APPS_INITIALIZE(user_id =>, resp_id =>, resp_appl_id =>, security_group_id =>);
end -
Discoverer report returns no data from a certain time
Using Discoverer 10g,a discoverer report which returned data normally last month gets to return no data now.
We have four same environments, and two of them has this problem, two is OK.
And the SQL of the discoverer of the four environments are the same.
We have no any changment of this discoverer and related EUL for more than one year....
How should we investigate into this issue.
For example ,a point we should notice or something...
Could somebody give us a suggestion?
Thank you.Thanks for your qiuck reply.
1.empty table that is joined in the query.The four environments has almost the same data,it is not the cause.
2.security issue with the data, maybe the security definitions are different from one environment to another.we are now invesgate into this cause.
and there is a sql of the discoverer's EUL which shows no data in a enviroment(in this enviroment discoverer report gets no data), but in another enviroment data can show.
the sql is as following.
=============
SELECT loc_bu.org_id
,loc_bu.location_id building_id
,loc_bu.building building_name
,loc_bu.location_code building_number
,loc_fl.location_id floor_id
,loc_fl.location_code floor_number
,loc_fl.floor floor_name
,loc_of.location_id office_id
,loc_of.location_code office_number
,loc_of.office office_name
,loc_of.suite office_suite
,loc_of.location_alias office_alias
,loc_of.assignable_area office_assignable_area
,loc_of.space_type_lookup_code office_space_type_code
,lst.meaning office_space_type
,loc_of.function_type_lookup_code office_function_type_code
,fun.meaning office_function_type
,(SELECT ffv.description
FROM fnd_flex_values_vl ffv
,fnd_flex_value_sets ffvs
WHERE ffv.flex_value = loc_of.attribute1
AND ffv.flex_value_set_id = ffvs.flex_value_set_id
AND ffvs.flex_value_set_name = 'MB_PN_ON') occupancy_exception_flag
,loc_of.active_start_date
,loc_of.active_end_date
--ADD BY KEVIN 2008/6/26 START
,loc_of.attribute7 division_code_office
,(SELECT ffv.description
FROM fnd_flex_values_vl ffv
,fnd_flex_value_sets ffvs
WHERE ffv.flex_value = loc_of.attribute7
AND ffv.flex_value_set_id = ffvs.flex_value_set_id
AND ffvs.flex_value_set_name = 'MB_PN_DIVISION') division_description_office --ヌヨ-ホ・ヒオテ・
--ADD BY KEVIN 2008/6/26 END
FROM pn_locations loc_bu
,pn_locations loc_fl
,pn_locations loc_of
,fnd_lookups fun
,fnd_lookups lst
WHERE loc_bu.location_id = loc_fl.parent_location_id
AND loc_bu.location_type_lookup_code IN ('LAND', 'BUILDING')
AND nvl(loc_bu.attribute6, '99') <> '01'
AND loc_fl.location_id = loc_of.parent_location_id
AND loc_fl.location_type_lookup_code IN ('FLOOR', 'PARCEL')
AND nvl(loc_fl.attribute6, '99') <> '01'
AND loc_of.location_type_lookup_code IN ('OFFICE', 'SECTION')
AND nvl(loc_of.attribute6, '99') <> '01'
AND loc_of.function_type_lookup_code = fun.lookup_code(+)
AND fun.lookup_type(+) = 'PN_FUNCTION_TYPE'
AND loc_of.space_type_lookup_code = lst.lookup_code(+)
AND lst.lookup_type(+) = decode(loc_of.location_type_lookup_code,
'OFFICE',
'PN_SPACE_TYPE',
'SECTION',
'PN_PARCEL_TYPE')
AND nvl(loc_of.space_type_lookup_code,'99') <> '07';
====================
Ps.before excute this sql, we always first excute following command.
====
begin
fnd_client_info.set_org_context(117);
end;
====
The analyst of our team is not very good at the security problem, could you help us?
Thanks a lot. -
Return default data if no data is returned by sql query
Hi,
I have a requirement.
I have an inner query that returns no data. However I still want to return default data (say 'abc'). The below sql does not return anything inspite of using nvl . Please advise .
select nvl( x.vencode,'abc') vencode
from
-- below sql returns no data!
SELECT a.vencode vencode,
a.mid mid,
a.title title,
ROW_NUMBER() OVER (PARTITION BY a.vencode ORDER BY a.title) rnk
FROM (
SELECT *
FROM (SELECT vencode FROM vendor where login is not null and vencode = 'BKFI'
and login > (sysdate - 90) )
CROSS JOIN
(SELECT mid, title, ROWNUM num FROM tcommmemos where mid is not null)
) a,
(SELECT * FROM (
SELECT v.vencode, tc.mid, tc.title
FROM
(select * from vendor
where login is not null and vencode = 'BKFI'
and login > (sysdate - 90)) v,
tcommmemosviewed tcv, tcommmemos tc
WHERE v.vencode = tcv.vencode
and tc.mid is not null
--AND tc.post_date > v.hiredate
AND tc.mid = tcv.mid)
) b
where a.vencode = b.vencode(+)
and a.title = b.title(+)
and a.mid = b.mid(+)
and b.mid is null
) xUse any aggregate function it'll always return a value even if there no data in the table
create table r_dummy_1 (a number);
SQL> select * from r_dummy_1;
no rows selected
SQL> select nvl(max(a),1) from r_dummy_1;
NVL(MAX(A),1)
1 -
SSRS - Oracle Stored procedure returns no data but does in SQL Developer Sudio
HI there,
Stored procedure returns no data when executed on the report but when i execute the stored procedure in Sql Developer it returns required rows.
Thanks for your help!Hi Simon,
When i test with simple query, i get the data.
For your convenience, my stored proc looks lyk :
PROCEDURE pr_REPORT_data(P_STARTDATE IN DATE, P_ENDDATE IN DATE, data_rows OUT T_CURSOR) AS
OPEN completed_Reinstatement FOR
SELECT
value1,.......value5
FROM table1
WHERE
To_Date(createdDate, 'YYYY/MM/DD') BETWEEN To_Date(P_STARTDATE, 'YYY/MM/DD') AND To_Date(P_ENDDATE, 'YYYY/MM/DD');
END pr_REPORT_data;
T_CURSOR is of type cursor which is declared on the package.
I'm assuming the problem is with date parameters, however i converted the date before passing to
WHERE clause. -
Hi i have a query like this
SELECT
pro.project_name "Project Name",
POBJ.NAME "Object Name",
X."Major" "Internal Major",
X."Minor" "Internal Minor",
X."Normalized" "Internal Normalized",
X."IDR" "Internal Defect Rate",
Y."Minor" "External Minor",
Y."Major" "External Major",
Y."Normalized" "External Normalized",
Y."EDR" "External Defect Rate",
NULL "Total Defects"
FROM
PROJECTS PRO,
PROJECT_OBJECTS POBJ,
(SELECT
MN."PRO_ID",
MN."POBJ_ID",
MN."Major",
MN."Minor",
MN."Normalized",
DR."IDR_PRO_ID",
DR."IDR_POBJ_ID",
DR."IDR"
FROM
MAJOR_MINOR_NORMALIZED MN FULL OUTER JOIN IDR DR
ON
MN."PRO_ID" = DR."IDR_PRO_ID" AND
MN."POBJ_ID" = DR."IDR_POBJ_ID" ) X,
(SELECT
EE."PRO_ID" EE_PRO_ID,
EN."PRO_ID" EN_PRO_ID,
EE."POBJ_ID" EE_POBJ_ID,
EN."POBJ_ID" EN_POBJ_ID,
EN."Major" "Major", EN."Minor" "Minor", EN."Normalized" "Normalized",
EN."Normalized" / DECODE(EE."External_Effort",0,NULL,EE."External_Effort") "EDR"
FROM
EXTR_MAJOR_MINOR_NORMALIZED EN FULL OUTER JOIN EXTERNAL_EFFORT EE
ON
EE."PRO_ID" = EN."PRO_ID" AND
EE."POBJ_ID" = EN."POBJ_ID") Y
WHERE
PRO.ID = 2673 AND
2673 = POBJ.PRO_ID AND
2673 = DECODE(X."PRO_ID",NULL,2673,X."PRO_ID") AND
2673 = DECODE(X."IDR_PRO_ID",NULL,2673,X."IDR_PRO_ID") AND
POBJ.ID = DECODE(X."POBJ_ID",NULL,POBJ.ID,X."POBJ_ID") AND
POBJ.ID = DECODE(X."IDR_POBJ_ID",NULL,POBJ.ID,X."IDR_POBJ_ID") AND
2673 = DECODE(Y."EE_PRO_ID",NULL,2673,Y."EE_PRO_ID") AND
2673 = DECODE(Y."EN_PRO_ID",NULL,2673,Y."EN_PRO_ID") AND
POBJ.ID = DECODE(Y."EE_POBJ_ID",NULL,POBJ.ID,Y."EE_POBJ_ID") AND
POBJ.ID = DECODE(Y."EN_POBJ_ID",NULL,POBJ.ID,Y."EN_POBJ_ID")
In the above query all the X Contents have data and Y Contents are not having data but i need to display if X contents are there and make Y contents as Blank if no data exists
The Query will return value ony if the data existing both X and Y
if either one of the X or Y having data it will return no data found how to give the where clause condtion for such cases i tryed many ways was not able to get the result
thanks
SudhirI did like this
Create or Replace View IDRS as
SELECT
MN."PRO_ID",
MN."POBJ_ID",
MN."Major",
MN."Minor",
MN."Normalized",
DR."IDR_PRO_ID",
DR."IDR_POBJ_ID",
DR."IDR"
FROM
MAJOR_MINOR_NORMALIZED MN FULL OUTER JOIN IDR DR
ON
MN."PRO_ID" = DR."IDR_PRO_ID" AND
MN."POBJ_ID" = DR."IDR_POBJ_ID
CREATE OR REPLACE FORCE VIEW "EXTERNAL_DEFECT_RATE" ("EE_PRO_ID", "EN_PRO_ID", "EE_POBJ_ID", "EN_POBJ_ID", "Major", "Minor", "Normalized", "External_Effort", "EDR") AS
SELECT
EE."PRO_ID" EE_PRO_ID,
EN."PRO_ID" EN_PRO_ID,
EE."POBJ_ID" EE_POBJ_ID,
EN."POBJ_ID" EN_POBJ_ID,
EN."Major", EN."Minor", EN."Normalized",EE."External_Effort",
EN."Normalized" / DECODE(EE."External_Effort",0,NULL,EE."External_Effort") "EDR"
FROM
EXTR_MAJOR_MINOR_NORMALIZED EN FULL OUTER JOIN EXTERNAL_EFFORT EE
ON
EE."PRO_ID" = EN."PRO_ID" AND
EE."POBJ_ID" = EN."POBJ_ID"
now i am trying to create a full outer join i am getting errors like this
Select *
from
EXTERNAL_DEFECT_RATE edr full outer join on IDRS
on
idrs."pro_id" = edr."EE_PRO_ID" and
simileare other join condtion
but i get Column Ambigiously defined error
tx
Sudhir -
Discoverer 10g, it returns no data
Hi all,
I have a doubt can any one clarifies.
Currently I work migration projects from 4i to 10g discoverer reports (Upgraded 11i to R12). Previously in 4i discoverer reports many views used and data also populated. Same query in discoverer 10g, it returns no data. I can view the data after setting client org id in the toad but can’t view the data in the discoverer reports. Even I tried to register as a function for setting client org id and use in the discoverer reports but result is no rows return. Can any one suggest?
Regards,
Prasanna
no dataHi,
Check Metalink Note 732826.1. There are some extra steps need to configure R12 with Discoverer.
Rod West -
Report Script returns no data and "java.io.FileNotFoundException" error
When attempting to write to a new file (Eg: C:\TEST.txt), Report Script returns no data and "java.io.FileNotFoundException" error occurs.
This error occurs only in Essbase 9.3.1.3 release, however it works fine in release 9.3.1.0.
After running the report the script, it pops up the follwing message:
"java.io.FileNotFoundException: ..\temp\eas17109.tmp (The system cannot find the file specified): C:\TEST.txt"
When checked the TEST.txt, it was empty.Sorry folks, I just found out the reason. Its because there was no data in the combination what I was extracting.
but is this the right error message for that? It should have atleast create a blank file right? -
Tax Report Returns No Data [Message 131-85]
Our client has been using SBO for the past few years and run the Standard Tax Report.
They follow a standard procedure whereby they open the Tax Report enter the period details and click OK, the report returns all Input and Output Tax details.
This month they have run the report and no matter what dates you enter the report returns No Date [Message 131-85]
Does anyone have any clues as to what might be causing this?I have discovered via a SQL trace that the following script is tun for the tax report
exec sp_executesql N'
SELECT T0.[AbsEntry],
T0.[Code],
MIN(T0.[Name]),
T0.[SrcObjType],
T0.[DocNum],
MIN(T0.[Category]),
MIN(T0.[IsEC]),
T0.[IsAcq],
MIN(T0.[VatPercent]),
MIN(T0.[EqPercent]),
T0.[DocDate],
MIN(T0.[TaxDate]),
MIN(T0.[CANCELED]),
SUM(T0.[BaseSum]),
SUM(T0.[VatSum]),
SUM(T0.[EqSum]),
SUM(T0.[DeductSum] - T0.[EqSum]),
MIN(T0.[SrcObjAbs]),
N''0'',
0,
0,
MIN(T0.[DocDate]),
0,
0,
MIN(T0.[NumAtCard]),
SUM(T0.[BaseSumSc]),
SUM(T0.[VatSumSc]),
SUM(T0.[EqSumSC]),
SUM(T0.[DedctSumSC] - T0.[EqSumSC]),
MIN(T0.[TaxType]),
T0.[CrditDebit],
MIN(T0.[CardCode]),
MIN(T0.[CardName]),
MIN(T0.[SrcLineNum]),
MIN(T0.[VatDate]),
MIN(T0.[VatIdUnCmp]),
MIN(T0.[LicTradNum]),
MIN(T0.[BPLicTradNum]),
MIN(T0.[AddID]),
SUM(T0.[BaseSum])
FROM [dbo].[B1_VatView] T0
WHERE (T0.[Code] = (@P1) OR
T0.[Code] = (@P2) OR
T0.[Code] = (@P3) OR
T0.[Code] = (@P4) OR
T0.[Code] = (@P5) OR
T0.[Code] = (@P6) OR
T0.[Code] = (@P7) OR
T0.[Code] = (@P8) OR
T0.[Code] = (@P9) OR
T0.[Code] = (@P10) OR
T0.[Code] = (@P11) OR
T0.[Code] = (@P12) ) AND
T0.[DocDate] >= (@P13) AND
T0.[DocDate] <= (@P14)
GROUP BY T0.[AbsEntry], T0.[Code], T0.[SrcObjType], T0.[DocNum], T0.[IsAcq], T0.[DocDate], T0.[CrditDebit]
ORDER BY T0.[IsAcq] DESC,T0.[CrditDebit]',N'@P1 nvarchar(30),@P2 nvarchar(30),@P3 nvarchar(30),@P4 nvarchar(30),@P5 nvarchar(30),@P6 nvarchar(30),@P7 nvarchar(30),@P8 nvarchar(30),@P9 nvarchar(30),@P10 nvarchar(30),@P11 nvarchar(30),@P12 nvarchar(30),@P13 datetime2,@P14 datetime2',N'SEXP',N'SFRE',N'SGST',N'SNT',N'PCAF',N'PCAP',N'PFRE',N'PGNR',N'PGST',N'PGSTV',N'PNT',N'PPRI','2010-03-01 00:00:00','2010-03-31 00:00:00'
If I run this in SQL I get the following error, which mat shed some light on what is happening
Msg 2715, Level 16, State 3, Line 1
Column, parameter, or variable #13: Cannot find data type datetime2.
Parameter or variable '@P13' has an invalid data type.
Msg 2715, Level 16, State 3, Line 1
Column, parameter, or variable #14: Cannot find data type datetime2.
Parameter or variable '@P14' has an invalid data type. -
Report returns wrong data when run on server
Hi,
I'm runing CRS XI R2 on Windows Server 2003 SP2. When I refresh a report in the Crystal Reports XI Designer, I'm getting correct data. But when I schedule the report to run on the server it returns wrong data. The data is different from what I see when I refresh it from the designer. In the report I have running totals set up to count customers that meet a certain criteria. The report is very large. It take almost 2 hours to refresh.
I was wondering what is causing the difference in running total data between refreshing it on the designer and running it on the server. Is it returning wrong data b/c of it not reading all the records? Should I be making any changes to the server settings? I saw that under pageserver, there are options for setting the 'Minutes Before an Idle Report Job is Closed' and 'Database Records To Read When Previewing Or Refreshing a Report". Do either of those have anything to do with the report returning incorrect data when being scheduled to run on the server?
Thanks,
KimHi Xuandao,
You would need to Use Cell Binding and Trigger concept to accomplish this.
Its simple, however, you would have to work on a trial and error basis to understand this concept as implementing the same is subject to your dashboard and WEBI Design.
Open you LiveOffice.
Insert your WEBI, Now, go to Object Properties of your WEBI, select the second tab that says Prompt, Here, it lists the prompts that you have for your WEBI. This would also enlist your BEx variables as well. Select this BEx variable and click on the button that says Prompt at the bottom of this window. Here, select choose Excel Data Range and click on the cell select button on the right (small button that lets you choose what cell you want to bind this prompt to), Now select a free cell that would not be even populated later on when you run the dashboard say A1 (remember the value that you select). Click on OK and again OK. The WEBI Refreshes and you can see all the prompt values at the cell A1. These are all the possible values stored for your BEx prompt variables (these values are fetched from BW system dynamically).
Now, save this LiveOffice, Go to you dashboard. Connect your dashboard to your Live office. Go to Data-> connections-> Now, select the WEBI and in the right hand pane go to Usage tab, here, Click on Trigger cell button on the right hand side and select A1 in you LiveOffice.
It should work fine.
Let me know.
Rgds,
Sreekul Nair -
Report with two Command is empty if one of the two commands returns no data
Hi all,
I have a report with two Commands not linked together.
If ONLY one of the two Commands returns no data, the full report is empty (although the other Command returns data).
I'm using Crystal Report 2008 and the CRJ 12.2.205
Have an idea?Hi Ted,
how can I solve the problem, please? It is important.
If I can help yourself, the problem is appeared in many reports since I updated the library (the old library version 11.8.4.1094 works fine with all). I'm waiting for your answer, please.
Thank you very much. -
CSV spreadsheet returning "no data found"
Hi,
In one of the reports, I enabled CSV Output so the report can be downloaded.
When I download it, using Excel 2000, I have no problem, I can see all the right data.
However, one of my user, who uses Excel 2002, when saves the file and opens it, returns "no data found" on screen.
Is this an Excel issue? Is Apex not compatible with Excel 2002? Please advise.
Thanks!Do you have any items on your report page, which you use as a condition for the report? Eventually, you need to compute those items on load. If I remember correctly that was the problem I had before.
Denes Kubicek
Maybe you are looking for
-
Made a drop down menu. How can I get the drop down to fade in and out? !
Hi guys! I've created a drop down menu (with the help of you legends on here! )...Now I just need it to animate so when the user hovers over the main menu item, the drop down fades in. Here's the HTML I have... <ul id="nav"> <li><a href="
-
Material Master Data from R/3
Hi BW Gurus, I am trying to upload 0material_attr data from r/3 to BW. I am doing good upto replicating master data in BW, but after that I dont know how to follow steps. Please if any one know how to load the master data after replicatin
-
What is the best Method to transport KMC from DEV to QA & PROD
We are trying to figure out what is the best method to transport KMC from DEV to QA & PROD. Your help and feedback is greatly appreciated. David
-
Numbered captions for figures and tables
Can anyone tell me how to create captions for figures and tables such that they are automatically numbers (ex. Figure 1, Figure 2, ...) so that when I remove or add a new figure in the middle of the document I don't have to manually re-number everyth
-
Help. computer froze while installing iwork08
Hi I'm really new to mac computers and I don't know how to fix a frozen imac. I bought it a few weeks ago and today i installed iwork08. I went to view the iwork tour and my computer froze and went to this dark screen with a gray box in the middle wi