NULL value in GeoRaster cells?
Hi all,
How to store a NULL value in GeoRaster cells ? For example i need to store raster data of NOAA image of continent of Australia, with null value for cells in the surrounding ocean.
Given the cell depth is 8 BIT U, then the range will be 0 to 255. But i need to assign NULL instead of any value within the range, to ocean cells.
I think the .setBlankCellValue does not help for this.
I do not think Oracle GeoRaster does not recognize Null cell value. But i don't know how.
The geoRaster documentation explain about SDO_GEOR.getNODATA, but how to set it ?
Or do i have to make some kind of alpha layer for this purpose ?
Please advise
Thank you for reading and commenting,
=Damon
Jeffrey,
>
1. setup NODATA value(s) or NODATA value
ranges. for this you can call:
sdo_geor.addNODATA
sdo_geor.getNODATA
sdo_geor.deleteNODATA.
this case, the NODATA value(s) must be in the range
of the cellDepth. in your case with 8bit unsigned, it
must be an non-negative integer in [0,255].
your are talking about NOAA image, I would suggest
you use 0 (zero) as NODATA for the ocean area. In
general, the good image pixels would not be zero.The thing is i need to preserve the whole range of possible value of the cell depth meaningful. Probably best example as oppose to NOAA images, is image derived from raster algebra (eg. substraction).
So i was considering the rest of your suggestion. Bitmap mask or alpha channel might help, BUT
among
sdo_geor.addNODATA
sdo_geor.getNODATA
sdo_geor.deleteNODATA
sdo_geor.setBitmapMask
sdo_geor.getBitmapMask
sdo_geor.mergeLayers
ALL are available in 11gR1 while only the sdo_geor.getNODATA that is available in 10gR2 (the one am using); correct me please. (this is based documents of both versions)
Are you saying that 10gR2 is too obsolete for these, and that i shud upgrade to 11gR1 ?
Please advise.
==================
Other than general requirement for raster in geospatial, that raster should provide NODATA or null value; my specific aim is for (again) focal operation of geoRaster. For example :
- an image of 512 rows x 1024 columns x 1 layer as input
- processed by focal operation (or filtered) by 3 x 3 filter, result is the same size but cells in the row 0, row 511, column 0, and column 1023 ALL have NODATA value
- similarly by 5x5 filter, row[0,1,510,511] and column[0,1,1022,1023] ALL have NODATA value
hope this helps,
JeffreyMany thanks and cheers
=Damon
Similar Messages
-
How to populate null values as blank in cell
Hi All,
I have an query i have data like blow
qtr
data
1Q-4Q 2009
4,069,379
1Q-4Q 2010
3,979,490
and i want result like below
1Q-4Q 2009
4,069,379
% Change
-2%
1Q-4Q 2010
3,979,490
for % age change i have applied the previous function
formula is (data/previous(data)) -1*100
but is coming like below
% Change
0%
1Q-4Q 2009
4,069,379
% Change
-2%
1Q-4Q 2010
3,979,490
for the 1 column i am getting 0% age due to i applied previous function but i don't have data for 2008
so i am trying not to populate 0% for the % change before 2009
I have checked with null value
If (IsNull(Previous [data])) then "" else ([data]/previous[data]) -1*100
so it is populating blanck value but i can not formatting the values as %age
please suggest
how can i solve this issue please advice
Thanks in advance
RanjeetChange your formula to be:
=If(IsNull(Previous([data])=0 then ([data]/previous([data])-1 * 100
You can ignore the else part and it will leave the null cell as blank and you can still use your number format. -
How to set a cell to accept null values.
Hello;
I am having a problem with my insert query. My form, is passing the year (2010 and up) as a null value. I am using access (ugg) and I can't get it to accept this null value. I have tried setting required to no, and allow zero lenght, even deleted the table and remade it.. STILL I get this error:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]Numeric value out of range (null)
The error occurred in C:\Websites\187914kg3\accManage\signUp.cfm: line 234
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 206
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 204
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 4
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 1
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 234
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 206
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 204
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 4
Called from C:\Websites\187914kg3\accManage\signUp.cfm: line 1
232 : <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.securitCode#">,
233 : <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.ExpirationMonth#">,
234 : <cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_VARCHAR">)
235 : </cfquery>
236 :
SQLSTATE
22003
SQL
INSERT INTO MerchandiseOrdersItems (c_ID, cc_type, cc_num, cc_verify, cc_expir_m, cc_expir_y) VALUES ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) )
VENDORERRORCODE
3
This is my form element and query that is causing the problem:
<cfparam name="FORM.ExpirationYear" default="">
<form>
<select name="ExpirationYear" class="formSelect">
<cfloop index="i" from="#VARIABLES.y1#" to="#VARIABLES.y2#">
<option value="#i#"<cfif FORM.ExpirationYear EQ i> selected</cfif>>#NumberFormat(i,"0000")#</option>
</cfloop>
</select>
</form>
<cfquery datasource="#APPLICATION.dataSource#" dbtype="ODBC">
INSERT INTO MerchandiseOrdersItems
(c_ID, cc_type, cc_num, cc_verify, cc_expir_m, cc_expir_y)
VALUES (<cfqueryparam value="#getUpdate.NewID#" cfsqltype="CF_SQL_VARCHAR">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.creditType#">,
<cfqueryparam cfsqltype="CF_SQL_LONGVARCHAR" value="#form.creditCard#">,
<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.securitCode#">,
<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.ExpirationMonth#">,
<cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_VARCHAR" null="yes">)
</cfquery>
The string that is erroring is this:
<cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_VARCHAR">
I still get this error. SO It has to be something inside the access database not allowing this null value. It is set as text right now, allowing zero length and not required.
Can anyone help me please?Hi
Usually the error occurs due to mismatch in datatype of db field and cfsqltype of cfqueryparam. Is "FORM.ExpirationYear " of type date?.
If so <cfqueryparam value="#FORM.ExpirationYear#" cfsqltype="CF_SQL_DATE" null="yes">)
"http://www.adobe.com/livedocs/coldfusion/6.1/htmldocs/tags-b20.htm" (have a look ).
Hope this will solve your issue -
Checking for null value in arraylist
Hi
i have an excel file which i i am reading into an arraylist row by row but not necesarrily that all columns in the row mite be filled. So how do i check for null values in the array list.
try
int cellCount = 0;
int emptyRow = 0;
HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
HSSFSheet sheet = workbook.getSheetAt(0);
Iterator rows = sheet.rowIterator();
myRow = new ArrayList();
int r = 1;
while (rows.hasNext())
System.out.println("Row # " + r);
HSSFRow row = (HSSFRow) rows.next();
Iterator cells = row.cellIterator();
cellCount = 0;
boolean isValid = false;
while (cells.hasNext())
HSSFCell cell = (HSSFCell) cells.next();
switch (cell.getCellType())
case HSSFCell.CELL_TYPE_NUMERIC:
double num = cell.getNumericCellValue();
DecimalFormat pattern = new DecimalFormat("###,###,###,###");
NumberFormat testNumberFormat = NumberFormat.getNumberInstance();
String mob = testNumberFormat.format(num);
Number n = null;
try
n = pattern.parse(mob);
catch ( ParseException e )
e.printStackTrace();
System.out.println(n);
myRow.add(n);
//myRow.add(String.valueOf(cell.getNumericCellValue()).trim());
//System.out.println("numeric: " +cell.getNumericCellValue());
break;
case HSSFCell.CELL_TYPE_STRING:
myRow.add(cell.getStringCellValue().trim());
System.out.println("string: " + cell.getStringCellValue().trim());
break;
case HSSFCell.CELL_TYPE_BLANK:
myRow.add(" ");
System.out.println("add empty:");
break;
} // end switch
cellCount++;
} // end while
r++;
}// end while
} myRow is the arrayList i am adding the cells of the excel file to. I have checked for blank spaces in my coding so please help with how to check for the black spaces that has been added to my arraylist.
I have tried checking by looping through the ArrayList and then checking for null values like this
if(myRow.get(i)!=null)
// do something
// i have tried this also
if(myRow.get(i)!="")
//do something
}Edited by: nb123 on Feb 3, 2008 11:23 PMFrom your post I see you are using a 3rd party package to access the Excel SpreadSheets, you will have to look in your API for you 3rd party package and see if there is a method that will identify a blank row, if there is and it does not work, then you have to take that problem up with them. I know this is a pain, but it is the price we pay for 3rd party object use.
In the mean time, you can make a workaround by checking every column in your row and seeing if it is null, or perhaps even better: check and see if the trimmed value of each cell has a lenth of 0. -
Shading part of a JTable Cell dependent upon the value of the cell
Hi
Was hoping some one woudl be able to provide some help with this. I'm trying to create a renderer that will "shade" part of a JTable cell's background depending upon the value in the cell as a percentage (E.g. if the cell contains 0.25 then a quarter of the cell background will be shaded)
What I've got so far is a renderer which will draw a rectangle whose width is the relevant percentage of the cell's width. (i.e. the width of the column) based on something similar I found in the forum but the part I'm struggling with is getting it to draw this rectangle in any cell other than the first cell. I've tried using .getCellRect(...) to get the x and y position of the cell to draw the rectangle but I still can't make it work.
The code for my renderer as it stands is:
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;
public class PercentageRepresentationRenderer extends JLabel implements TableCellRenderer{
double percentageValue;
double rectWidth;
double rectHeight;
JTable table;
int row;
int column;
int x;
int y;
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if (value instanceof Number)
this.table = table;
this.row = row;
this.column = column;
Number numValue = (Number)value;
percentageValue = numValue.doubleValue();
rectHeight = table.getRowHeight(row);
rectWidth = percentageValue * table.getColumnModel().getColumn(column).getWidth();
return this;
public void paintComponent(Graphics g) {
x = table.getCellRect(row, column, false).x;
y = table.getCellRect(row, column, false).y;
setOpaque(false);
Graphics2D g2d = (Graphics2D)g;
g2d.fillRect(x,y, new Double(rectWidth).intValue(), new Double(rectHeight).intValue());
super.paintComponent(g);
}and the following code produces a runnable example:
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
public class PercentageTestTable extends JFrame {
public PercentageTestTable()
Object[] columnNames = new Object[]{"A","B"};
Object[][] tableData = new Object[][]{{0.25,0.5},{0.75,1.0}};
DefaultTableModel testModel = new DefaultTableModel(tableData,columnNames);
JTable test = new JTable(testModel);
test.setDefaultRenderer(Object.class, new PercentageRepresentationRenderer());
JScrollPane scroll = new JScrollPane();
scroll.getViewport().add(test);
add(scroll);
public static void main(String[] args)
PercentageTestTable testTable = new PercentageTestTable();
testTable.pack();
testTable.setVisible(true);
testTable.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}If anyone could help or point me in the right direction, I'd appreciate it.
RuanaeThis is an example I published some while ago -
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
public class Fred120 extends JPanel
static final Object[][] tableData =
{1, new Double(10.0)},
{2, new Double(20.0)},
{3, new Double(50.0)},
{4, new Double(10.0)},
{5, new Double(95.0)},
{6, new Double(60.0)},
static final Object[] headers =
"One",
"Two",
public Fred120() throws Exception
super(new BorderLayout());
final DefaultTableModel model = new DefaultTableModel(tableData, headers);
final JTable table = new JTable(model);
table.getColumnModel().getColumn(1).setCellRenderer( new LocalCellRenderer(120.0));
add(table);
add(table.getTableHeader(), BorderLayout.NORTH);
public class LocalCellRenderer extends DefaultTableCellRenderer
private double v = 0.0;
private double maxV;
private final JPanel renderer = new JPanel(new GridLayout(1,0))
public void paintComponent(Graphics g)
super.paintComponent(g);
g.setColor(Color.CYAN);
int w = (int)(getWidth() * v / maxV + 0.5);
int h = getHeight();
g.fillRect(0, 0, w, h);
g.drawRect(0, 0, w, h);
private LocalCellRenderer(double maxV)
this.maxV = maxV;
renderer.add(this);
renderer.setOpaque(true);
renderer.setBackground(Color.YELLOW);
renderer.setBorder(null);
setOpaque(false);
setHorizontalAlignment(JLabel.CENTER);
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col)
final JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);
if (value instanceof Double)
v = ((Double)value).doubleValue();
return renderer;
public static void main(String[] args) throws Exception
final JFrame frame = new JFrame("Fred120");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(new Fred120());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
} -
How to remove NULL values from crosstab sheet in Viewer/Plus.
I created a worksheet as crosstab. The sheet shows blanks in Desktop when there is no data in the cell, but the same sheet is showing NULL in Viewer. Is there any solution to make NULL as 0 or blank in Viewer?
Thank you.Here you can find solution for this issue and its works for me......
Show null values as -
Inserting a 'null' value in an IF THEN ELSE statement
Greetings,
I'm using Business Object webi XiR3
I'd like to return a 'null' value in certain cases for an IF THEN ELSE statement. Depending on if I format the field as a text or a number, I can return blanks ("") and zeros (0). However, what I really need to do is leave the field / column formatted as a number and return a 'null' value. You can see the variable below ... this will return a blank but the column is text.
Suggestions?
thanks.
variable:
=If([Comp Rate Mid] = 0 And( ([Market Rate 50th].085) - [Annual Total Targeted Comp] >=0) ; ([Market Rate 50th]0.85) - [Annual Total Targeted Comp]; If([Comp Rate Mid] <> 0 And( ([Comp Rate Mid] 0.85) - [Annual Total Targeted Comp] >=0) ; ([Comp Rate Mid]0.85) - [Annual Total Targeted Comp];""))I don't think this is possible using a formula, as formulas deal with content, and images can be placed in cells only as 'image fill', which is Format, rather than Content.
Might be possible using an AppleScript, but I'm not the person to advise you on that.
Regards,
Barry -
How to Replace Null Value as 0 in an OBIEE11g Pivot Table?
Hi,
How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
We have tried below methods
1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
E.g. if you want zeros (0) instead of null then enter:
#,##0;-#,##0;0
2) in that formula columns we have put it below case condition also ,
Measure Column: Nom_amt --> edit formulas
CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
3) we have uncheked IS NULL check box in the admin tool also
I tried above formats still it's not working for me..kindly help me on this..
thanks in advance...
Best Regards,
R.DevarasuHi Amith,
I have update your suggested one,but it's working few of the rows only..remainings rows some of cells still NULL only
Measure colmns is : Nom_SGD
IFNULL(Nom_SGD,0.00)
Movment : dynamic date calc by using $2-$1 oracle formula's
Actually i am doing below things only,
31/12/2011 31/03/2011 Movment
Country
India 100 -50 -150
Singapore 200 200
UK 1200 -1200
USA 0.00 0.00 0.00 (here changed null as 0)
Helpmeon this... -
How to show NULL value when import data into excel
when retrieve data from sql server and import these data into excel.
data source is like : select a ,b c from tab
if a,b,c is nullable. when import these NULL value into excel, it becomes blank value, there is nothing in the excel cell.
if i don't want to use select isnull(a,'NULL') as a to convert the values.
what's else can i do to make it? is there a way to prevent changing the NULL to blank ?
or is there an easy solution to replace all the blank value to NULL in the excel ?help me ~
-
Line chart - possible to have an unbroken line through NULL values?
Hi,
I have a line chart. In the middle of my data are a few missing (NULL) values.
Right now, if there is a null value in the data set, the line is broken. Is it possible to have the line connect through these null values without breaking?
I appreciate your help.
Here is an example:
###### DATASET (note the null value on 7/15)
<DATA>
<MY_ROW>
<DT>2009-07-13T00:00:00.000+00:00</DT>
<VAL>5</VAL>
</MY_ROW>
<MY_ROW>
<DT>2009-07-14T00:00:00.000+00:00</DT>
<VAL>10</VAL>
</MY_ROW>
<MY_ROW>
<DT>2009-07-15T00:00:00.000+00:00</DT>
<VAL/>
</MY_ROW>
<MY_ROW>
<DT>2009-07-16T00:00:00.000+00:00</DT>
<VAL>10</VAL>
</MY_ROW>
<MY_ROW>
<DT>2009-07-17T00:00:00.000+00:00</DT>
<VAL>15</VAL>
</MY_ROW>
<MY_ROW>
<DT>2009-07-18T00:00:00.000+00:00</DT>
<VAL>10</VAL>
</MY_ROW>
</DATA>
###### CHART CODE:
<Graph graphType="LINE_VERT_ABS">
<LegendArea visible="false" />
<Title text="" visible="true" horizontalAlignment="CENTER" />
<LocalGridData colCount="{count(xdoxslt:group(.//MY_ROW, 'DT'))}"
rowCount="1">
<ColLabels>
<xsl:for-each-group xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
select=".//MY_ROW" group-by="DT">
<xsl:sort select="current-group()/DT" />
<Label>
<xsl:value-of select="current-group()/DT" />
</Label>
</xsl:for-each-group>
</ColLabels>
<DataValues>
<RowData>
<xsl:for-each-group xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
select=".//MY_ROW" group-by="DT">
<xsl:sort select="current-group()/DT" />
<Cell>
<xsl:value-of select="sum(current-group()/VAL)" />
</Cell>
</xsl:for-each-group>
</RowData>
</DataValues>
</LocalGridData>
</Graph>
I would prefer that the line connect the two adjacent values - 7/14 and 7/16.
Thanks!
- MattHi Matt,
Use this.
But if you don't want to display the date which has null value, we can do that too.
chart:
<Graph depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20" seriesEffect="SE_AUTO_GRADIENT" graphType="LINE_VERT_ABS">
<LegendArea visible="true" />
<LocalGridData colCount="{count(xdoxslt:group(.//MY_ROW, 'DT'))}" rowCount="1">
<RowLabels><Label>VAL</Label>
</RowLabels><ColLabels>
<xsl:for-each-group select=".//MY_ROW" group-by="DT" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:sort select="current-group()/DT" /><Label><xsl:value-of select="current-group()/DT" />
</Label>
</xsl:for-each-group></ColLabels>
<DataValues>
<RowData>
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX,'prev_group', number(0))"/>
<xsl:for-each-group select=".//MY_ROW" group-by="DT" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:sort select="current-group()/DT" /><Cell>
<xsl:variable name="curr_group" select="sum(current-group()/VAL)"/>
<xsl:choose>
<xsl:when test="$curr_group > 0">
<xsl:value-of select="$curr_group"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX,'prev_group')"/>
</xsl:otherwise>
</xsl:choose></Cell>
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX,'prev_group', sum(current-group()/VAL))"/>
</xsl:for-each-group></RowData></DataValues></LocalGridData></Graph> -
Insert a button that will paste a value from one cell to another
I'm hoping to be able to insert a button on a form that, when clicked, will copy the values of certain cells and paste those values into other cells on the same form.
I'm looking to insert another botton that, when clicked, will take the value in one particular cell and add 1 to the value.
Is it possible to have one button perform both actions?I had add the code in my AMimpl method
below is my code
ViewObjectImpl vo = this.getGlJrnlHd1();
Row newRow = vo.createRow();
ViewObjectImpl c1 = this.getCursorC1_1();
Row cr1 = vo.getCurrentRow();
System.out.println ("Curretn row:"+vo.getCurrentRow());
System.out.println (cr1.getAttribute("GrhBu"));
newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));
newRow.setAttribute("GjhPlant", cr1.getAttribute("GrhPlant"));
newRow.setAttribute("GjhJrnlType", cr1.getAttribute("GrvlJrnlType"));
newRow.setAttribute("GjhJrnlNo", cr1.getAttribute("GrvlJrnlNo"));
newRow.setAttribute("GjhJrnlSfx", cr1.getAttribute("GrhJrnlSfx"));
newRow.setAttribute("GjhJrnlDate", "Null");
newRow.setAttribute("GjhYear", cr1.getAttribute("GrvlYear"));
newRow.setAttribute("GjhPeriod", cr1.getAttribute("GrvlPeriod"));
newRow.setAttribute("GjhDesc", cr1.getAttribute("GrhDesc"));
newRow.setAttribute("GjhAppl", "GLM");
newRow.setAttribute("GjhReversal", "N");
newRow.setAttribute("GjhStatus","N");
newRow.setAttribute("GjhCreBy", "NULL");
newRow.setAttribute("GjhCreDate", "NULL");
newRow.setAttribute("GjhUpdBy", "NULL");
newRow.setAttribute("GjhUpdDate", "NULL");
this.getTransaction().commit(); -
Hi all,
As per below coding in my application need to export each column data to excel. total column of my table is 10.
Normally , the 5th column usually is null value and other
column is not null.
the question is below coding can't loop 6-10th column due to 5th column is null value then break.
everybody can tell me how to cause pl/sql can loop 6-10th column even 5th column is null ?
FOR k IN 1..10
LOOP
IF NOT NAME_IN(:system.cursor_item) IS NULL THEN
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_IMP_TYPE' THEN
IF NAME_IN(:system.cursor_item) = 'EI' THEN list_index := 1;
ELSIF NAME_IN(:system.cursor_item) = 'LI' THEN
list_index := 2;
ELSE
list_index := 3;
END IF;
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', GET_LIST_ELEMENT_LABEL('TSCNTRMOV.TS_IMP_TYPE',list_index));
ELSIF GET_ITEM_PROPERTY(:system.cursor_item,DATATYPE) = 'DATE' THEN
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_TRANS_DATE' THEN
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR HH24:MI:SS'));
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR'));
END IF;
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', name_in(:system.cursor_item));
END IF ;
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
next_item;
END IF;
END LOOP;
best regards
borisHi Gerd,
tks for yr remind.
i have another one question. can u help me ?
my trigger is use for export data to excel from data block. i feel it process slow too. because it is a one by one column/row insert.
how to enchance the performance from coding ?
i know that use table type in trigger for store a heap of data then insert to excel once. but i don't know how to implement. can u tell me how to do that .
tks a lot.
pls see below trigger is one by one insert.
PROCEDURE EXPORT_EXCEL IS
app CLIENT_OLE2.OBJ_TYPE;
workbooks CLIENT_OLE2.OBJ_TYPE;
workbook CLIENT_OLE2.OBJ_TYPE;
worksheets CLIENT_OLE2.OBJ_TYPE;
worksheet CLIENT_OLE2.OBJ_TYPE;
args CLIENT_OLE2.LIST_TYPE;
cell CLIENT_OLE2.OBJ_TYPE;
font CLIENT_OLE2.OBJ_TYPE;
patterns CLIENT_OLE2.OBJ_TYPE;
j INTEGER;
k INTEGER;
file_name_cl VARCHAR2(32767);
item_prompt VARCHAR2(32767);
fir_item VARCHAR2(80);
cur_item VARCHAR2(80);
list_index NUMBER (1);
user_cancel EXCEPTION;
BEGIN
-- create a new document
app := CLIENT_OLE2.CREATE_OBJ('Excel.Application');
CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
workbooks := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Workbooks');
workbook := CLIENT_OLE2.INVOKE_OBJ(workbooks, 'add');
worksheets := CLIENT_OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
worksheet := CLIENT_OLE2.Invoke_OBJ(worksheets, 'Add');
go_block('TSCNTRMOV_HB');
j:=2; /* Represents row number */
k:=1; /* Represemts column number */
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell:=CLIENT_OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', 'Container Movement Report');
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '18');
CLIENT_OLE2.SET_PROPERTY (font, 'Bold', True);
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
/* Add the column headings using item prompts */
j:=4 ;
fir_item := Get_Block_Property ( :SYSTEM.CURRENT_BLOCK, FIRST_ITEM );
WHILE ( fir_item IS NOT NULL ) LOOP
cur_item := :SYSTEM.CURRENT_BLOCK || '.' || fir_item ;
item_prompt := GET_ITEM_PROPERTY(cur_item, label);
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
patterns := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'INTERIOR') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', item_prompt);
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY(patterns, 'ColorIndex', '6');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.SET_PROPERTY (font, 'Bold', True);
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
fir_item := GET_ITEM_PROPERTY( cur_item, NEXTITEM ) ;
k := k + 1 ;
END LOOP;
go_block('TSCNTRMOV');
first_record ;
j:=5; /* Represents row number */
k:=1; /* Represemts column number */
LOOP
--FOR k IN 1..38
--LOOP
WHILE (GET_ITEM_PROPERTY(:system.cursor_item,VISIBLE) <> 'TRUE') LOOP
IF NAME_IN(:system.cursor_item) IS NOT NULL THEN
-- WHILE (NAME_IN(:system.cursor_item) IS NOT NULL) LOOP
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_IMP_TYPE' THEN
IF NAME_IN(:system.cursor_item) = 'EI' THEN
list_index := 1;
ELSIF NAME_IN(:system.cursor_item) = 'LI' THEN
list_index := 2;
ELSE
list_index := 3;
END IF;
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', GET_LIST_ELEMENT_LABEL('TSCNTRMOV.TS_IMP_TYPE',list_index));
ELSIF GET_ITEM_PROPERTY(:system.cursor_item,DATATYPE) = 'DATE' THEN
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_TRANS_DATE' THEN
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR HH24:MI:SS'));
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR'));
END IF;
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', name_in(:system.cursor_item));
END IF ;
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
END IF;
NEXT_ITEM;
k := k + 1 ;
END LOOP;
j:=j+1;
k:=1;
IF :system.last_record = 'TRUE' THEN
exit;
ELSE
next_record;
END IF;
END LOOP;
--CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
CLIENT_OLE2.RELEASE_OBJ(worksheet);
CLIENT_OLE2.RELEASE_OBJ(worksheets);
/* release workbook */
CLIENT_OLE2.RELEASE_OBJ(workbook);
CLIENT_OLE2.RELEASE_OBJ(workbooks);
/* Release application */
CLIENT_OLE2.RELEASE_OBJ(app);
EXCEPTION
WHEN user_cancel THEN
RAISE;
END; -
Geting null values from request
hi!
i m producing this code through out.println() method in my page and then using java script
i am submiting this page to another page
<td width="56%"><textarea name="question_no_1"></textarea></td>
<input name="question_no_1_radio1" type="radio" value="radio"></td>
<td width="59%"> <textarea name="question_no_1_ans1"></textarea></td>
<input type="radio" name="question_no_1_radio2" value="radio"></td>
<td><textarea name="question_no_1_ans2"></textarea></td>
<input type="radio" name="question_no_1_radio3" value="radio"></td>
<td><textarea name="question_no_1_ans3"></textarea></td>
<input name="question_no_1_radio4" type="radio" value="radio"></td>
<td><textarea name="question_no_1_ans4"></textarea></td>
but when i submit it to the other page and try to retrieve value of parameter "question_no_1"
through the bellow statement it shows a null value but i have given a value previously by
typing a question in it
System.out.println("the Body Of The First Question Is "+request.getParameter("question_no_1"));
can anybody help me what is going on here.
also if i try to normaly submit first page (ie <form="form1" method="post" action="other_jsp_page.jsp"> ) then the statement in the next page gives me the correct value but
i have to submit the first paper through java script.
if u want to see full detail of my code then go to the following link
http://forum.java.sun.com/thread.jsp?thread=309254&forum=45&message=1237097
thanx in advanceOK, your problem is that you are not submmiting the values to the other page. When you do the
--> document.forms[0].submit();
in JavaScript, the form has to action defined
--> <form name="form1" method="" action="">
So, the page does nothing. The line following the submit just changes the location of the page, IT DOES NOT POST the values.
One solutions is the following:
1.- define an action for your form:
<form name="form1" method="POST" action="'save_paper.jsp">
2.- Then create a JavaScript function that validates the fields and simply return "true" if the form is correct, and false if there is a problem (just a little modification of the one you have).
3.- Then modify your submit button:
Instead of:
<input type="button" name="Save" value="Save" onClick="validateField()">
Try:
<input type="SUBMIT" value="Save" onclick="validateField();"> -
Is it possible to easily view the actual (not displayed) value of a cell?
Is it possible to easily view the actual value of a cell calculated by a formula, not the displayed value after it has been rounded off?
For instance, if you enter the number 1.23456789 and display it rounded to 3 decimal places, you can still see the full, actual value in the formula bar:
The problem arises when you reference that number in a formula: you can't see the underlying value (even though it's obviously known to Numbers):
Is there a way to get the formula bar (or a tooltip) to show the full, unrounded value? Changing the display to more decimal places is not very convenient, especially on big spreadsheets. Maybe it could be done via AppleScript?
A related issue arises when you try to look at the sum or average of a number: if the numbers being summed have the same number of rounded decimals, the sum displayed is rounded too. I find this very annoying: I want to see the actual value, not how my spreadsheet may be displaying it in that cell.
Although, curiously, rounding to any number of decimals as long as they are not all the same displays the full, correct underlying values:
Has anyone come up with workarounds for these issues?I did it with an AppleScript.
Now any time I have a cell or cell range selected, I do one click (AppleScript menu > Display Value at Full Precision), and it shows me a popup alert that simply reads:
rowname : columnname
value
Here's the script:
tell application "Numbers"
try
set selectedTables to (tables of sheets of front document whose selection range is not missing value)
repeat with selectedTable in selectedTables -- tables of each sheet
if contents of selectedTable is not {} then -- the list is not empty, it's the selected sheet
set selectedCells to cells of selection range of (get item 1 of selectedTable)
repeat with i in selectedCells -- each selected cell
set {selectedRow, selectedColumn, selectedVal} to {row, column, value} of i
-- display alert "value of " & name of selectedRow & " : " & name of selectedColumn & " (" & address of selectedRow & ":" & address of selectedColumn & ")" message selectedVal
display alert name of selectedRow & " : " & name of selectedColumn message selectedVal
end repeat
return
end if
end repeat
on error eMsg number eNum
display alert eMsg
end try
end tell
( Props to Jacques Rioux who posted code to get me started at https://discussions.apple.com/thread/3964938 ) -
Not to display the null values from data base
Hiiii.
In a jsp file i have ten check boxes.The jsp file is mapped to a servlet file for parameter requesting and to
store it in DB.
The unchecked box values has null values.All the values are store in a Mysql DB table.
Again i have to display it in a jsp page from table.
The problem am facing was,how can i display only the values in a row.it must not display the null values and the crresponding column name.
Or any other way is their like below
How i can retrieve only the selected check boxes from tht jsp file.and store in backend.
Thanks in Advance
regards,
satheesh kannanHere is a rough example that may give you some ideas:
On the JSP page:
<%if(myData.getFirstName()!=null){%>
Your First Name'
<input type="text" name="firstName" value="<%=myData.getFirstName()%>">
<%}%>
In the servlet:
String firstName= request.getParameter("firstName");
if(firstName!=null){
//write it to the database
}
Maybe you are looking for
-
Lots of my apps will no longer open 10.9.4
Hi, I'm running a 2013 MBP retina 13" on 10.9.4 (2.6 GHz with 8GB Ram) and lately lots of apps have stopped working. Messages, app store, mail, calendar and a few others. The app bounces in the dock once, nothing happens, then it returns to whatever
-
How do i get my sound back when the audio jack is trapped and prevents soun
my macbook dropped on the floor and there was a wire linking the laptop to speakers. however a piece of wire from this lead was stuck in the macbook making the computer think that there is an audio out when there isn't. without having to change the w
-
Adding multiple signatures in one interactive form
Hi, I'm creating an insertion form for a client. THey have one area under credit card info that has a signature line, and another spot at the bottom of the form that has another field for a signature. When I bring the PDF into acrobat Pro and do the
-
Purchase Order Import Conditions
Hi All We are maintaing OB08 for currency conversion, but due to some reasons we have changed the conversion factor in PO Now half the conditions are picking up the rate of PO and other half from OB08 What can be reasons for the same Reagrds Niti Nar
-
WHAT IS BILL OF MATERIAL(BOM)?