Sorting numbers stored as text
Business1 stores ItemCode as an alphanumeric, which makes sense. But we only ever use numbers, so when I try to sort a report by ItemCode, or select a range by ItemCode I get things like this:
4100
41001
4101
4102
42001
42003
42004
4201
Can I get CR to treat these as numbers, and sort/select them as numbers?
Hi Stuart,
try to use any one formula given below , and try to short on this formula field
1] right("00000000" & ,10)
or
2] toNumber()
You can suppress this field,so it will not be visible to the user
Regard's
Similar Messages
-
"Numbers stored as text" error in Excel when I schedule a report
Dear all,
When I schedule a report, I got a "Numbers stored as text" error in Excel.
But when I save as xls directly from webI, I have no error in the excel sheet.
So, is it a bug ? I have the BO XI 4.0 version.
Or is there a special option to set concerning schedule ?
Mike.Hi,
First check the object data type in webi. Normally this error will come when object/variable data type is Text in the report.
If you are getting this error with object data type number then add 0 in the object and see.
Like =[Object] + 0
It will force the value to be converted in the number.
Regards,
Amit -
Sorting numbers stored in variables
I'm completely new at java and would like some help with a certain problem.
I have 5 numbers, num1, num2, num3, num4, and num5.
I have them stored in variables as listed. I'd like to know, is there a way to sort them using array.sort or would I have to use another method?I have 5 numbers, num1, num2, num3, num4, and num5.
I have them stored in variables as listed. Are you saying you have 5 different ints declared like
int num1, num2, etc.or an int[] with length 5?
I'd like
to know, is there a way to sort them using array.sort
or would I have to use another method?If they are stored in an array you can use http://java.sun.com/j2se/1.5.0/docs/api/java/util/Arrays.html#sort(int[])
to sort them. -
Sorting Numbers stored in variables....using if/else
Hey there, I'm curious, how would you sort 3 integers using only five if's and five elses and no other operators besides a < (less than) operator? Some help would be much appreciated! thanks. ishan
well with the topic i brought back there, didnt
really follow the boolean, and i couldnt figure out a
way to simply use only if's elses' and > rather than
using boolean, and what not.. like for integer a, b,
c; would i go into the possible permutations and
start from there? not sure how to go about it..You will need to put them in an array or List. Then you can quicksort them.
Hmmm let me think....
if
length<2 return
choose pivot
if less than pivot
put in left bucket
else
put in right bucket
recurse left bucket
recurse right bucket
returnThat's 2 if's and one else. -
Sorting Names in a text file using java program
h1. Deleting numbers in a text file, sorting the names and writing in to a new file
h2. Sample data
=================
71234 RAJA
89763 KING
89877 QUEEN
==================
h2. Java Program
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
class Sortnames {
public static void main(String args[]) {
try {
ArrayList storeWordList = new ArrayList();
ArrayList storeWordList2 = new ArrayList();
int i;
char c;
String inputfile = "names_konda.txt";
String tempfile = "newdatafile.txt";
String outputfile = "sortedoutput.txt";
StringBuffer strBuff=null;
Writer output = null;
File file =null;
Writer sortedoutput = null;
boolean select =false;
//*********************************************** Reading data from Input file
FileInputStream fstream = new FileInputStream(inputfile);
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
//Read File Line By Line
while ((strLine = br.readLine()) != null) {
storeWordList.add(strLine);
//Close the input stream
in.close();
//*********************************************** Adding only alphabets to buffer and writing to file
file= new File(tempfile);
output = new BufferedWriter(new FileWriter(file));
strBuff = new StringBuffer();
for (Iterator iter = storeWordList.iterator(); iter.hasNext();) {
String s = (String) iter.next();
//System.out.println("String "+s);
for (i = 0; i < s.length() ; i++)
c = s.charAt(i);
if (Character.isLetter(c)) {
strBuff.append(c);
strBuff.append("\n");
String myout = strBuff.toString();
output.write(myout);
output.close();
//============================================== Reading the created file,Sorting and placing in Collections
FileInputStream fstream2 = new FileInputStream(tempfile);
// Get the object of DataInputStream
DataInputStream in2 = new DataInputStream(fstream2);
BufferedReader br2 = new BufferedReader(new InputStreamReader(in2));
String strLine2;
//Read File Line By Line
while ((strLine2 = br2.readLine()) != null) {
storeWordList2.add(strLine2);
Collections.sort(storeWordList2);
//===================================================
File sortedfile = new File(outputfile);
sortedoutput = new BufferedWriter(new FileWriter(sortedfile));
for(int m=0; m<storeWordList2.size(); m++)
if (storeWordList2.get(m).toString().trim().length() > 0)
sortedoutput.write(storeWordList2.get(m).toString());
sortedoutput.write("\n");
sortedoutput.close();
System.out.println("Names Sorted SUCCESFULLY");
br.close();
br2.close();
in.close();
fstream.close();
fstream2.close();
///==========================================
File f1 = new File(tempfile);
boolean success = f1.delete();
if (!success){
System.out.println("failed deletion ");
System.exit(0);
}else{
System.out.println("deleted");
// ==========================================
} catch (Exception e) {//Catch exception if any
System.out.println("Error: " + e);
h2. Thanks and regards
h1. BalaNagaRaju.M
h1. [email protected]Do you have a question? Also see the sticky welcome post on how to post formatted code.
-
Make Number stored as text - in excel using ABAP
Hello all,
How can I make a value to be stored as text in excels, without adding apostrophe in front of the value using ABAP.
Im using ECC6.0 system. In erlier version 4.6C, values are displaying as numbers.
We are calling methods in RSAQEXCE dynamically in our program to get the excel.
Can any one help me in this regard.
Thanks in advance.
Best Regards,
Sasidhar Reddy Matli.Hi Sasidar,
In Excel right click the column select format cells and then select the format as text which is general by default.
Regards,
Anil. -
Hi~
when write a table to MS Excel, the number all stored as text as you can see green flag on left top corner of each cell, this is cause the fomula in upper cell un-workable.
the code that used to write excel as below:
have you even seen this before? pls advice, thx!Hi ELI,
but in this way we waste much time to write excel, bcs the table was written to cell one by one.
Nobody mentioned to write cell by cell. You still can write full columns or even 2d arrays of data - you just have to separate strings from numbers!
can we solve this error in LabVIEW? with activeX..
There is no error in LabVIEW. And there is no error in Excel. It's an error in your programming!
By now you got two different solutions presented, how much more do you need?
I thought you learned a lesson by now. But you still feed us with breadcrumbs of information with each of your posts: Now you bring the execution time into play… -
How to disable numbers in a text type or field ?
Hi,
Any option of disabling numbers in a text type or field ? For E.G. in the PO header text can we prevent users from entering number or values ?
Thanks.No, not without own programming
-
How to make numbers in message text input fields left aligned?
Hi Friends
I have completed one of my task .but getting result right side of the field.
how to make numbers in message text input fields left aligned?
Thanks
AravindaHi ,
Sorry for late replay i am trying this alos not set that page....
pageContext.forwardImmediatelyToCurrentPage(null, true, null);
and one more that kff field working is fine for ex display any text pled displayed properly and only problem is not set the value and HrSitKeyFlex6 and HrSitKeyFlex7 fields are perfectly get the values but not pront HrSitKeyFlex8 that only my issue....
Regards,
Srini -
I updated my iphone 4 and my daughter's iphone 4s. It's a family share plan - same bill, different phone numbers. My texts are showing up on her phone, and vise versa. Only to contacts that we both have - ex. my mother I'm sure I've done something wrong in the icloud share ........help.
ON either device go to settings - message - send&receive - either uncheck or remove the apple id.
-
How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
Thank you!Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave. -
How do I add a list of numbers stored in an array
How do I add a list of numbers stored in an array? The code I
have is showing ‘NaN’ when I try to add the second item
in each element of the array:
var aItemPrices:Array = new Array(["item1_mc", 10], ["item
2_mc", 20], ["item 3_mc", 30]);
var totalPrice:Number;
for (i=0; i<aItemPrices.length; i++) {
//the following line traces 'NaN'
totalPrice += aItemPrices
[1];
trace("totalPrice: "+ totalPrice);i modified your code in 2 places, check it
var aItemPrices:Array = new Array(["item1_mc", 10], ["item
2_mc", 20], ["item 3_mc", 30]);
var totalPrice:Number=0; //Mani changes
for (i=0; i<aItemPrices.length; i++) {
//the following line traces 'NaN'
totalPrice += aItemPrices
[1];//Mani changes
trace("totalPrice: "+ totalPrice); -
Report displaying numbers instead of text.
Hello Everyone,
We have a planning application. I created a smartview report for employees, their hiring justification and man months. I tried to create a this report through by connecting to essbase server. In the report, I got random numbers for the text data (like 1431 for hiring justification of an employee). Later I found out that the text data was loaded through smartview to planning server, and not to Essbase server. Thats probably the reason I am seeing (Indexes) numbers for text fields.
Is there a way to still generate the report from essbase server, or do we have to load that data to essbase app of the planning application ?As Jogn said you would have to use the planning connection. The smart lists used in planning are not in Essbase. Essbase stores the smartlist ID number not the text value.
-
Sorting numbers Zen Mozaic EZ 100
!Sorting numbers Zen Mozaic EZ 00= Hi, I have a Creative Zen Mozaic EZ 00, and I use this player primary for <span class="Apple"><span class="Apple">Audiobook.
<span class="Apple"><span class="Apple">I have a problem when I transfer more than book to my player.
<span class="Apple"><span class="Apple">?
<span class="Apple"><span class="Apple">When I use the Albums, alle the files are not sorted, why isn't is sorted using the filename.
<span class="Apple"><span class="Apple">?
<span class="Apple"><span class="Apple">The only solution I have found, is using all tracks, here the files are sorted in filename order.
<span class="Apple"><span class="Apple">?
<span class="Apple"><span class="Apple">How do I sort the files in folders or Albums.
<span class="Apple"><span class="Apple">?
<span class="Apple"><span class="Apple">Kind regards,
<span class="Apple"><span class="Apple">KennethHi,
Did you transfer the audiobook using Audible Manager? -
I upgraded to Mavericks and now in pages and numbers my files text cannot be seen
I upgraded to Mavericks and now in pages and numbers my files text cannot be seen unless you highlight it. I am using iWork 08. and running 10.9.4
These are the versions of iPhoto that are and are not compatible with Mavericks:
What version of iPhoto are you running? What happens when you try to launch iPhoto? Any message?
OT
Maybe you are looking for
-
My computer crashed and once restored I could only sync "purchased content". I dont want to lose over 500 songs. My ITunes file now only contained the "purchased content" items. My Ipod Touch still contains all the original music. HELP!! How can I
-
What's Http Channel and how to use it?
Hello, there: I heard if people use Swing applets as front end GUI instead of JSP, they need to use sth called Http Channel for the communication b/w applet and servlet, I don't know too much about it neither I could too much info from the net. Anyon
-
Can the S10 VGA outport support 1920 x 1200?
I can't find anything in the tech specs. I need it to be able to drive that resolution. ThinkPad T61 15 Widescreen with nVidia Quadro graphics 6459CTO Windows 7 Enterprise and Windows XP Pro
-
How deploy javafx Applet in Tomcat
Hi all! Please help me. How i can deploy JavaFX Applet in Tomcat
-
CLOSING CMD WINDOW RUNNING FMLECmd
I have created a .bat file to start 2 instances of FMLE. echo off start "camera2" cmd /Min /k "C:\users\jay starnes\desktop\test.bat" echo off start "camera1" cmd /Min /k "C:\users\jay starnes\desktop\laptoptest.bat" everything works fine. I need to