Cannot display NULL values as 0
I am trying to display a count by dates (which I am grouping by), but when the value is null, nothing displays and the dates are not displayed either. I want to display every date in the range entered in the prompt and its respective count, even if the count is '0', I want to see a '0'.
I have tried every suggestion posted on this forum for that same issue and nothing has worked.
I have checked the boxes under Report Options for 'Convert Database NULL values to Default' and 'Convert Other NULL Values to Default'. I had also created a formula for the count and had selected 'Default Values For Nulls', and that didn't work either.
Can someone suggest something else I may need to check on my report? I can't find any solution,and I'm desperate at this point.
Thanks.
You can do so but using a stored procedure.I have done this...since I have got the same requirement.
I am pasting a sample of the stored procedure.This stored procedure is created in Oracle.
create or replace procedure call_as_all_dates(
allDates IN OUT PKG_PCI_Compliance.allDates,
bDate IN solidcor.AS_SS_EVENTS.EVT_TIMESTAMP%TYPE,
eDate IN solidcor.AS_SS_EVENTS.EVT_TIMESTAMP%TYPE
as
dateDiff number;
begin
dateDiff :=TRUNC(TO_NUMBER(SUBSTR((eDate-bDate),1, INSTR(eDate-bDate,' '))));
open allDates FOR select rownum,0 as custID,to_char(null) as gName,to_char(null) as hName,trunc(bDate+ rownum) AS_DATE,to_char(null) as uName,to_char(null) as
evtName,to_char(null) as evtObject from sys.all_objects where rownum<dateDiff
union all
select rownum,asCust.ID,asGroup.NAME,ssEvents.HOST_NAME,ssEvents.evt_timestamp,ssEvents.evt_username,ssEvents.EVT_DISPLAY_NAME,ssEvents.EVT_OBJECT from solidcor.as_solidifier_groups asGroup inner join solidcor.as_ssgrp_ss_assoc ssGrpAssoc on (asGroup.GROUP_ID= ssGrpAssoc.GROUP_ID) right outer join solidcor.as_solidifiers asSf on (ssGrpAssoc.SS_ID=asSf.SS_ID) right outer join solidcor.as_ss_events ssEvents on (asSf.UUID=ssEvents.HOST_UUID) right outer join solidcor.AS_CUSTOMERS asCust on (ssEvents.CUSTOMER_ID=asCust.ID) where ssEvents.EVT_NAME in ('FILE_ATTR_SET_UPDATE', 'FILE_ATTR_CLEAR_UPDATE', 'ACL_MODIFIED', 'ACL_MODIFIED_UPDATE', 'FILE_CREATED', 'FILE_DELETED', 'FILE_MODIFIED', 'FILE_ATTR_MODIFIED', 'FILE_RENAMED', 'FILE_CREATED_UPDATE', 'FILE_DELETED_UPDATE', 'FILE_MODIFIED_UPDATE', 'FILE_ATTR_MODIFIED_UPDATE', 'FILE_RENAMED_UPDATE', 'FILE_SOLIDIFIED', 'FILE_RESOLIDIFIED', 'FILE_UNSOLIDIFIED', 'FILE_ATTR_CLEAR', 'FILE_ATTR_SET');
end;
Regards,
Amrita
Similar Messages
-
Cannot Save NULL value to database
I cannot save a null value through the data tab in the multi-row updates pane. It always gives me an error such as "Invalid number". It works fine through normal SQL update statement. Is there a preference somewhere to turn this on?
thanks in advance
Paul PHi Paul,
Just use the backspace key to obliterate any existing value -- that makes it null. Afterwards, if you refresh or close/reopen the object, the data tab will display any null as the value set in Tools | Preferences | Database | Advanced | Display Null Value As .
Regards,
Gary
SQL Developer Team -
A page is using PL/SQL script to display data. There are 2 display variables. Instead of bringing initial set of data, it displays NULL values. It "fixes" itself after changing variable values from a drop down menu. Why is that and how to fix it?
If you plan on performing all of the work under the Click event, then you won't need to worry about assigning a Script scope to the variables, but if you are planning on using those variables outside of the Event, then David's answer is the way to go.
Another option is to use a hash table as it also works around the issue with variable scope in a UI Event.
#Define at beginning of script
$hashtable = @{}
$OKButton.Add_Click({$hashtable.SelectedTemplate=$Something})
Boe Prox
Blog |
Twitter
PoshWSUS |
PoshPAIG | PoshChat |
PoshEventUI
PowerShell Deep Dives Book -
Need to display null values against table
Hi All,
I have one table in which I only need to display null values along with the rest of columns. for example
ename sal date
scott 2000 15/07/06
Michal
now my query should return---
ename sal date
michal
hare krishna
AlokMaybe it is something like this?:
michaels> select column_name || ' contains ' ||
dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() ||
' NULL values' null_columns
from cols
where table_name = 'EMP'
and dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() > 0
NULL_COLUMNS
MGR contains 1 NULL values
COMM contains 10 NULL values -
Grouping to display null values for all the missing dates
Hi SAP,
I am trying to display '0.00' value for all the missing dates in my crystal reports as follows:
17-Jan-14 40.00
18-Jan-14 0.00
19-Jan-14 0.00
20-Jan-14 80.00
However, my crystal report is showing as follows:
17-Jan-14 40.00
18-Jan-14 0.00
19-Jan-14
20-Jan-14 80.00
The missing dates with no data are group together and my '0.00' value is not. Kindly advise me the solution. The formula is shown as per attached.
Thank you.
Regards.Hi,
Thanks for your reply.
Fyi, I am using a formula field in crystal report to display "0.00" for days in between as follows:
whileprintingrecords;
if Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy') = "" then "" else "0.00"
There is another formula field in crystal report to display the missing dates in between as follows:
whileprintingrecords;
Days_Between({Command.DocDate},next({Command.DocDate}),'dd-MMM-yy')
Below is my report custom functions:
Function Days_Between (datefield as datetime, nextdatefield as datetime, format as string)
' This function is only used to display what data is missing within a specified date range...output type is text
dim thisdate as date
dim nextdate as date
dim output as string 'output is the text display
dim daysbetween as number
dim looptimes as number
looptimes = 0
daysbetween = 0
output = ""
thisdate = datevalue(datefield) + 1
nextdate = datevalue(nextdatefield)
if nextdate - thisdate > 1 then daysbetween = nextdate - thisdate else daysbetween = 1
do
if nextdate - thisdate > 1 _
then output = output + totext(thisdate, format) + chr(10) _
else _
if nextdate - thisdate > 0 _
then output = output + totext(thisdate, format)
looptimes = looptimes + 1
thisdate = thisdate + 1
loop until looptimes = daysbetween
Days_Between = output
End Function
The issue arise when when there is more than one missing dates in between but the null values ("0.00") displayed is only for the first missing dates and not for all the missing dates.
Regards,
Ting Wei -
Am writing a 3 tier program. I am using java applets and mysql. One of the functions is to display values from the table in an applet. The condition is to display fields from the table that are null. I have been able to disply not null values (but not in an applet) but not null values. Can someone please tell me if it is possible and if so how. Sample code would be soooo helpful.
thanxhttp://forum.java.sun.com/thread.jsp?thread=503983&forum=48&message=2386043
-
hi how can i display the null value in th following query , where c512 got null value in position column
SELECT par.c_code,tab_to_string(cast(COLLECT(per.lastname) AS t_varchar2_tab)) AS lastname,Tab_to_string(cast(COLLECT(ATYPE.NAME) AS t_varchar2_tab)) AS POSITION
FROM SMS_PARTIES per,
SMS_ORGANISATION_CONTACTS con,
SMS_PARTIES par,
SMS_AFFILIATION_TYPES atype
WHERE per.id = con.per_id
AND par.ID = con.ORG_ID
AND ATYPE.ID = CON.ATYPE_ID
AND par.C_CODE IN ('C512','C70')
GROUP BY par.c_code
C_CODE LASTNAME POSITION
C70 Meyer,McPherson Chairperson,Treasurer
Edited by: user603350 on 2011/07/13 12:27 AM
Edited by: user603350 on 2011/07/13 12:27 AMuser603350 wrote:
i try this
SELECT par.c_code,Tab_To_String(cast(COLLECT(NVL(per.lastname,' ')) AS t_varchar2_tab)) AS lastname,
Tab_To_String(cast(COLLECT(NVL(ATYPE.NAME,' ')) AS t_varchar2_tab)) AS POSITION
FROM SMS_PARTIES per,
SMS_ORGANISATION_CONTACTS con,
SMS_PARTIES par,
SMS_AFFILIATION_TYPES atype
WHERE per.id = con.per_id
AND par.ID = con.ORG_ID
AND ATYPE.ID = CON.ATYPE_ID
AND par.C_CODE IN ('C512','C70')
GROUP BY par.c_code
but stil does not show null column it only show the c70 columnwhere is that c70 column?
do you mean this, c_code column which contains c70 data?
AND par.C_CODE IN ('C512','C70') If I understand you correctly: you want to display c_code column with null values, 'C512', and 'C70'.
AND nvl(par.C_CODE, 'C512') IN ('C512','C70') -
Keeping table description on change and not displaying NULL values
I have the table grouped by BFY and then showing by fund. I can only get the description section to show up for the first fund and then when it changes funds nothing shows up. Then when the year changes again it appears.
ex.
BFY: 2005: 0100AXXXXD
but when the fund changes from 0100AXXXXD........nothing shows up.
Also I wanted to not include any funds/years that are null. I had the following code in but it isn't stopping the null values.
<?if: SEC_ZERO_INDICATOR !=0?>
Thanks for any help.Need to see your xml data structure. Can you send me the xml and RTF file to [email protected]? I will take a look.
Thanks,
Bipuser -
Display NULL values in iGrids as space?
Is there any way to tell the iGrid, that it should show columns containing DB NULL simply blank (e.g. one SPACE or anything else which is unvisible)? Actually NULL values are shown as "NA" for numbers resp. "---" for strings, which is rather annoying.
Hi Bodo,
Use this code to replace NULL values like "NA" or "---" with SPACE -
for (i=0; i<=objGrid.getGridObject().getRowCount(); i++)
for (j=0; j<=objGrid.getGridObject().getColumnCount(); j++)
if (objGrid.getGridObject().getCellValue(i, j) == "" ||
objGrid.getGridObject().getCellValue(i, j) == "---" ||
objGrid.getGridObject().getCellValue(i, j) == "NA")
objGrid.getGridObject().setCellValue(i, j, " ");
Another way is if you are using a stylesheet then you can modify the stylesheet to handle NULL.
Regards,
Anil -
Display null value:Report Filter using Show/hide report filter
Hi,
Is there any documentation from SAP BO that says "Report Filters don't display nulls."?
Report Filter as in by clicking the Show/Hide Report Filter in the Infoview toolbar.
Please help.
Thank you.Hai
u r Thread is similar to
http://www.forumtopics.com/busobj/viewtopic.php?p=848982&sid=2a66a2348c7042773baaf7bfd10241b2 -
Display null values in crosstab report.
I have a crosstab that will be sparsely populated. The datatype of the cells in the crosstab are numeric. I would like to have the cells that contain no data to have no value, but Crystal Reports inserts a zero there instead.
Is there anyway to tell CR that I want nulls to be treated as nulls and not zeros?
Thanks.
Regards,
ThanhThere is a Display String formula for fields, accessed by right-clicking the field and selecting Format Field. This is used to tell Crystal exactly what should be displayed for the field. Add the following logic (basic syntax):
if CurrentFieldValue = 0 then
formula = ""
else
formula = cstr(CurrentFieldValue, "0.00")
end if
This will cause all zero values to display as blank. I added the "0.00" parameter to the cstr() function to show that's how you tell cstr() how you want the number formatted. See the online help for cstr() for details.
HTH,
Carl -
How to display null values in the graphs, when i select a date range?
Hi,
Can you please help me in achieving the below requirement:
We have a date promt, i have selected the date range from 12-Oct-2009 to 15-Oct-2009 and clicked on the go button.
In the above date range, data is only availabe on 14-Oct-2009. here the requirement is to display as all the records (12th, 13th , 14th & 15th) in the bar graph.
Currently the graph view is displaying the data only for 14-Oct-2009 in the bar graph.
If data is not available it should display in the bar graph as empty for that particular dates.
Help is highly apprieciated.
Thanks in Advance.Check out [this post|http://obiee101.blogspot.com/2009/04/obiee-showing-zero-in-bargraph.html].
-
Validations: Null value for LOVs
See http://htmldb.oracle.com/pls/otn/f?p=24317:239
I have a "Item is not null" validation on that LOV item. The item has "Display null value" set to Yes and a LOV of STATIC2:1,2,3
If I leave the Null return value for the item to blank, the engine defaults it to %null% and the validation "knows" that this is really the same as a null value and so it kicks in (good).
But if I change the Null return value to something like %, the validation doesn't complain, it thinks that this is a not-null value.
Why the inconsistency? Does this mean that we are expected to use the default value of the Null return value i.e. leave it blank and let the engine put in %null%?
Comments? ThanksVikas - The declarative not null validation types recognize "actual" null or %null% as null values. This equivalence holds in numerous other situtations during page processing. Why does %null% get special treatment? A convention was chosen and that's it. And it works for almost everybody in almost all situations. In other words, it's useful, if not perfect. If you want a different value, you can specify one in the LOV (as you described). Then you can recognize and convert these values to null or %null% in an after-submit computation so that validations and other mechanisms work normally. (Perhaps it would help if the Builder created such a computation for items having LOVs with specified null values.) One use case for using a specified null return value might be where you want to distinguish a POSTed "actual" null value from the selected "null" value for which you have specified a null return value. Then you can tell if the value was selected from the LOV or whether it got a null value from the item's cache or source methods.
Scott -
Hello. I'm trying load a picture from file using the cards that are dealt. But the Error I get is the values cannot be null. I'm trying to use a build path with a string on the class FiveCard. Then I'm trying to call its property from the frmGameBoard. But
That's where the values cannot be null.
The files are saved in bin/Debug/Cards with extension of .gif with the name in lowercase. Example "bin/Debug/Cards/clubace.gif"
Here is the class FiveCard:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Final_Project_Barry_Lovelace
public class FiveCard : Deck
private Card[] PlayerHand;
private Card[] ComputerHand;
private Card[] dealtPlayer;
private Card[] dealtComputer;
public void DealCards()
PlayerHand = new Card[5];
dealtPlayer = new Card[5];
ComputerHand = new Card[5];
PlayerHand = new Card[5];
dealtComputer = new Card[5];
public void Deal()
DealCards();
setDeck();
getHand();
sortCards();
displayCards();
compareHands();
public void getHand()
for(int i = 0; i < 5; i++)
PlayerHand[i] = getDeck[i];
for (int i = 5; i < 10; i++)
ComputerHand[i - 5] = getDeck[i];
public void sortCards()
var queryPlayer = from hand in PlayerHand
orderby hand.MyValue
select hand;
var queryComputer = from hand in ComputerHand
orderby hand.MyValue
select hand;
var index = 0;
foreach (var element in queryPlayer.ToList())
dealtPlayer[index] = element;
index++;
index = 0;
foreach (var element in queryComputer.ToList())
dealtComputer[index] = element;
index++;
//display the cards
public void displayCards()
//declares a string to make a path
string PHcard0 = dealtPlayer[0].GetDisplay().ToString().ToLower() + ".gif";
string PHcard1 = dealtPlayer[1].GetDisplay().ToString().ToLower() + ".gif";
string PHcard2 = dealtPlayer[2].GetDisplay().ToString().ToLower() + ".gif";
string PHcard3 = dealtPlayer[3].GetDisplay().ToString().ToLower() + ".gif";
string PHcard4 = dealtPlayer[4].GetDisplay().ToString().ToLower() + ".gif";
string CHcard0 = dealtComputer[0].GetDisplay().ToString().ToLower() + ".gif";
string CHcard1 = dealtComputer[1].GetDisplay().ToString().ToLower() + ".gif";
string CHcard2 = dealtComputer[2].GetDisplay().ToString().ToLower() + ".gif";
string CHcard3 = dealtComputer[3].GetDisplay().ToString().ToLower() + ".gif";
string CHcard4 = dealtComputer[4].GetDisplay().ToString().ToLower() + ".gif";
public string PHcard0 { get; set; }
public string PHcard1 { get; set; }
public string PHcard2 { get; set; }
public string PHcard3 { get; set; }
public string PHcard4 { get; set; }
public string CHcard0 { get; set; }
public string CHcard1 { get; set; }
public string CHcard2 { get; set; }
public string CHcard3 { get; set; }
public string CHcard4 { get; set; }
public void compareHands()
Here is the form frmGameBoard:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Final_Project_Barry_Lovelace
public partial class frmGameBoard : Form
public frmGameBoard()
InitializeComponent();
FiveCard newGame = new FiveCard();
private void btnDeal_Click(object sender, EventArgs e)
newGame.Deal();
pcPH0.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.PHcard0);
pcPH1.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.PHcard1);
pcPH2.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.PHcard2);
pcPH3.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.PHcard3);
pcPH4.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.PHcard4);
pcCH0.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.CHcard0);
pcCH1.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.CHcard1);
pcCH2.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.CHcard2);
pcCH3.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.CHcard3);
pcCH4.Image = (Bitmap)Cards.ResourceManager.GetObject(newGame.CHcard4);
I appreciate any help! If you haven't noticed. I'm new to C#Why do you have string in this method?
public void displayCards()
//declares a string to make a path
string PHcard0 = dealtPlayer[0].GetDisplay().ToString().ToLower() + ".gif";
string PHcard1 = dealtPlayer[1].GetDisplay().ToString().ToLower() + ".gif";
string PHcard2 = dealtPlayer[2].GetDisplay().ToString().ToLower() + ".gif";
string PHcard3 = dealtPlayer[3].GetDisplay().ToString().ToLower() + ".gif";
string PHcard4 = dealtPlayer[4].GetDisplay().ToString().ToLower() + ".gif";
string CHcard0 = dealtComputer[0].GetDisplay().ToString().ToLower() + ".gif";
string CHcard1 = dealtComputer[1].GetDisplay().ToString().ToLower() + ".gif";
string CHcard2 = dealtComputer[2].GetDisplay().ToString().ToLower() + ".gif";
string CHcard3 = dealtComputer[3].GetDisplay().ToString().ToLower() + ".gif";
string CHcard4 = dealtComputer[4].GetDisplay().ToString().ToLower() + ".gif";
Change it as only variable name as:
public void displayCards()
//declares a string to make a path
this.PHcard0 = dealtPlayer[0].GetDisplay().ToString().ToLower() + ".gif";
this.PHcard1 = dealtPlayer[1].GetDisplay().ToString().ToLower() + ".gif";
this.PHcard2 = dealtPlayer[2].GetDisplay().ToString().ToLower() + ".gif";
this.PHcard3 = dealtPlayer[3].GetDisplay().ToString().ToLower() + ".gif";
this.PHcard4 = dealtPlayer[4].GetDisplay().ToString().ToLower() + ".gif";
this.CHcard0 = dealtComputer[0].GetDisplay().ToString().ToLower() + ".gif";
this.CHcard1 = dealtComputer[1].GetDisplay().ToString().ToLower() + ".gif";
this.CHcard2 = dealtComputer[2].GetDisplay().ToString().ToLower() + ".gif";
this.CHcard3 = dealtComputer[3].GetDisplay().ToString().ToLower() + ".gif";
this.CHcard4 = dealtComputer[4].GetDisplay().ToString().ToLower() + ".gif"; -
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
-
Acrobat Pro 9.5.1 Document Properties glitch
Hi, When trying to view the document properties in Acrobat Pro 9.5.1 I get the below screenshot. The box is tiny and so small nothing can be viewed. I have to press ESC to close the window. I can only use ALT+SPACE to move it also. PC config: Generi
-
When importing my photos from iPhone i see all my photos as duplicates before importing
while trying to import my photos from my iPhone6 to macbook pro using iPhoto i see my pictures as duplicates before importing this the first time i get this problem
-
How do i install an app in zip format
I just downloaded some blackberry apps but they're in zip format. how do i install them?
-
Hi all, I have written a java class which invokes a script in windows.. I call process.waitFor method to obtain the exit status . But whatever the value i return from script the return value from waitfor is always 0. I do samething in Linux where i c
-
Can I buy the old version of i photo
can i purchase the old version of i photo