How to display empty space in place of null values

Hi all,
In my application, i am reteiving values from db and printing thm in a jsp page. Right now, when there is a null value in db for a particular column, i am getting the same null value in my jsp page also. I don't want to print this null value and want to keep those particular fields as blank.Where should i make this change. Can anyone help me out.

Use JSTL c:out tag for that.
Try to omit scriptlets as much as possible. Use JSPs for view only and load the data using a servlet and DAO class. To display data and doing some conditional logic, you can use the JSTL tag library for that.

Similar Messages

  • How to display the current date in the prompt value.

    Hi,
    How to display the current date in the prompt value. When the user runs the query he want the current date to be displayed in the prompt value and he should also be able to change the date if required ...... I am using web Intellegency BO XI3.0.
    Thanks,
    Shakthi.

    Please refer the below link.
    Prompt  with  default  date   (  currentdate-1  and current date-8)
    http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
    http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
    Regards,
    Bilahari

  • How to remove empty space in CSS table and move spry menu bar?

    Hello! I created www.stonecreekha.com about a year ago basically by watching youtube tutorials and haven't done much with it since so I've forgotten everything! In IE7, everything appears as it should; but in Firefox and IE8, the spry menu bar is positioned slightly higher than it should be (it slightly cuts off the foot of the golfer) and there is an empty space between the navigation bar and the photo. The source code can be viewed from the website. Here are some pics:
    IE7 - how it is supposed to look:
    IE8:
    Firefox:
    Dreamweaver:
    So basically, I need to know how to remove that empty space between the navigation bar and the picture, and how to move the spry menu bar down a few pixels, in a way that it looks correct in IE8 and Firefox, and preferably IE7 as well.
    P.S. I'm a noob so if you could be as specific as possible on what to do in Dreamweaver I'd really appreciate it. Thanks

    I belive it's because of the -minus margin being used on the navbar, that you will need to use a negative margin to bring up both the left and right bodyArea divs.
    Try :       margin-top: -18px;  on both divs.  You may need to play around with that to get it more precise.
    Again, not sure what effect that has on IE as I can't test it.
    If it affects IE, then you may need to feed IE a conditional comment for the placement of those divs.

  • How to Avoid Empty Space in Excel Export , while using SubReport.

    We have a sceneraio where we have parent child relationship and we are using the SubReport Concept to map the child data by taking input parameter from Parent Report.
    The RPL/HTMl viewer , PDF works fine, but  when we export data into excel empty rows are comming.
    Could  you please suggest how can we avoid empty space in Excel Export.
    we have kept the cell (width and height ) same as SubReport Width and height.

    Hi SubhadipRoy,
    According to your description, did you use separate subreport to display the data rather than insert subreport in tablix?
    Based on my test, if we are use separate subreport to display the data in the report, when we export to Excel we will get an additional row. We can adjust the minimum gap between tablix and subreport to work around the issue. In SSRS 2012, if we paste tablix
    and subreport without empty space in report design, it will not display the additional row. You can try to put the tablix and subreport in a rectangle to resolve the issue. 
    Reference:
    http://stackoverflow.com/questions/20367960/remove-additional-column-from-exporting-to-excel-from-ssrs
    There is a screenshot for your reference:
    If the issue is persist, please elaborate the issue for further investigation.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to collapse empty space above each photo in an album?

    Hi folks.
    I have a photo album setup to display my photos as a single column with no caption.
    I'm seeing an alarming amount of 'dead space' above each photo. I.e., when I click on the photo in iWeb in order to see the blue bounding box that contains the photo, there's a lot of empty space.
    Some of my photos are portrait orientation and so the gap is only about 1/3 of the height of the photo. But for some of my landscape-oriented ones, the gap can be as much as twice the height of the photo.
    Is there any way to force iWeb to adjust the container to the height of each image plus some padding?
    Thanks
    Tony

    The only user controlled spacing is that offered by the Photo Grid pane and that doesn't really affect that spacing much. Other options would be to go the flash route with one of the applications or iPhoto plugins available. Examples of some of them can be see in these demo pages:
    PhotoPresenter Animated Slideshow Themes
    SimpleViewer and Flash Album Exporter
    Flash Album Exporter Postcard and AutoViewer Slideshow Themes
    Jalbum
    Cyclosaurus as offerred at times in the past javascript code to modify slideshow attributes but none for the spacing as you want.
    OT

  • How to remove empty space from a file

    Hi all,
    Can any one help on how to remove the blank spaces from a file.
    I used trim function but unable to remove the spaces.
    I have a file in which there is a name like 'JAIRAM' and am storing this file in a variable FILE_CONTENTS.
    Now am unable to compare FILE_CONTENTS with another value as it is storing empty spaces also from the file.
    Please help on this
    Thanks,
    Srini

    Trim only trim at the beginning or at the end. Can you try using the replace sql function.. see below..
    SQL> select replace('abc def',' ','') from dual ;
    REPLAC
    abcdef
    cheers

  • How to display first SPACE charcter in Column of ALV Grid Report?

    Hello experts,
    In ALV Grid report, One of the column has a value like ' Test_Value'. In this value first character is SPACE but in display SPACE is not appearing.
    Field catalog type is:- slis_t_fieldcat_alv
    I have used the function module:- REUSE_ALV_GRID_DISPLAY
    Is there any settings required in Fieldcatalog Internal table for displaying leading SPACE chara.?
    Please suggest.
    Thanks & Regards
    Jagesh

    hi,
    After fetching the data into the intenal table.
    loop that internal table.
    declara a variable of type character  and length 1.
    see the example code below
    DATA : wa_space ,
             tbx TYPE sy-tabix.
      wa_space = ' '.  "---> press ALT+255 to get space
      LOOP AT it INTO wa.
        tbx = sy-tabix.
        CONCATENATE wa_space wa-<fname> INTO wa-<fname>.
        MODIFY it INDEX tbx  FROM wa  TRANSPORTING fname.
      ENDLOOP.
    Hope it helps you.
    Thanks & Regards

  • How to display first SPACE character in Column of ALV Grid Report?

    Hello All,
    In ALV Grid report, One of the column has a value like ' Test_Value'. In this value first character is SPACE but in display SPACE is not appearing.
    Field catalog type is:- slis_t_fieldcat_alv
    I have used the function module:- REUSE_ALV_GRID_DISPLAY
    Is there any settings required in Fieldcatalog Internal table for displaying leading SPACE chara.?
    its a field not the header.
    thanks in advance.
    Rahul

    Hi all,
    did any body have a solution for this problem?
    In ALV Grid report, One of the column has a value like ' Test_Value'. In this value first character is SPACE but in display SPACE is not appearing.
    Field catalog type is:- slis_t_fieldcat_alv
    I have used the function module:- REUSE_ALV_GRID_DISPLAY
    Is there any settings required in Fieldcatalog Internal table for displaying leading SPACE chara.?
    its a field not the header.
    thanks in advance.
    Rahul

  • 0 to be display in place of null value

    Hi,
      I am working on oracle reports. In data model I am having 5 query builder each query builder is linked with main query bulder. I need to display vendor name , below branch name, under branch I am having 4 types of sales, 1)Panda 2)Key account 3)Wholesale and catering 4) Minimarket & Retails. Every type of sales having two rows one is target and other is actual sales.targets are displaying fine, problem getting in actual sales. If table column having null value in panda that row is not displaying and the other rows are getting up.
    ex:
    VNDR/Branch                 2014 AUG
    XXXX(vendor)
    XXXX(branch)
      PANDA                                 0      (target)
    Key account                      10000   (target)
                                               12000   (actual)
    Wholesale&catering           15000   (target)
                                               17000   (actual)
    Minimarket&Retail               7000    (target)
                                                6000    (actual)
    I need 0 in place of actual sales in PANDA also.
    Help will be appreciable.
                                              Thank you.

    are you sure the row for the panda actual is being returned by the query?
    you could try testing the query in sqlplus or some other tool to make sure it's being returned.
    are you using the value of the actual sales in a condition somewhere? maybe you should wrap it in nvl.

  • How to check the sql:query is return null value

    I have use :
    <sql:query var="sql1" dataSource="${db}">
    select col_name from table_name
    where a=<c:out value="${row.test1}"/>
    and b='<c:out value="${row.test2}"/>'
    </sql:query>
    So, how can I check this statement return null value which is no record within this table?

    The Result should never be null but can be empty. You can check if the Result is empty using an if tag and checking the rowCount property:
        <sql:query var="books"
          sql="select * from PUBLIC.books where id = ?" >
          <sql:param value="${bookId}" />
        </sql:query>
         <c:if test="${books.rowCount > 0}">
         </c:if>http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL7.html#wp84217
    Look for query Tag Result Interface

  • How to replace a "notfound" output with a null value?

    hi,
    I'm just getting a output of "Rows Notfound" for a script..
    instead of this , i just need to show the output with a record as null value or some value..
    do we have any option to use this in oracle..

    Apart from capturing with an exception in PL/SQL code, if you're wanting something in a script as pure SQL, you'd have to generate an additional row and only select that where no data is found e.g...
    SQL> ed
    Wrote file afiedt.buf
      1  select ename from emp where ename = 'FRED'
      2  union all
      3* select 'No Data' from dual where not exists (select * from emp where ename = 'FRED')
    SQL> /
    ENAME
    No Data
    SQL>Of course this does effectively double-up on the queries being executed, so if you're dealing with a heavily complex query, it may be best just just have the regular exception come out, but then this will also depend on your actual requirements and why you want to do this in the first place.

  • How to display 'Greetings Msg'  in place of apex username in the header?

    Hi,
    I want to show firstname-lastname (from database) in place of apex username which is being
    display in the header. How can I do that?
    Thanks in advance.
    Dip

    1. Create an Application Item, say APP_USER_NAME.
    2. Compute this value with an Application Computation at Computation Point On New Instance (e.g. On Login). A SQL Query computation type will enable you to retrieve the first and last name from the database using the APP_USER username.
    3. Find the *&APP_USER.* substitution in the page template(s) and replace it with *&APP_USER_NAME*.
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/bldapp.htm#BCEHFDDJ
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/bldapp.htm#sthref913

  • How to hide empty space between two pages.

    Hi.
    I want to hide the grey space between two pages in Pages, so the last line of the top page could join directly the first line of the bottom page for quicker reading... Is it possible? Is their a way to stick pages tray to tray without the default empty grey space?  This option was possible in Word 2007...
    Thank you.

    demifraction,
    Is your document in Layout view?
    Under the View menu, Hide Layout:
    This doesn't hide all the grey space, but it stops the grey in the layout margins.
    Regards,
    Ian.

  • How to display empty CDR/DVDR?

    I use plain fluxbox with thunar and thunar-volman. All is fine with mounting/unmounting the DVD drive, however when I have a blank disc in the drive it does not display in thunar, and I do not know how to see if it's blank in the shell. Is there some little script or something I could conjure to give a quick tooltip or pop-up display or something to show that it is blank?
    I usually just eject and close tray again, then wait a few seconds after it's been "read" and disc light is off, and if nothing shows in Thunar then I know it is blank, but of course would prefer something more convenient than this
    Thanks for any help.

    mlau, Thanks, that is neat and could be useful to have it run a little zenity pop-up or something that says "Blank disc inserted," however, I am looking for a means to display if the disc is blank at push of a button or something, any time (not only when disc has been just inserted).

  • How to display empty months when grouping records by month

    Guys, I've got a recordset that successfully displays all
    records in the
    table grouped according to the month that the record was
    created in.
    This allows me to display a Monthly tally (a bit like a
    barchart - where the
    height of the column is derived by the qty of records for
    that given month)
    for each of the months in the year so far. However, it dawned
    on me today
    that if there was no activity in a given month, the month
    simply doesn't
    appear at all, rather than displaying but showing "0" as I
    would prefer.
    For example, the type of thing I want to display onscreen is:
    Month 1 2 3 4 5 6 7 8 9 10 11 12
    But let's say there were no records inserted in months June
    to September
    (inclusive), what I'm actually getting onscreen is:
    Month 1 2 3 4 5 10 11 12
    But what I actually want to appear onscreen is:
    Month 1 2 3 4 5 6 7 8 9 10 11 12
    I hope that makes some kind of sense...
    I'm using Dreamweaver CS3, ASP/VBScript, and MySQL.
    My current SQL Statement is as follows:
    SELECT Count(AffiliateID) AS TotalClicks, MONTH(`VisitDate`)
    AS Month
    FROM tbl_affiliaterefferals
    WHERE `AffiliateID` = "49" AND YEAR(`VisitDate`) =
    YEAR(Now()) GROUP BY
    MONTH(`VisitDate`)
    ORDER BY MONTH(`VisitDate`) ASC
    I figured one workaround would be to have 12 separate
    recordsets - one for
    each month - on the one page, but there must be a cleaner way
    of doing it
    surely?
    Any/all help greatly appreciated.
    Regards
    David

    This is a multi-part message in MIME format.
    ------=_NextPart_000_0086_01C932EC.D9CE33D0
    Content-Type: text/plain;
    format=flowed;
    charset="iso-8859-1";
    reply-type=original
    Content-Transfer-Encoding: 7bit
    Hi Joe,
    I've simply got a table, within one cell of which is another
    table to which
    I've applied a background colour and am specifying the height
    of the <td>
    cell as the qty of the number of records returned for Month 1
    of the current
    year. Then I'm applying a repeat region to the <TD>
    cell containing the
    table that varies in height, in order to force the table to
    repeat
    horizontally according to the number of records (months)
    retrieved from the
    database.
    The code for the table is in the attached txt file.
    I appreciate your time in responding however you must have
    missed my
    comments about what I'm working in as I'm working in
    ASP/VBScript and
    haven't the first clue when it comes to PHP.
    I don't suppose you know or can point me in the direction of
    an ASP
    equivalent of your suggestion?
    Regards
    David
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]...
    > On 20 Oct 2008 in macromedia.dreamweaver, DTB-K wrote:
    >
    >> I figured one workaround would be to have 12
    separate recordsets -
    >> one for each month - on the one page, but there must
    be a cleaner
    >> way of doing it surely?
    >
    > Without seeing the code you're using to display it...
    >
    > Probably what that code is doing is looping through the
    recordset:
    >
    > <?php do { ?>
    > ...
    > <?php } while ($row_dates =
    mysql_fetch_assoc($dates)); ?>
    >
    > That's DW's standard PHP MySQL recordset behavior. What
    you want to do
    > is something more like:
    >
    > <?php
    > for ($i=1;$i<13;$i++) { // Do 12 months
    > echo '<p>Month: ';
    > echo $i; //Echo the month
    > if ($row_Recordset1['Month'] == $i) {
    > // Have data for this month
    > echo ' Clicks: ';
    > echo $row_Recordset1['TotalClicks'];
    > // Now get the next row
    > // Note that we only want to get the next row if the
    current month
    > // has data. That's why the fetch command is inside the
    if.
    > $row_Recordset1= mysql_fetch_assoc($Recordset1);
    > } // End if
    > echo "</p>\n";
    > } // End for
    > ?>
    >
    > --
    > Joe Makowiec
    >
    http://makowiec.net/
    > Email:
    http://makowiec.net/contact.php
    ------=_NextPart_000_0086_01C932EC.D9CE33D0
    Content-Type: text/plain;
    format=flowed;
    name="Code.txt";
    reply-type=original
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: attachment;
    filename="Code.txt"
    <table border=3D"0" cellpadding=3D"0"
    cellspacing=3D"0">
    <tr>
    <td colspan=3D"2" valign=3D"bottom"><h1>Current
    Year:</h1></td>
    </tr>
    <tr>
    <td valign=3D"bottom" =
    class=3D"BodyTxtsml"><strong>Month</strong></td>
    <%=20
    While ((Repeat1__numRows <> 0) AND (NOT
    Rs_MonthlyClicks.EOF))=20
    %>
    <%Dim TotalClicks, Cellheight
    TotalClicks =3D =
    FormatNumber((Rs_MonthlyClicks.Fields.Item("TotalClicks").Value),
    0, -2, =
    -2, -2)
    Cellheight =3D (TotalClicks)
    %> =20
    <td valign=3D"bottom" class=3D"BodyTxtsml" =
    title=3D"<%=3D(TotalClicks)%>"><div
    align=3D"center"><table border=3D"0" =
    cellspacing=3D"0" cellpadding=3D"0">
    <tr>
    <td height=3D"<%=3D(Cellheight)%>" =
    bgcolor=3D"#003366" onMouseOver=3D"this.bgColor =3D
    '#FFDB9D'" =
    onMouseOut=3D"this.bgColor =3D'#003366'"
    width=3D"40"> </td>
    </tr>
    =
    </table><%=3D(Rs_MonthlyClicks.Fields.Item("Month").Value)%></div></td>
    <%=20
    Repeat1__index=3DRepeat1__index+1
    Repeat1__numRows=3DRepeat1__numRows-1
    Rs_MonthlyClicks.MoveNext()
    Wend
    %> =20
    </tr>
    </table>
    ------=_NextPart_000_0086_01C932EC.D9CE33D0--

Maybe you are looking for