Display present row (JDBC)
Hi
below is the which i used to retrive data from database.I am trying to display the retrived present data.Every time the page is displaying all rows.I just want to display present row not all rows.*rs.next* will move the cursor to next row but when tring to retrive i am getting previous rows data and present row data.can any one say how to solve the problem to display present row not previous rows.
ResultSet rs = st.executeQuery("Select id,temp1 from temperature1");
String s1="";
while(rs.next())
i = rs.getInt(1);
s1= rs.getString(2);
StringTokenizer st1 = new StringTokenizer( s1 , ",");
while (st1.hasMoreTokens()) {
int xyz = Integer.parseInt( st1.nextToken() );
Temp = xyz/2-40;
out.print( Temp+"");
}
Hi,
You are using a while to loop through the result set.
Thats the reason you get all the rows.
Just use a if (rs.next) and get the first row alone.
Before that be sure that you use some order by so that
you get the first row as the present data.
Hope its clear
Thanks
Similar Messages
-
Displaying Alternate row as colored in Cross tab
Hi,
I have a report where I need to display alternate rows as colored.
There is some data in detail section followed by a cross tab in the report header section.
While I am able to display alternate rows as colored in Detail secction for displaying alternate colored rows in Cross tab data I need some help.
Data in cross tab is like this
history geography
Tammy 90 60
Sid 80 50
Julia 70 40
In cross tab for displaying alternate colored rows ie for alternate student names I am using two formulas
- for displaying row values I am using this one
whileprintingrecords;
numbervar d;
d := iif(d=100,255,100);
color(255,255,d);
For displaying alternate colored inner cells ie marks I am using this formula
whileprintingrecords;
numbervar c;
c := iif(c =255,100,255);
color(255,255,c)
I got these formulas after doing Googling
My cross tab is present in report footer and in the generated report it comes separeated in two pages.
In the first page data for Tammy and Sid is displayed while Julia is displayed on next page.
Now the Tammy is coming as yellow colored and as expected Sid is coming as white colored. However Julia which is on next page is coming as white , but logically it should have come as yellow. On the other hand my column data ie marks column is coming fine. Data for tammy and sid is coming as alternately colored and data is Julia on the next page is coming as yellow(as data for Sid is in white)
I am not able to understand why this is happening and what is the correct way to do alternate row coloring in cross tabs
Edited by: thunderball10 on Aug 26, 2010 11:57 AM
Edited by: thunderball10 on Aug 26, 2010 12:00 PMWhere is your variable c being reset.
If in page header or group header and you have repaet group header on new page then c will be reset on each page.
If In groupheader try adding this to reset formula
if not inrepeatedgroupheader then
Ian -
Disabling the display maximum rows per page
My project include many reports with table view, displaying 100 rows.
There is always arrows icon with the option to display maximum rows per page.
If user click on that option the OBIEE crashed, since there are a lot of rows.
I cannot decrese this number since all rows are required for other charts views.
a. Is there a way to set this parameter only for the table view?
b. Is there a way to disable this icon or not presenting it to the user?
c. Is there global way to coonfigure the default displayed rows number (e.g. from 100 to 20)?unfortunately, you are limited to the SRW built-ins in Reports as far as setting object properties is concerned. I have checked this with the Metalink staff and I did get an admission out of them that this is true.
You can set the property in the property palette, but I'm not sure that this helps you as I take it you have a condition you would like to implement. I wish I could help you further, but Reports is limited in some areas, and setting object properties programmatically is one of them. -
Display all rows (starting at row 1)
Hi there
How can I create code (with or without the wizard) in Web Application Designer, that will force the table (analysis web item) to display all rows starting at row 1.
The user is initially presented with a table which is, say, limited to 5 lines at a time. Default scrolling / paging functionality is added, which allows them to page down 5 rows at a time.
I want to be able to provide a button which displays all the rows ... normally this would be done by setting BLOCK_ROW_SIZE to 0 if I am correct.
However, what I have found is that simply setting this parameter, displays all the rows, but from the existing row, so if the user had paged down once already, they are shown rows 6 till the end.
I have played with various combinations of DATA_ROW_FROM, DATA_ROW_TO and BLOCK_ROW_SIZE, and none of those combinations seem to work for me.
I would have thought setting the FROM row to 1, the TO row to 0 and the BLOCK size to 0 would do the trick, but that simply shows all the rows from the current position ... again, I want to go back to the first line and then show all.
Putting 2 commands in the button doesn't seem to work either, as the 2nd command seems to override the 1st command.
Any ideas?
Cheers,
AndrewCome on ... someone must have had to do something like this ...
-
TO Display the row data as column in ALV
Hi experts ,
Need to display the row data in ALV as column.
The column of an ALV has the fieldnames of a table , this needs to be displayed as row data , that is as single row.
How can this can be achieved?Hi,
Actually it is not possible to disaply in multiple lines.
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D49517%26messageID%3D506378%23506378
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D41133%26messageID%3D403371%23403371
This problem was discussed many times in this forum, u can search for more results. -
HI ALL,
I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
I have to display the values in jsf frm table where i'm using DislayCertDetailVO . In dis VO i'm having a column no.of certificaties .taking dis column value when i navigate to other page jsf by selecting a specific row. here i have to display the selected row in multiple times based on the no.of.certificates column value.
I want to display specific row to display multiple time to repeat same row in a table in jsf based on the value from bean or table in database.
Edited by: user9010551 on Apr 28, 2010 6:14 AM
Edited by: user9010551 on Apr 28, 2010 10:33 PMHi, Trying it once more to give more clarity of my scenario.
I have to navigate from 1 screen to the other by picking a given table record/row from the 1st screen. While displaying the record on the 2nd screen the catch is that, I have to display it as many times as the value in a cell of the selected record.
eg.
screen 1
col1 col2 col3
2 order1 item1
[next]
On clicking next it should look like
screen2
col1 col2 col3 col4
order1 item1
order1 item1
where col3 and col4 will be editable by the user and col1 is the value depends how many times i have repeat the row/record
Hope this give more clarity. -
How to display first row value returened from a query as checked as default in a report
How to display first row value returned from a query as checked as default in a report
Example
Parameter 1
Paramerter2
ABD
x(checked)
Test
DEF
JMG
MudassarHi Mudassar,
The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
order to solve the issue.
If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
the specific value in Default Values dialog box.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Input ready query and display only rows
I am trying to replicate scenario which is equivalent to creating manual layout in SEM-BPS with settings for layout category - Key Figures in Data columns, and rows defined individually. In this version it is possible to restrict certain rows as comparision only.
How can I acheive this using Input ready query? In my query I have created a strucure for Planning Items, but I am not able to show certain planning item selections as display only.
Any thoughts?Hello Gregor,
Thanks for you answer.
I already have two structures as mentioned by you.
Can you please let me know what exactly you meant by set the input flag on the cell level? What settings I have to change to set the flag, do I have to use any formula? In my example I have three rows for Planning item row structure and I want only one row to be selected as display only row.
Regards,
Sachin -
How to display presentation variable in a column
Hi all....I have to display presentation variable in a column...
I tried placing @{variable_name} in column formula..
But it is displaying a value 0 ..where the variable carries a date value.
Any suggestions?Take a look at this blog: http://gerardnico.com/wiki/dat/obiee/presentation_variable
Try it out by providing a default format.
Thanks,
BIPuser -
Can we display comments row for row in Input Ready Query...
Dear All,
Currently I have created Web template with Signle Document. When executed it in the Portal it will come up with a "Save" and "Cancel" button of its own and can allowing me to capture comment here & Finally Click on SAVE button which was stored in Documents area in RSA1.
Now I am was trying to figure out to display comments Row for Row in Input Ready Query...
Can you give ideas on this...Check link http://help.sap.com/saphelp_nw04/helpdata/en/1e/99ea3bd7896f58e10000000a11402f/frameset.htm
In query properties in BEx query designer you have to do settings to - Display document links
For metadata, master data, and InfoProvider data for a query, you can display links to Documents that you have created for these objects. If documents exist for these objects, the symbol appears next to these objects. If you click on this symbol, you jump to where the document is displayed on the Web.
Highlight the appropriate setting so that the document links for the desired document class are displayed. The document classes are oriented to the various categories of BW objects. InfoProvider data, metadata and master data. -
How to display the rows number of times by giving the column values?
Hi All,
I want to display the rows number of times as the value exists in num column in the below query
with t AS
( SELECT 'venkatesh' NAME, 'hyd' LOC, 2 NUM FROM DUAL
UNION ALL
SELECT 'prasad' NAME, 'hyd' LOC, 3 NUM FROM DUAL
UNION ALL
SELECT 'krishna' NAME, 'hyd' LOC, 1 NUM FROM DUAL )
SELECT T.* FROM T
CONNECT BY ROWNUM <= NUM
Expected output:
venkatesh hyd 2
venkatesh hyd 2
prasad hyd 3
prasad hyd 3
prasad hyd 3
krishna hyd 1Edited by: Nag Aswadhati on Nov 1, 2012 12:34 AMNag Aswadhati wrote:
Hi All,
I want to display the rows number of times as the value exists in num column in the below query
Expected output:
venkatesh hyd 2
venkatesh hyd 2
prasad hyd 3
prasad hyd 3
prasad hyd 3
krishna hyd 1Using Connect By:-
with t AS
( SELECT 'venkatesh' NAME, 'hyd' LOC, 2 NUM FROM DUAL
UNION ALL
SELECT 'prasad' NAME, 'hyd' LOC, 3 NUM FROM DUAL
UNION ALL
select 'krishna' name, 'hyd' loc, 1 num from dual )
select t.name, t.loc
from t
connect by level <= num
and name = prior name
and (prior sys_guid() is not null);
NAME LOC
krishna hyd
prasad hyd
prasad hyd
prasad hyd
venkatesh hyd
venkatesh hyd
6 rows selected -
How to display more rows in Master-detail form
I am working on APEX3.2.
I have a master-detail form. The detail form always display 15 rows. However, my customer wants the detail display all the rows. I tries to configure the Number of Rows in the report. It doesn't work. How do I do it?
Thanks a lot!Hi:
To increase number of rows displayed you have to set Number of Rows and pay attention to both Number of Rows (Item) and Maximum Row Count.
After that if didn't work, sign out or close the browser then open it again. Sometimes it keeps the value in current session.
Saad, -
Cisco TANDBERG Edge 95MXP Black and White display Presentation mode
Hello, was wondering if anyone would know why our Cisco TANDBERG Edge 95MXP only seems to work in Black and White display Presentation mode, it is a new problem and we have checked the cables and it seems to be okay. The camera works on the screen in full colour.
You need to eliminate the monitor, cabling and presentation source first of all, this is quick and easy to do if you have a monitor tester, but if not...have you tried bypassing the Edge 95MXP and connected the presentation source directly into the monitor? Still b/w?
Tried different presentation source? Still b/w? Try another cable and do it again. Anything else in the circuit, i.e. DA, switcher etc?
What input are you using on the monitor; HDMI, DVI, VGA? Is it b/w on all inputs? Any converters involved, i.e. HDMI to DVI etc?
/jens
Please rate replies and mark question(s) as "answered" if applicable. -
Displaying front row on external monitor (extended desktop)
Hi,
I've buyed a MacBook (black) and a VGA cable to connect to an external monitor. I've configured as extended desktop, no problem to work with regular apps...
But i would like to display Front Row on the external monitor, and not on the internal... it should be possiible as i see many people talking about this kind of configuration, but i do not success...
Can someone tell me how to display front row on the external monitor, or point me where i can configure front row ?
Thanks in advanceThanks, it's a good beginning, but it make the external display also the default for everything else like menu bar,... i do not want to use the whole macbook on the TV, i just want to use the DVD, video clips, photos,... on the TV... it seems for me a regular use : using the mac for the softwares,... and the TV only for the multimedia display...
-
Query for how to display unique rows in a table
Can i have a query for displaying unique rows in a table.
use d query
select distinct col1,col2... from table ;
Maybe you are looking for
-
Scanner does not show up in PSE 9
I've used Photoshop Elements 5 for several years and my Microtek Scanner always appeared as a choice under the "import" menu. Now I spent money on this supposedly improved version of PSE, version 9, and there's NO TWAIN SCANNER. I have to scan throug
-
Hi Friends, i am working in Smartforms, i have a date field when used in smartform its date formate is dd.mm.yyyy but i need dd.mm.yy example while taking printout its coming as 15.05.2008 but i need is 15.05.08, i used SET DATE MASK but its not work
-
Any function module to get all items in SAP INBOX
hi All I am trying to get all the items in my SAP Inbox via rfc. Can anyone help me with any function module to get all items in SAP INBOX. Thanks
-
Attach specific printer to output device
I have created an output device in SPAD tcode .Its name is YSEA. Now i want to attach a specific printer to this output device. Like whenever i use this output device and give a print command, the print should come on this specific printer only. No
-
My Macbook Pro is runny very slow
Hi, I would greatly appreciate your advise and support. Here is the EtreCheck scan I ran on my MacBook Pro. Thanks a lot. Problem description: My MacBook Pro is running very slow EtreCheck version: 2.0.11 (98) Report generated November 20, 2014 at 1: