Continuing column from last row of column to first row of next column.
Hi! I have been wrestling this bear for weeks now. I am scanning a lot of seals the same size, approximately 3" x 2". I only want my spreadsheet to scan 1 number in each cell and when it reached the bottom of Column A Row 8, I want the next # I scan to jump to Column B Row 1 and continue dow until it gets to the bottom of Column B Row 8, then I want it to jump to the next column, Column C and scan to the bottom row.
Can I do this????? Help!
I am working on an upcoming election and I have created a spreadsheet with 4 columns and 8 rows. I am scanning seals with barcodes on them. Each has its own unique barcode. I use a handheld scanner, like you would see someone at Wal-Mart scanning inventory or doing a price check. When I begin scanning these seals the first one I scan goes into cell A1 and then automatically moves to the next row down. Then I scan the next and it goes into A2, etc. BUT when I reach A8, and scan the next #, it moves into A9 but I want it to go to B1. This is a small election and I don't have as many to do this time and I am trying to figure out how to make it do this now so I have my template ready for the next big election. The seals are all attached like a continuous roll of mailing labels. I am only doing 28 seals this time for each location but I have over 40 locations. 1 page of 28 seals, all with individual barcoded seals for each. In a big election I might scan 80 - 90 seals per location and going all down one column would take several pages. (I use a large font so they can easily be read). Otherwise I have to stop at the bottom, A8, go to the keyboard and move the mouse to click in B1 and start scanning the next 8 #'s. So what I am trying to do is this ...... I have a roll of seals and I begin scanning each seal without having to use the keyboard and touchpad. After each barcode scan it automatically moves to the next cell down. When I reach A8 and scan the barcode I want it to automatically move to B1. I want my table to end at A8 as if there is no other cell below it. I actually have an Excel SS set up in Windows and it will do this on some I have created, but not others. I can do a Save As but it doesn't bring that feature over and I can't figure out how I got it set to do that in the first place.!??? Those crazy Windows machines! So I am trying to see if I can get my Numbers SS to do this. Maybe it is not an option in Numbers. Sorry for the long detail but if somebody knows how to do this I sure would appreciate that info. Thanks!!!
Similar Messages
-
Link column from an interactive report to insert a row in a tabular form
Hi, I need your help, i'm new on APEX and i really need to make a "link column" from an "interactive report" to insert a row into a "tabular form".
I mean that when you click the "link column" instantly create a new row in the Tabular form with the information of the linked row on the interactive report. Its something like that.
I really appreciate your help.
Ricardo CapuzHi Ricardo,
You can use the following code as per your requirement (this is just an example),
(In this case IR report is in Page#1 and Tabular form is in Page#2),
On Page#1, Create a hidden item (i.e 'P1_ID')
IR Report query as like the below,
select empno,
ename,
job,
mgr,
hiredate,
sal,
comm,
deptno,
empno "copy"
from empUse the below JS code in Page HTML Header section,
function f_insert_row(pSub)
$s('P1_ID',pSub);
doSubmit('ADD');
Edit Report Attribute -> copy column -> Under Column Link
Link Text: Select your column name (i.e. #EMPNO#)
Target: URL
URL: javascript:f_insert_row(#EMPNO#);
Then create a process to insert like below,
BEGIN
insert into emp_test (select * from emp where empno=:P1_ID);
END;Process condition as * Request=Expression1* in Expression1 as 'ADD'.
At last, create a branch to Page#2, Check 'include process success message' and with the same condition as * Request=Expression1* in Expression1 as 'ADD'.
Thanks,
Lakshmi -
Moving information from last name field into blank first name field?
Is there a script (or does anyone know how I can make a workflow in Automator) for moving information from the last name field in Addressbook to the first name field (which is currently blank)? I want to move information from the last name field to the first name field in over 500 addressbook entries, and it would take me all night to do it manually.
Dear Michael,
the scenario is like we r implememting portal all our customers around 2000 .
so we cannt expect them to remember the same spellins as what we gave.
no one else can change other password as it need to give the id and email correctly
i have checked it in logon par file.......
the java files r not included in it..... to modify and deploy it again....
do u have any idea where we can change it other than java files or how to get this source files -
How can I select columns from a table EMP, using Select statement?.
Hi Friends,
How can I select columns from a table EMP?.
I want to select columns of EMP table, using select statement.
Please reply me urgently.
ShahzadSomething like this:
scott@DBA> select empno,ename,job from emp;
EMPNO ENAME JOB
7369 SMITH CLERK
7499 ALLEN SALESMAN
7521 WARD SALESMAN
7566 JONES MANAGER
7654 MARTIN SALESMAN
7698 BLAKE MANAGER
7782 CLARK MANAGER
7788 SCOTT ANALYST
7839 KING PRESIDENT
7844 TURNER SALESMAN
7876 ADAMS CLERK
7900 JAMES CLERK
7902 FORD ANALYST
7934 MILLER CLERK
14 rows selected.Check the documentation:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
Message was edited by:
Delfino Nunez -
Column text to flow across more than one page in same column
I am trying to write a document of several pages with three, or maybe even four columns. There will be text headers in one column, alongside which there will be the main text associated with the headers. In another column there will some more key phrases, and again these will need to be lined up against particular text in the first two columns.
I would like to make the text in one column stay in that single column across the whole document, and not flow into the next column on the particular page. I know that using a succession of text boxes is one solution, but it is clumsy and is also difficult to manage. Perhaps another solution would be to use a table, but again that feels clumsy.
Can anyone advise on the best way to do this please.Hi everyone and thanks for your help. I tried to explain more clearly than I seem to have done. Walt has understood that I want the text in column one, page one, to flow to column one, page two; and the text from column two, page one, to flow to column two, page two, etc. I thought it might have to be text boxes. I now need to learn about how to 'link' them, and whether it is across or down the page I need to create the links.
The document is an aide memoire or manual for a trainer to use. It has the media to be used in one column, the visual aid in the next column and the notes in column three. I might also include a fourth column to show essential or key questions etc that have to be used.
Thanks again everyone. -
[Solved] 27.8.4 How to Create a VO on a REF CURSOR - Missing first row
Searching the forum I found: BC4J - Get one less row from view object.
Dive into BC4J related --REF CURSOR (Resultset)
The first message did not have any answers, and the second had a follow up question - still no answers though - and I thought I would try a different title.
(This is off topic, but it would be a great help if the search results also displayed the number of replys in the thread. That way, I wouldn't have to view the messages that don't have responses.)
(This will be deployed on a server that has the ADF for JDeveloper 10.1.2 installed, so using that version of JDeveloper to develop the app.)
Okay, back to the problem ==>
I created a VO from a ref cursor, using the manual as a guide. When I run a page that displays a read only table of the view object, I am missing the first row. (Always the first row!) I don't have any order set, and if I call the ref cursor in a Java program for testing, I see all rows and the count is correct.
One other point, when I call the page, I get the following validation error:
Validation Error
You must correct the following error(s) before proceeding:
* JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=null
* null
I still see the table, it is just missing the first row of data.
In my form I have first, previous set, next set , and last
navigation buttons. If I press last then first, the error goes away. I still don't see the missing row though.
Any guidance would be appreciated! I can post my code, but it is pretty much the same code in the AdvancedViewObjectExamples.zip in the ViewObjectOnRefCursor example. I just substituted my two package calls (getRefCursor and getRefCursorCount).
Thanks, KenWent back to a backup copy of the source. Fixed the error. Now I'm back to just not being able to see the first row of data.
Additional Note: I had removed fields in the display. Once I truncated the ps_txn table in the schema defined by the model, the data would display (Still without the first record.)
Are there any examples that are more in depth than the few pages in the developer guide?
Here is the code for my VOImpl class:
package newslinearchive.model.datamodel;
import java.math.BigDecimal;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.sql.Types;
import oracle.jbo.InvalidParamException;
import oracle.jbo.JboException;
import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;
import oracle.jbo.server.DBTransaction;
import oracle.jbo.server.QueryCollection;
import oracle.jbo.server.SQLBuilder;
import oracle.jbo.server.ViewObjectImpl;
import oracle.jbo.server.ViewRowImpl;
import oracle.jbo.server.ViewRowSetImpl;
import oracle.jdbc.driver.OracleCallableStatement;
import oracle.jdbc.driver.OracleTypes;
// --- File generated by Oracle ADF Business Components Design Time.
// --- Custom code may be added to this class.
// --- Warning: Do not modify method signatures of generated methods.
public class SearchRefCursorImpl extends ViewObjectImpl {
* This is the default constructor (do not remove)
public SearchRefCursorImpl() {
* Overridden framework method.
* Executed when the framework needs to issue the database query for
* the query collection based on this view object. One view object
* can produce many related result sets, each potentially the result
* of different bind variable values. If the rowset in query is involved
* in a framework-coordinated master/detail viewlink, then the params array
* will contain one or more framework-supplied bind parameters. If there
* are any user-supplied bind parameter values, they will PRECEED the
* framework-supplied bind variable values in the params array, and the
* number of user parameters will be indicated by the value of the
* numUserParams argument.
protected void executeQueryForCollection(Object qc,Object[] params,int numUserParams) {
storeNewResultSet(qc,retrieveRefCursor(qc,params));
super.executeQueryForCollection(qc, params, numUserParams);
* Overridden framework method.
* Wipe out all traces of a built-in query for this VO
protected void create() {
getViewDef().setQuery(null);
getViewDef().setSelectClause(null);
setQuery(null);
* Overridden framework method.
* The role of this method is to "fetch", populate, and return a single row
* from the datasource by calling createNewRowForCollection() and populating
* its attributes using populateAttributeForRow().
protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
* We ignore the JDBC ResultSet passed by the framework (null anyway) and
* use the resultset that we've stored in the query-collection-private
* user data storage
rs = getResultSet(qc);
* Create a new row to populate
ViewRowImpl r = createNewRowForCollection(qc);
try {
* Populate new row by attribute slot number for current row in Result Set
// populateAttributeForRow(r,0, rs.getLong(1));
// populateAttributeForRow(r,1, rs.getString(2));
// populateAttributeForRow(r,2, rs.getString(3));
// MASTERID NOT NULL NUMBER
populateAttributeForRow(r,0, rs.getBigDecimal(1));
//ID NOT NULL NUMBER
populateAttributeForRow(r,1, rs.getBigDecimal(2));
// CAID NOT NULL NUMBER
populateAttributeForRow(r,2, rs.getBigDecimal(3));
// LANGUAGE NOT NULL VARCHAR2(30)
populateAttributeForRow(r,3, rs.getString(4));
// IS_CURRENT_VERSION NOT NULL NUMBER(1)
populateAttributeForRow(r,4, rs.getBigDecimal(5));
// FOLDER_ID NOT NULL NUMBER
populateAttributeForRow(r,5, rs.getBigDecimal(6));
// FOLDER_REGION_ID NOT NULL NUMBER
populateAttributeForRow(r,6, rs.getBigDecimal(7));
// NAME NOT NULL VARCHAR2(256)
populateAttributeForRow(r,7, rs.getString(8));
// DISPLAY_NAME VARCHAR2(256)
populateAttributeForRow(r,8, rs.getString(9));
// ITEMTYPE NOT NULL VARCHAR2(30)
populateAttributeForRow(r,9, rs.getString(10));
// SUBTYPE VARCHAR2(40)
populateAttributeForRow(r,10, rs.getString(11));
// SUBTYPE_CAID NUMBER
populateAttributeForRow(r,11, rs.getBigDecimal(12));
// PARENT_ITEM_ID NUMBER
populateAttributeForRow(r,12, rs.getBigDecimal(13));
// CATEGORY_ID NUMBER
populateAttributeForRow(r,13, rs.getBigDecimal(14));
// CATEGORY_CAID NUMBER
populateAttributeForRow(r,14, rs.getBigDecimal(15));
// AUTHOR VARCHAR2(50)
populateAttributeForRow(r,15, rs.getString(16));
// DESCRIPTION VARCHAR2(2000)
populateAttributeForRow(r,16, rs.getString(17));
// PUBLISH_DATE NOT NULL DATE
populateAttributeForRow(r,17, rs.getDate(18));
// EXPIREMODE VARCHAR2(90)
populateAttributeForRow(r,18, rs.getString(19));
// EXPIRENUMBER NUMBER
populateAttributeForRow(r,19, rs.getBigDecimal(20));
// EXPIREDATE DATE
populateAttributeForRow(r,20, rs.getDate(21));
// IMAGE VARCHAR2(350)
populateAttributeForRow(r,21, rs.getString(22));
// KEYWORDS VARCHAR2(2000)
populateAttributeForRow(r,22, rs.getString(23));
// URL VARCHAR2(4000)
populateAttributeForRow(r,23, rs.getString(24));
// FILENAME VARCHAR2(350)
populateAttributeForRow(r,24, rs.getString(25));
// TEXT CLOB()
populateAttributeForRow(r,25, rs.getClob(26));
// FOLDER_LINK_ID NUMBER
populateAttributeForRow(r,26, rs.getBigDecimal(27));
// FOLDER_LINK_CAID NUMBER
populateAttributeForRow(r,27, rs.getBigDecimal(28));
// ACTIVE NOT NULL NUMBER(1)
populateAttributeForRow(r,28, rs.getBigDecimal(29));
// CAN_BE_CHECKEDOUT NUMBER(1)
populateAttributeForRow(r,29, rs.getBigDecimal(30));
// IS_ITEM_CHECKEDOUT NUMBER(1)
populateAttributeForRow(r,30, rs.getBigDecimal(31));
// CHECKER_USERNAME VARCHAR2(256)
populateAttributeForRow(r,31, rs.getString(32));
// CHECKOUT_DATE DATE
populateAttributeForRow(r,32, rs.getDate(33));
// FULLSCREEN NOT NULL NUMBER(1)
populateAttributeForRow(r,33, rs.getBigDecimal(34));
// INPLACE NOT NULL NUMBER(1)
populateAttributeForRow(r,34, rs.getBigDecimal(35));
// CREATEDATE NOT NULL DATE
populateAttributeForRow(r,35, rs.getDate(36));
// CREATOR NOT NULL VARCHAR2(256)
populateAttributeForRow(r,36, rs.getString(37));
// UPDATEDATE DATE
populateAttributeForRow(r,37, rs.getDate(38));
// UPDATOR VARCHAR2(256)
populateAttributeForRow(r,38, rs.getString(39));
// SECURITY VARCHAR2(25)
populateAttributeForRow(r,39, rs.getString(40));
// VISIBLE NOT NULL NUMBER(1)
populateAttributeForRow(r,40, rs.getBigDecimal(41));
// SEQUENCE NOT NULL NUMBER
populateAttributeForRow(r,41, rs.getBigDecimal(42));
// CATEGORY_SEQUENCE NOT NULL NUMBER
populateAttributeForRow(r,42, rs.getBigDecimal(43));
// AUTHOR_SEQUENCE NOT NULL NUMBER
populateAttributeForRow(r,43, rs.getBigDecimal(44));
// CREATE_DATE_SEQUENCE NOT NULL NUMBER
populateAttributeForRow(r,44, rs.getBigDecimal(45));
// ITEMTYPE_SEQUENCE NOT NULL NUMBER
populateAttributeForRow(r,45, rs.getBigDecimal(46));
catch (SQLException s) {
throw new JboException(s);
return r;
* Overridden framework method.
* Return true if the datasource has at least one more record to fetch.
protected boolean hasNextForCollection(Object qc) {
ResultSet rs = getResultSet(qc);
boolean nextOne = false;
try {
nextOne = rs.next();
* When were at the end of the result set, mark the query collection
* as "FetchComplete".
if (!nextOne) {
setFetchCompleteForCollection(qc, true);
* Close the result set, we're done with it
rs.close();
catch (SQLException s) {
throw new JboException(s);
return nextOne;
* Overridden framework method.
* The framework gives us a chance to clean up any resources related
* to the datasource when a query collection is done being used.
protected void releaseUserDataForCollection(Object qc, Object rs) {
* Ignore the ResultSet passed in since we've created our own.
* Fetch the ResultSet from the User-Data context instead
ResultSet userDataRS = getResultSet(qc);
if (userDataRS != null) {
try {
userDataRS.close();
catch (SQLException s) {
/* Ignore */
super.releaseUserDataForCollection(qc, rs);
* Overridden framework method
* Return the number of rows that would be returned by executing
* the query implied by the datasource. This gives the developer a
* chance to perform a fast count of the rows that would be retrieved
* if all rows were fetched from the database. In the default implementation
* the framework will perform a SELECT COUNT(*) FROM (...) wrapper query
* to let the database return the count. This count might only be an estimate
* depending on how resource-intensive it would be to actually count the rows.
public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
Long result = (Long)callStoredFunction(NUMBER,
"PORTAL.SEARCH_REFCURSOR.getRefCursorCount",
viewRowSet.getParameters(true));
return result.longValue();
// ------------- PRIVATE METHODS ----------------
* Return a JDBC ResultSet representing the REF CURSOR return
* value from our stored package function.
* new Object[]{getNamedBindParamValue("Email",params)}
private ResultSet retrieveRefCursor(Object qc, Object[] params) {
ResultSet rs = (ResultSet)callStoredFunction(OracleTypes.CURSOR,
"PORTAL.SEARCH_REFCURSOR.getRefCursor",
null);
return rs ;
private Object getNamedBindParamValue(String varName, Object[] params) {
Object result = null;
if (getBindingStyle() == SQLBuilder.BINDING_STYLE_ORACLE_NAME) {
if (params != null) {
for (Object param : params) {
Object[] nameValue = (Object[])param;
String name = (String)nameValue[0];
if (name.equals(varName)) {
return (String)nameValue[1];
throw new JboException("No bind variable named '"+varName+"'");
* Store a new result set in the query-collection-private user-data context
private void storeNewResultSet(Object qc, ResultSet rs) {
ResultSet existingRs = getResultSet(qc);
// If this query collection is getting reused, close out any previous rowset
if (existingRs != null) {
try {existingRs.close();} catch (SQLException s) {}
setUserDataForCollection(qc,rs);
hasNextForCollection(qc); // Prime the pump with the first row.
* Retrieve the result set wrapper from the query-collection user-data
private ResultSet getResultSet(Object qc) {
return (ResultSet)getUserDataForCollection(qc);
* Return either null or a new oracle.jbo.domain.Date
private static Date nullOrNewDate(Timestamp t) {
return t != null ? new Date(t) : null;
* Return either null or a new oracle.jbo.domain.Number
private static Number nullOrNewNumber(BigDecimal b) {
try {
return b != null ? new Number(b) : null;
catch (SQLException s) { }
return null;
//----------------[ Begin Helper Code ]------------------------------
public static int NUMBER = Types.NUMERIC;
public static int DATE = Types.DATE;
public static int VARCHAR2 = Types.VARCHAR;
public static int CLOB = Types.CLOB;
* Simplifies calling a stored function with bind variables
* You can use the NUMBER, DATE, and VARCHAR2 constants in this
* class to indicate the function return type for these three common types,
* otherwise use one of the JDBC types in the java.sql.Types class.
* NOTE: If you want to invoke a stored procedure without any bind variables
* ==== then you can just use the basic getDBTransaction().executeCommand()
* @param sqlReturnType JDBC datatype constant of function return value
* @param stmt stored function statement
* @param bindVars Object array of parameters
* @return function return value as an Object
protected Object callStoredFunction(int sqlReturnType, String stmt,
Object[] bindVars) {
CallableStatement st = null;
try {
st = getDBTransaction().createCallableStatement("begin ? := " + stmt +
"; end;", 0);
st.registerOutParameter(1, sqlReturnType);
if (bindVars != null) {
for (int z = 0; z < bindVars.length; z++) {
st.setObject(z + 2, bindVars[z]);
st.executeUpdate();
return st.getObject(1);
catch (SQLException e) {
throw new JboException(e);
finally {
if (st != null) {
try {
st.close();
catch (SQLException e) {}
/**Gets the bind variable value for Email
public String getEmail() {
return (String)getNamedWhereClauseParam("Email");
/**Sets <code>value</code> for bind variable Email
public void setEmail(String value) {
setNamedWhereClauseParam("Email", value);
/**getEstimatedRowCount - overridden for custom java data source support.
public long getEstimatedRowCount() {
long value = super.getEstimatedRowCount();
return value;
Thanks, Ken -
af:table, only the first row of the table is effect
Hi experts,
I have an issue about using the <af:table, needs your help:
1.The default selected line is the first line of the table(This should be ok).
2.Only the first line can react to my manipulate, such as select one line and click delete button.
3.While choosing the other line-->click the command button, the page will be refreshed and the selected one will turned to the first line. (Now the selected row, will be the first row). And will do nothing ,and has no action with the command button.
I have an page OVS_Server.jspx, parts of it is :
<af:table value="#{backVS.serverList}"
var="row" rows="20"
emptyText="#{globalRes['ovs.site.noRows']}"
binding="#{backing_app_broker_OVS_Server.serverListTable}"
id="serverListTable" width="100%"
partialTriggers="poll1 commandButton_refresh commandButton_searchServer"
selectionListener="#{backing_app_broker_OVS_Server.onSelect}">
<f:facet name="selection">
<af:tableSelectOne text="#{globalRes['ovs.site.selectAnd']}" autoSubmit="true"
id="tableSelectOne" required="false">
<af:commandButton text="#{globalRes['ovs.site.server.poweroff']}"
id="commandButton_powerOff"
action="#{backing_app_broker_OVS_Server.powerOffAction}"
partialTriggers="tableSelectOne"
disabled="#{backing_app_broker_OVS_Server.unreachableServer}"
/>
<af:commandButton text="#{globalRes['ovs.site.edit']}"
id="commandButton_edit"
action="#{backing_app_broker_OVS_Server.editAction}"
/>
<af:commandButton text="#{globalRes['ovs.site.delete']}"
id="commandButton_delete"
action="#{backing_app_broker_OVS_Server.deleteAction}"
/>
</f:facet>
<af:column sortProperty="ip" sortable="true"
headerText="#{globalRes['ovs.site.serverHost2']}"
id="column_ip">
<af:commandLink text="#{row.ip}"
id="commandLink_ip"
shortDesc="#{globalRes['ovs.site.viewUpdateDetails']}"
action="#{backing_app_broker_OVS_Server.viewAction}"
immediate="true"/>
</af:column>
<af:column sortProperty="serverName" sortable="true"
headerText="#{globalRes['ovs.site.serverName']}"
id="column_serverName">
<af:outputText value="#{row.serverName}"/>
</af:column>
</af:table>
One JavaBean OVS_Server.java,and part of it is :
public class OVS_Server {
private CoreTable serverListTable;
private VirtualServer selectedServer;
public void onSelect(SelectionEvent selectionEvent) {
selectedServer = (VirtualServer)serverListTable.getSelectedRowData();
public String deleteAction(){
if (selectedServer!=null) {
deleteServerOper.execute();
return "deleteServer";
Would anyone show some lights on it?
Thank you very much.Thank you for your reply!
But the example you mentioned also has the issue like one of the comments :
"Hi, on selecting the first row it displays the correct value, when navigating to another row still it displays the old value and not fetching the new selected row, actually I can see this on your sample screen shots... is there any way we can fix??"
Is there any resolution? -
Hi,
I am using ADF and JSF .
For my table , there is a radio button in front of each row.
Originally, the first row of the table is checked by default. But after clicking the next button, no row is selected.
How to make the first row always is selected by default ?This may or may not work... I've not implemented this myself.
double click the next button, bind to backing bean.
if ( !operationBinding.getErrors().isEmpty() )
return null;
DCBindingContainer dcbindings = (DCBindingContainer)bindings;
DCIteratorBinding usersIter = dcbindings.findIteratorBinding( "UsersIterator" );
usersIter.setCurrentRowWithKey( usersIter.getRowAtRangeIndex( usersIter.getRangeStart() ).getKey() );
return null;
}UsersIterator is what your page def calls the Iterator you want.
Good luck,
Brian -
Hi
I have a adf page.In my page I have a form and detail table.On my table when I want to delete any row, it deletes always first row. Can you halp me?Hi,
Use the VO Operation removeRowWithKey and specify #{row.rowKeyStr} as it's parameter when you drag it onto the page.
Brenden -
Remove specific row and column from 2d array
Hi,
I would like to know how to remove the specific row and column from 2d array.
for example, I have the original 4x4 array as below
2 -1 -1 0
-1 2 0 -1
-1 -1 2 0
-1 -1 -1 3
let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below
2 -1 0
-1 2 -1
-1 -1 3
Thanks.You can't remove elements of an array, it's fixed at a certain size once created. What you can do however is make a new array and only copy the things you want. Something like:public static void main(String[] args) {
Integer[][] bar = new Integer[5][5];
for (int i = 0; i < bar.length; i++) {
Integer[] baz = bar;
Arrays.fill(baz, i);
System.out.println(Arrays.toString(baz));
Integer[][] muu = new Integer[5][4];
removeColumn(3, bar, muu);
for (Integer[] mee : muu) {
System.out.println(Arrays.toString(mee));
Integer[][] smuu = new Integer[4][5];
removeRow(3, bar, smuu);
for (Integer[] mee : smuu) {
System.out.println(Arrays.toString(mee));
public static <T> void removeRow(int row, T[][] a, T[][] result) {
if (row >= a.length) {
throw new IllegalArgumentException("no row at " + row);
for (int a_r = 0, result_r = 0; a_r < a.length; a_r++) {
if (a_r == row) {
continue;
System.arraycopy(a[a_r], 0, result[result_r], 0, a[a_r].length);
result_r++;
public static <T> void removeColumn(int col, T[][] a, T[][] result) {
for (int i = 0; i < a.length; i++) {
if (col >= a[i].length) {
throw new IllegalArgumentException("no column at [" + i + ", " + col + "]");
for (int a_i = 0, r_i = 0; a_i < a[i].length; a_i++) {
if (a_i == col) {
continue;
result[i][r_i] = a[i][a_i];
r_i++; -
How to get the value of column from previous row to current row?
Hi All,
I am facing a critical problem in SQL query (for reporting purpose (COGNOS)). please reply to my query.
REQUIREMENT: i want to retrive value of a column (this is not a table column, this will be calculated based expression) from previous row to current row.
EXAMPLE:
TABLE NAME: i have to join multiple tables. so, i am not mentioning table names here.
DISPLAY COLUMNS in the report: item, loc, sku, beginval (not table column), endval (not table column, this will calculated based on some expressions), etc. Here, first time the value of BEGINVAL will be taken from some x column name of x table. ENDVAL will calculated based on the expression. For the next row onwards, BEGINVAL will become the value of ENDVAL and the value of ENDVAL will be calculated based on the expression and this expression uses the value of BEGINVAL.
my report will look like below.
ITEM LOC SKU BEGINVAL ENDVAL
1 HYD 1-HYD 10 10+1+2 (13)
2 HYD 2-HYD 13 13+1+2 (16)
3 SEC 3-SEC 16 16+1+2 (19)
4 SEC 4-SEC 19 19+1+2 (22)
etc....
in the above output, BEGINVAL and ENDVAL columns are not part of any table. they are alias column names.if you observe intially BEGINVAL will be assigned to some value, but from subsequent rows, BEGINVAL will become the ENDVAL of previous row.
Please help me on how to write this query?Hi, please find the detail description of the problom.
DDL (table scripts)
ITEM
CREATE TABLE ITEM
ITEM VARCHAR2(50 CHAR) NOT NULL,
DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
UOM VARCHAR2(50 CHAR)
SKU
CREATE TABLE SKU
ITEM VARCHAR2(50 CHAR) NOT NULL,
LOC VARCHAR2(50 CHAR) NOT NULL,
OH float
SKUPROJSTATIC
CREATE TABLE SKUPROJSTATIC
ITEM VARCHAR2(50 CHAR) NOT NULL,
LOC VARCHAR2(50 CHAR) NOT NULL,
STARTDATE DATE
VehicleLoad
CREATE TABLE VEHICLELOAD
LOADID VARCHAR2(50 CHAR) NOT NULL,
DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
SHIPDATE DATE DEFAULT TO_DATE('01/01/1970','MM/DD/YYYY') NOT NULL,
ARRIVDATE DATE
VEHICLELOADLINE
CREATE TABLE VEHICLELOADLINE
LOADID VARCHAR2(50 CHAR) NOT NULL,
ITEM VARCHAR2(50 CHAR) NOT NULL,
QTY float(126)
DML scripts
I can't provide the the DML scripts, because its very huge data.
Main QUERY is below.
below is the query which i have to write and execute.
select
i.item,
i.descr,
i.unitsperpallet,
sp.loc,
sp.startdate,
'Crucial_IND',
LAG (EndBal,1,0) OVER (ORDER BY STARTDATE) BeginBal,
SP.FCSTCUSTORDERS CustOrders,
SP.COMMITINTRANSOUT,
SP.RECARRIV,
SP.TOTINTRANSIN,
(BeginBal - sp.FCSTCUSTORDERS - sp.COMMITINTRANSOUT + sp.TOTINTRANSIN ) EndBal,
'CuttingQty',
VLL.QTY,
vl.source,
vl.arrivdate,
vl.shipdate,
vl.loadid,
s.oh
from item i, skuprojstatic sp, sku s, VehicleLoad vl, VehicleLoadLine vll
where sp.item = i.item
and s.item=i.item
and sp.item =s.item (+)
and sp.loc = s.loc (+)
and vll.item = s.item
and vll.loadid = vl.loadid
and to_char(sp.startdate ,'mm/dd/yyyy') = to_char(vl.arrivdate,'mm/dd/yyyy')
and sp.loc = vl.dest (+)
order by sp.startdate
problem description: in the above query, BeginBal and EndBal is what i am looking for. when i execute this query, oracle throwing an error saying that alias names can't be used as expressions. For the first row, the BeginBal should be the value sku.OH and for the subsequent rows, this value will be the previous row value of EndBal. -
Interactive report: Can I exclude a particular column from single row view?
Hi -- I posted on this yesterday (Possible to exclude interactive report column from single row display?
a bit anxious for suggestions, I guess!
I've added a column with edit-link functionality to my interactive report query (that is, the link
is not attached to the database data... it's an additional column and shows an icon). It's also
in addition to the default single row view link. (We need both.)
Unfortunately, the Edit link column shows up in the single row view. I've pared it down as much
as I can: the label is empty, and the null value shows as "-". But an extra row with "-" is pretty
ugly. Is there a way to always, completely exclude this column from the single row view?
I know I could put the edit link on a data column, but:
1) I want the link to always be to the left of the data (and the user can re-order columns)
2) when the user doesn't have edit privileges, the link will need to be disabled or just not
be displayed, and I think that would be a problem if the link were on the data. (true?)
Thanks,
CarolPlease disregard this thread, and the one it refers back to. I see a flaw in the design of what I was attempting to do! Creating the link for Editing as a column means the user could inadvertently not display it, or move it, or... any number of problematic scenarios.
Thanks,
Carol -
Select row and column from header in jtable
hello i have a problem to select row and column from header in jtable..
can somebody give me an idea on how to write the program on it.Hi Vicky Liu,
Thank you for your reply. I'm sorry for not clear question.
Answer for your question:
1. First value of Open is item fiels in Dataset2 and this value only for first month (january). But for other month Open value get from Close in previous month.
* I have 2 Dataset , Dataset1 is all data for show in my report. Dataset2 is only first Open for first month
2. the picture for detail of my report
Detail for Red number:
1. tb_Open -> tb_Close in previous month but first month from item field in Dataset2
espression =FormatNumber(Code.GetOpening(Fields!month.Value,First(Fields!open.Value, "Dataset2")))
2. tb_TOTAL1 group on item_part = 1
expression =FormatNumber(Sum(CDbl(Fields!budget.Value)))
3. tb_TOTAL2 group on item_part = 3 or item_part = 4
expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) + ReportItems!tb_TOTAL1.Value )
4. tb_TOTAL3 group on item_part = 2
expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) - ReportItems!tb_TOTAL2 .Value)
5. tb_Close -> calculate from tb_TOTAL3 - tb_Open
expression =FormatNumber(Code.GetClosing(ReportItems!tb_TOTAL3.Value,ReportItems!tb_Open.Value))
I want to calculate the value of tb_Open and tb_Close. I try to use custom code for calculate them. tb_close is correct but tb_Open is not correct that show value = 0 .
My custom code:
Dim Shared prev_close As Double
Dim Shared now_close As Double
Dim Shared now_open As Double
Public Function GetClosing(TOTAL3 as Double,NowOpening as Double)
now_close = TOTAL3 + NowOpening
prev_close = now_close
Return now_close
End Function
Public Function GetOpening(Month as String,NowOpen as Double)
If Month = "1" Then
now_open = NowOpen
Else
now_open = prev_close
End If
Return now_open
End Function
Thanks alot for your help!
Regards
Panda A -
Including column from fact table reduces number of rows returned
Hello
I am facing this issue where in a report I select 5 columns from a fact table. Out of these five columns one of the column is "Amount" for which the aggregation rule is defined as Sum in RPD.
When I include these five column and filter results based on some criterion , I get all the rows (three rows) that satisfy the criterion. No I add a sixth column to my report and suddenly I only see one row returned by my report. Addition of this sixth column does not affect the criterion as the criterion is not based on this column. But this sixth column is a calculated column.
I tried different things but because the report was just getting columns from one table (fact) and suddenly inclusion of one column leads to reduction in number of rows , I was unable to find any reason why would that happen.
So I thought that some one in community may know that in what scenario this happens.
ThanksAre there any repeated values? I'm wondering if what you're seeing is actually suppression of repetition in the results. Edit the analysis, go to the criteria tab, click column properties, go to the Column Format tab, and change the setting for value suppression from 'Suppress" to "Repeat". Repeat for each of your 6 columns and check the outcome.
Otherwise, I would try testing with other calculations and also bring in some columns from dimension tables to see how this affects the result. You should be able to come up with a case-by-case scenario to work out exactly what causes the rows to be suppressed which will get us one step to closer to working out why the rows get suppressed.
Thanks,
George -
I am working on a chart in pages with 7 columns.
Problem has occurred with amount of rows. I have completed 999 rows and it won't allow me to continue. As I need to do approx 3000+ rows, can anyone explain to me how to add extra rows. Thanks JaneTry posting in the Pages forum
https://discussions.apple.com/community/iwork/pages
Maybe you are looking for
-
ITunes moving to new HD - How to keep Library and Playlists
Old HD was too small so bought a bigger one. Prior to the purchase, I had already move my music to my external HD, doing the consolidate process - everything was working fine. iTunes was on my C drive in the usual doc & settings\sylvain\my music\itun
-
Getting Delivery Date of an item on Purchase to appear in Sales Order form
Hi Experts Can you tell me if and how it might be possible to get the future delivery date of an item on a purchase order to appear at the row level in Sales Orders for an item which is out of stock? I assume it will need some type of formatted sear
-
[SOLVED] HAL don't start-
Hello! It appears that my HAL now [FAIL] at startup even if it is in my rc.conf. I've tried # /etc/rc.d/hal restart :: Stopping Hardware Abstraction Layer [FAIL] :: Starting Hardware Abstraction Layer [FAIL] DBUS is also installed- The weird thing is
-
DVD player that supports 3" disc
I own a DVD camcorder. My DVD player does not recognize or support the 3" disc used for my camcorder. I have been shopping around for DVD players, but I don't know how to tell if it will support the 3" disc. Can anyone educate me on what I need to
-
I would like to confirm I understand correctly what I've read in several other threads regarding size, disk meter, and units of measurement. Is the target size in the Disk Meter measured in Billions of Bytes, hence the max size is 4.7GB? Is the gener