How to hide zeroes in the output

I need to suppress zeroes in the output. I have a Data template which selects the data from a view. The original view fields are showing 0's if the underlying value is null.( eg. create view v1 as select nvl(field1,0),nvl(field2,0)... from table1
I tried the following ways to fix the issue. But no success.
1. Changed the view and removed the NVL function on the view
create view v1 as select field1,field2,... from table1
After this the xml output is generated and shows nulls for these fields. But OPP is failing with 'Cannot convert to number' Here is the snapshot of the error.
Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert to number.
at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1526)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:517)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
... 17 more
2. Using the xpath expression
<?format-number(field1[.!=0],"####", "")?>
This way I am seeing a square symbol for the fields having zeroes
I am sure there will be simpler way of hiding zeroes in the output. But I am not getting any clues. Any ideas.
Thanks

Hi,
I may have misunderstood something. In the option 1 you mention that by removing the nvl you were getting nulls?
If you are getting zeros then you should be able to use <?if:field1!=0?>...<?end if?>. It's possible you might need to put '0' around the value if it thinks it is text.
Also I'm not sure your format-number syntax is correct. It looks like you are mixing the Oracle formatting and the Microsoft formatting (ie when you set the form field type to number) together. I've used the following successfully:
<?format-number:FIELD1;'PT9G990D00'?>
Hope this helps.
Paul

Similar Messages

  • How to hide columns in the output table in webdynpro based on input

    Hi Experts,
       I have 2 inputs and 1 input is optional.If both inputs are given proper table output is displayed,but if only 1 input is given a column is empty in the output table  so i want to hide this column dynamically at runtime based on my inputs.And i want to hide some empty rows also at runtime based on inputs.
    Can anyone help me out to solve this.
    Thanks in advance.
    Regards,
    Anita.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • Anyone knows how to hide or dim the menu bar ?

    Anyone knows how to hide or dim the menu bar ?

    MagicMenu, but it may no longer work.
    Auto-hide the dock and menubar on a per-app basis .
    Hide Your Mac Menu Bar and Dock for a Cleaner Desktop.
    All found doing a Google search. Why not give that a try first before posting here.

  • How to hide zero rows from a structure

    Hi
    I have a month structue in rows which consists of 36 months. In the keyfigure coulmn also I have a structure with 6 keyfigures. In normal circumstances there will be values only upto 12 or 15 months. I want to hide the remaning rows. Is it possible.
    I created a counter on one important keyfigure so that when value>0 it is 1 otherwise 0. I call this counter. Then I tried to create a condition to show only the 1. But while creating the condition after the keyfigure a column for month with the different elements of structure has to be selected. And of course the condition does not work.
    Any suggestions how to hide the zero rows of structure
    Ram

    Right click on the key figure structure and characterstic structure select 'Properties' and check the option 'Also use Zero Suppression for Structure elements'.
    Also from the query properties select the 2nd tab display and select the option Suppression "Active All Values = 0" and from Effect on Select "Rows and Columns".
    Thanks.

  • How to remove spaces in the output of an PL/SQL report

    Hi,
    The requirement is to develop a SQL report.
    The sample code is like this
    Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
    Select order_number , header_id from oe_order_headers_all;
    The output is displaying as follows
    =======================
    'Order Number Header Id'
    1234 101
    2222 102
    3333 103
    =======================
    Now I am opening the report in excel, and there is a space appearing after the headings.
    So, how can I remove the additional blank line between the headings and the data.
    Thanks in advance
    Mani

    Mani B wrote:
    Hi,
    The requirement is to develop a SQL report.From which tool ur getting this report...? From oracle forms report..?
    >
    The sample code is like this
    Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
    Select order_number , header_id from oe_order_headers_all;
    The output is displaying as follows
    =======================
    'Order Number Header Id'
    1234 101
    2222 102
    3333 103
    =======================
    Now I am opening the report in excel, and there is a space appearing after the headings. if u use any third party tool like pl/sql developer or sql developer then u can export the data into xcel file.
    Sen

  • How to remove truncation in the output of ps -ef command in solaris

    Hi,
    One silly question but i m unable to find solution.
    In solaris-10 when i executed the command ps -ef some datas in the output in the command column is truncated as below
    UID PID PPID C STIME TTY TIME CMD
    root 6811 1 0 19:33:36 pts/3 0:00 sh /export/home/bti/bti/Revathi/BTI/EMS/bin/startemsserver.sh
    root 6827 6819 0 19:33:37 pts/3 2:33 /export/home/bti/bti/Revathi/BTI/EMS/jre/bin/java -DJBOSS_HOME=/export/home/bti
    Where in the CMD column the path */export/home/bti/bti/Revathi/BTI/EMS/jre/bin/java -DJBOSS_HOME=/export/home/bti* continues. Only half of the path is shown. I need the entire path how to achieve it
    Regards
    Revathi

    Just to make things a little more complex...
    /usr/ucb/ps (actually /usr/ucb/sparcv9/ps) used to be SUID root so that it could read the full args directly out of the address space of the process (/proc/<pid>/as).
    Sun removed this behavior in Solaris 8 with patch 109023-05 and in Solaris 9 with patch 120240-01 (it's been removed from Solaris 10 since FCS)

  • Nokia N97 How to hide images from the photo browse...

    I'm not even going to ask about how to hide sensitive images, i just deleted them, but still
    there are several programs that use images for they're normal behaviour, i had this same issue
    with my nokia n95, but i simply set the image atributes of the pictures i didn't want to show in the photo browser,
    and that solved the problem, but with my new n97 this is of no use, i also tryed setting the image atribute as sys file
    and that did not solvet either... Please help, i do not like having 500 images from a software showing up in my gallery...
    Thanks in advance

    how to move image from gallery to a certain album (not copy)

  • How to hide or make the row invisible in RTF report?

    Hi ,
    I am setting a flag = 'Y' in one condition as i want to display records only if flag = 'Y'. It is not displaying data in case flag != 'Y'.But it is displaying empty row in report for the record which does not have flag = ' Y'. How to hide those empty rows?
    See following code for example:
    <?for-each: LIST_G_STORE_ID/G_STORE_ID?>
    <?xdofx: if STORE_ID = '' then '-' else STORE_ID?>
    <?for-each: LIST_G_TRANSACTION/G_TRANSACTION?>
    <?for-each: Q1?><?if: PLAN_CODE = 'PLN'?><?xdoxslt:set_variable($_XDOCTX,'flag', 'Y')?><?end if?><?end for-each?>
    <?if: xdoxslt: get_variable($_XDOCTX,'flag') = 'Y'?><?xdofx: if TRN_DATE = '' then '-' else TRN_DATE?><?end if?>
    <?for-each@inlines:LIST_Q1/Q1?>
    <?if: xdoxslt: get_variable($_XDOCTX,'flag') = 'Y'?><?xdofx: if INVC_NUM= '' then '-' else INVC_NUM?><?end if?>
    <?for-each@inlines:LIST_Q1/Q1?><?if: xdoxslt: get_variable($_XDOCTX,'flag') = 'Y'?><?xdofx: if substr(PLAN_CODE,1,3) != 'PLN' then PRODUCT_CODE?><?xdofx: if PLAN_CODE!= 'PLN' then ','?><?end if?><?end for-each?>
    <?end for-each?><?xdoxslt:set_variable($_XDOCTX,'flag','N')?>
    <?end for-each?>
    <?end for-each?>
    please advice or let me know if more detail is needed.
    Thanks in Advance!!

    <?for-each:LIST_G_STORE_ID/G_STORE_ID [PLAN_CODE ='PLN' ]?> will only show the rows where that value of xml field PLAN_CODE is equal to 'PLN'.
    Hope this helps
    Domnic
    Edited by: Domnic_JDE_BIP on Apr 12, 2010 5:47 PM

  • How make "Scanner" not printing the output in a new line?

    Hi!
    I'm Jordi from Barcelona and I'm new on Java and on this Forum. I have a question to you. I'm developing a testing application that uses the "Scanner".
    Before using it, the app asks a question to the user:
    String strInput;
    Scanner sc = new Scanner(System.in);
    System.out.print("* Please, write your name: ");
    strInput = sc.next();Running this, the app asks me for the options and after pressing "Enter" prints the input string in a new line like this:
    * Please, write your name:
    Jordi
    And I would to get the next:
    * Please, write your name: Jordi
    Does anybody know how to make the "Scanner" print the output in the same line as the question?
    Thanks for your help!
    Jordi

    Running the code,
    import java.util.Scanner;
    public class Test {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            System.out.print("* Please, write your name: ");
            System.out.println("* Hi, "+sc.next());
    }results in the following output:
    * Please, write your name: Bart
    * Hi, BartWhere the first "Bart" is the input I gave.
    If this is not the case, then it has something to do with your IDE or perhaps you didn't recompile and it previously was
    System.out.println("* Please, write your name: "); // println instead of printbut it's all guesses.
    Good luck.

  • Urgent : How to print (on printer) the output of procedure

    Hi All,
    How can I divert the output or the results to printer.
    Regds
    Rajesh

    By adjusting the location of your fields you can accomplish this.
    If you move your subtotal to the tax calculation header.
    you will end up with your tax amount after the subtotal.
    You can then move the final total with tax to the top of the section.
    Then it will look like you want it to.
    Sub Total <----- Tax Area Header
    Tax Amount <----- Tax Area Footer
    Document Total <---- End of Report

  • How to display zero in the screen's input field using numc type

    Hi,
    I want to display the zero value in the input field , when I  using the NUMC input field on the screen .
    The zero will be changed to blank ,when I click the Enter key.
    What I should do for it?
    Any help is appreciated.
    Regards,
    Trevor

    Hi ,
    Thanks for your quickly answer!
    I use the numc input field in the dialog's screen.
    I am not sure how to do the realize the function like 'UNPACK'?
    In fact, I can't changed my input field's data type.
    When the status of my input field is display, I can display the zero on the screen. But when the input field is input status , there is blank!
    Regards
    Trevor

  • How to hide one of the two Multi level categorization blocks in SRVR?

    Hi
    I am trying to hide one of the multilevel categorization blocks in SRVR(SERVICE request)
    Can it be done by configuration in BSP workbench. If yes then how? I went to the view but I am not able to remove the block
    Please help.
    Thanks
    Tarang

    Go to BSP_WD_CMPWB and create a new view by copying existing and remove the 2nd category block.
    This can also be done directly from webui.
    Regards
    Surya

  • How to hide "Note that the search is case insensitive" text from Query Region

    Hi,
    When create a search page with Query region : Autocustomizationcriteria mode, page is showing automatically "Note that the search is case insensitive" text is showing automatically.
    this is not needed. can you please let me know how to hide this one from page.
    Regards,
    Ram

    Check this link:
    https://forums.oracle.com/message/9227812#9227812
    --Sushant

  • How to hide markups with the rectangle tool from printing

    Using the rectangle tool and applying the color white we use this as a white-out tool to hide text from the actual document (such as sensitive information)
    However, when I go to print, on the printer settings it allows me to print the document, that shows the information that was "hidden" with our rectangle tool.
    How can I restrict a user to only print what is displayed on the screen??
    Thank you,

    How do I get there and how do I apply it?
    Angela H. Ortega
    Information Technology Dept
    Savings Bank of Mendocino County
    www.savingsbank.com
    [email protected]
    707-462-6613 Ext 350
    CONFIDENTIALITY NOTICE:  This e-mail transmission and any documents,
    files or previous e-mail messages attached to it may contain
    confidential information that is legally or attorney-client privileged.
    It is intended only for the individual named above and the privileges
    are not waived by virtue of this having been sent by e-mail.  If you are
    not the intended recipient, ANY USE, DISSEMINATION, DISTRIBUTION OR
    COPYING OF THIS COMMUNICATION IS STRICTLY PROHIBITED.  If you have
    received this communication in error, please immediately notify us by
    return e-mail or telephone at the e-mail address or telephone number
    listed above and destroy this transmission and any attachments without
    reading or saving in any manner.  Thank you.

  • How to fill matrix with the output of recordset query?

    Hi all,
    I want a user matrix to load data when I hit a button and the data to be filled is the output of an sql query. binding the matrix columns with table columns and then load the matrix with DBDatasource attached to that table will not do in this case as the columns in the sql query are from several different tables or views. 
    writing following line to do this takes several minutes to load the data:
    For j = 0 To Reordset.RecordCount - 1
    Matrix.AddRow()
    Matrix.Columns.Item("col1").Cells.Item(i).Specific.value =  Recordset.Fields.Item("cardcode").Value
    Recordset.movenext()
    next
    Is there any other way to fill the matrix in this case, which loads the data faster?
    Regards,

    Hello Binita,
    I've tested the CFL for DataTable-Matrixes in my test-AddOn. But there's still one problem left. Maybe you find it out (I will need this in the future too...).
    The ChooseFromList must be added behind the DataTable-Bind, which is done on every MTX-Load (it's not from the sample above, so the UIDs are new ones):
                oDt = oDts.Item("dt_test")
                query = "SELECT  * FROM [@T_CONVTOOLS01]"
                oDt.ExecuteQuery(query)
                oMtx.Columns.Item("0").DataBind.Bind("dt_test", "Code")
                oMtx.Columns.Item("1").DataBind.Bind("dt_test", "U_Alpha01")
                oMtx.Columns.Item("2").DataBind.Bind("dt_test", "U_Price01")
                oMtx.Columns.Item("3").DataBind.Bind("dt_test", "U_Quant01")
                oMtx.Columns.Item("4").DataBind.Bind("dt_test", "U_Date01")
                AddChooseFromLists()
                oMtx.LoadFromDataSource()
    ...where AddChooseFromLists() is...
      Private Shared Sub AddChooseFromLists()
            Try
                Dim oCfls As SAPbouiCOM.ChooseFromListCollection
                Dim oCons As SAPbouiCOM.Conditions
                Dim oCon As SAPbouiCOM.Condition
                Dim oCfl As SAPbouiCOM.ChooseFromList
                Dim oCflCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                Dim oBtn As SAPbouiCOM.Button
                Dim oMtx As SAPbouiCOM.Matrix
                Dim oCol As SAPbouiCOM.Column
                Dim oEtx As SAPbouiCOM.EditText
                oMtx = oForm.Items.Item("MTX_TEST02").Specific
                oCfls = oForm.ChooseFromLists
                oCflCreationParams = SboCon.SboUI.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                oCflCreationParams.MultiSelection = False
                oCflCreationParams.ObjectType = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
                oCflCreationParams.UniqueID = "CFL_C1"
                oCfl = oCfls.Add(oCflCreationParams)
                '### OPTION:
                '# Shown ChooseFromList restricted by Conditions
                oCons = oCfl.GetConditions()
                oCon = oCons.Add()
                oCon.Alias = "CardType"
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCon.CondVal = "C"
                oCfl.SetConditions(oCons)
                oCol = oMtx.Columns.Item("1")
                oCol.ChooseFromListUID = "CFL_C1"
                oCol.ChooseFromListAlias = "CardCode"
            Catch e As Exception
                Microsoft.VisualBasic.MsgBox(className & ".AddChooseFromLists()" & vbCrLf & "Exception:" & vbCrLf & e.Message.ToString)
            End Try
        End Sub
    But I'm running into problems when trying to set the MTX-Cell via DataTable at the CFL-Event (see comment):
                If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                    Dim oMtx As SAPbouiCOM.Matrix
                    Dim oCFLEvent As SAPbouiCOM.IChooseFromListEvent
                    Dim oCFL As SAPbouiCOM.ChooseFromList
                    Dim oDataTable As SAPbouiCOM.DataTable
                    Dim cflID As String
                    Dim oDt As SAPbouiCOM.DataTable = oForm.DataSources.DataTables.Item("dt_test")
                    oCFLEvent = pVal
                    cflID = oCFLEvent.ChooseFromListUID
                    'Dim oForm As SAPbouiCOM.Form
                    'oForm = SboConnection.SboUI.Forms.Item(FormUID)
                    oCFL = oForm.ChooseFromLists.Item(cflID)
                    If Not oCFLEvent.BeforeAction Then
                        oDataTable = oCFLEvent.SelectedObjects
                        If oDataTable Is Nothing Then Exit Sub
                        '############## Matrix Test #######################################################################
                        If (oCFLEvent.ItemUID = "MTX_TEST02") Then
                            oMtx = oForm.Items.Item("MTX_TEST02").Specific
                            '### CFL Results to UserForm
                            oDt.Rows.Offset = oCFLEvent.Row - 1
                            MsgBox(oDt.GetValue("U_Alpha01", oCFLEvent.Row - 1))
                            MsgBox(oDataTable.GetValue("CardCode", 0))
                            ' PROBLEM - can't get this working - don't know at the moment:
                            ' on other forms SetValue works....
                            oDt.SetValue("U_Alpha01", oCFLEvent.Row - 1, oDataTable.GetValue("CardCode", 0))
                            ' this also gives me problems...:
                            'oMtx.Columns.Item("1").Cells.Item(oCFLEvent.Row).Specific.value = oDataTable.GetValue("CardCode", 0)
                            oForm.Update()
                        End If
                    End If
                End If
    The CFL-Form opens and returns the choosen value(s) at the CFL-event. But writing to MTX still not works with this code...
    Maybe you find the last piece. If so: please write here.
    Cheers,
    Roland
    p.s.:
    David Nussböck wrote
    LOL - ROLAND WAS FASTER ))
    ...just one minute...

Maybe you are looking for

  • Itunes won't download

    I have been trying to fix itunes for over a week. I had the latest version (32 bit for Vista) and all was well until last week when the shortcut dissapeared. 1. I tried downloading itunes again, but this didn't work. 2. I then tried to do the repair

  • How to use a vertical line as column separator in Pages?

    I have a two-column document (a questionnaire) in which I'd like to have a thin vertical line separating the text columns for the sake of clarity. I've tried inserting a floating line using "Insert Shape" but it doesn't appear to like living between

  • Embedded QT Player Question

    I have a QT movie set to fast-start that is embedded on a web page. The data rate is not too high, but high enough that people on a dial-up connection will have to wait a minute before the movie starts to play. That's fine. But, is there a way to pro

  • Landscape setting won't work for Photos only

    When I turn my iPhone 4 to switch from portrait view to landscape, it works fine for any app--including messaging, twitter, etc--but I cannot view any pictures in my photo album this way. Does anyone know why this is?

  • Need help fixing my Power Supply (delta 710W)

         My Power Mac G5 had been acting strange lately in the form of not turning until I waited a day after turning it off. Thankfully, I have determined the cause to be the power supply after using the apple hardware test and reading other posts. When