Display null -- as empty row
Team,
If I select "Display Null: Yes", then I see % sign. But I want null value to be empty row.
How can I do that?
Thank you.
I figured this by myself. Select
Display Null : Yes
Null display value: All empty spaces
Similar Messages
-
How to avoid displaying empty rows in a table?
The situation is as follows:
I have got a set of questions under a particular category say marketing category.
The user will be displayed with a table consisting of a set of questions from a particular category with four radio buttons for each question.
Now once he is done with all the set of questions under a particular category, he will be navigated to the next set of questions under some other category say 'xyz'
Now instead of creating seperate view objects for each category, we have created a view object which will hold all the set of questions from all the category but will display only the set of questions under a particular category by declaring a variable in the backing bean and setting the question rendering to the value in the variable. the value to the variable will be changed once the user is done with answering all the set of questions under a particular category.
Now the problem that i am facing is:
Because of the rendering condition that i have used, it displays only those rows that have the rendering condition set to the variable in the backing and displays all other empty rows overlapped.
How do i avoid this situation ??Seems odd, but you could use COALESCE to achieve this.
ME_XE?create table all_nullz (col1 number, col2 number, col3 number);
Table created.
Elapsed: 00:00:00.20
ME_XE?
ME_XE?insert into all_nullz values (1,2,3);
1 row created.
Elapsed: 00:00:00.12
ME_XE?insert into all_nullz values (null, null, null);
1 row created.
Elapsed: 00:00:00.06
ME_XE?
ME_XE?delete from all_nullz where coalesce(col1,col2,col3) is null;
1 row deleted.
Elapsed: 00:00:00.26
ME_XE? -
Matrix Empty row Binding Problem
Hi ,
i created one matrix using screen painter.. all my columns are binded
with user defined fields.(Doc Rows Table). if my total row count is 5.
and i deleted 2 rows using rightclick deleterow event. after adding if i see the same document it display the 2 empty rows and 3 rows with my details.. actually its showing that deleted row also.my UDT also having empty row details..
how to resolve this?
Regards,
Ganesh KHi Geetha,
i think you misunderstood my scenario. while adding no empty rows
are displayed, even if i deleted some added row details.After adding,
while retriving the same document the problem occurs.if am not clear let me know..
As you told, beforeAction = false of Add will be new form with Add mode.so not possible to check that old matrix. otherwise we can delete the empty details from database using query..in beforeaction false pval.actionsucess true part...
regards,
Ganesh k. -
Issue with parameter/filter - trying to display null rows
This is how my data looks in the database
Order_ID ----- Vendor
ID123 NULL
ID234 ABC
ID456 NULL
ID001 CDE
I want to create an SSRS report with a filter for vendors
*All Vendors should be checked off by default
*Users should be able to select multiple vendors
So I started by creating the VendorDataSet, the query looks like
SELECT VendorName
FROM Vendor
WHERE Active = 1
*This query will return all active vendors stored in my vendor table
Then, I created my parameter @prmVendor and it looks like:
-Data Type: Text
-Allow blank value("")
-Allow multiples values
Available Values:
-Dataset: Vendor
-Value field: vendor_name
-Label field: vendor_name
The main query of the report looks like
Select Order_ID, Vendor
FROM Order
LEFT JOIN Vendors
ON Order.VendorID = Vendor.ID
WHERE Vendor IN (@prmVendor)
So at this point it does what is supposed to do except - that when I run the query with all the vendors selected,
the query will only return the ones with vendors populated.
Order_ID ----- Vendor
ID234 ABC
ID001 CDE
I've tried adding the following to my VendorDataSet:
SELECT VendorName
FROM Vendor
WHERE Active = 1
UNION ALL
SELECT '' -- I've also tried SELECT NULL
But when I run the report and look at the list of vendor displayed - it won't show the empty row in the vendor drop down filter
thus, my main query will ignore the orders with no vendors.
Any ideas on how to fix this issue?
-AlanSo I changed my VendorDataSet to look like this:
;WITH cteVendors AS (
SELECT VendorName
FROM Vendor
WHERE Active = 1
UNION ALL
SELECT ''
SELECT (CASE WHEN Vendor IS NULL THEN '' ELSE Vendor END) AS VendorName
FROM cteVendors
This allowed me to show an empty box in my drop down filter see link for
image
Is there a way to make some changes to my main query so this works? so if the user was to select the blank box the query will return something like :
Order_ID ----- Vendor
ID123 NULL
ID456 NULL
-Alan -
- Add an empty row before every subtotal display -
Hi,
I would like know the best way to define an empty row before the start of subtotal display in the BW query.
Thanks,
VenuHi,
Pls Refer - /thread/814122 [original link is broken]
Regards
CSM Reddy -
Hi,
We have a simple report like the following left side, because we use group by in query, now the empty rows will not show in report.
Is there any way we can show all empty items from column B as the snapshot right side? Thank you.
select columnA, columnB, sum(total1) as Total
from mytable
group by columnA, columnBThat's not so much an SSRS issue as it is a SQL issue. It can be tough getting SSRS to display data that doesn't exist.
You may be able to get it to work using a Matrix but my personal preference is to handle it in the SQL code itself. Something like the following should work for you...
CREATE TABLE #temp (
ColA CHAR(2),
ColB CHAR(2),
Amt INT
INSERT #temp (ColA,ColB,Amt) VALUES
('A1','B1',10),
('A1','B1',10),
('A1','B2',25),
('A1','B2',5),
('A1','B3',10),
('A2','B1',20)
-- SELECT * FROM #temp
SELECT
t0.ColA,
t0.ColB,
SUM(COALESCE(t.Amt, 0)) AS Total
FROM
#temp t
FULL JOIN (
SELECT
t1.ColA,
t2.ColB
FROM (
SELECT DISTINCT t1.ColA
FROM #temp t1
) t1
CROSS JOIN (
SELECT DISTINCT t2.ColB
FROM #temp t2
) t2
) t0
ON t.ColA = t0.ColA
AND t.ColB = t0.ColB
GROUP BY
t0.ColA,
t0.ColB
ORDER BY
t0.ColA,
t0.ColB
Jason Long -
Empty rows in a table should not be displayed
Hi,
I have an ADF table which contains 10 rows and 5 columsns,
in which i have rendered all the values in 5 columns of 5 rows to false.
But when displaying the table,the empty rows are displaying by overlapping..
I do not want to display those empty rows.
Thank u
BhanuDuplicate of How to make some rows of a table invisible
Frank -
Hi All,
I face some problem to create empty row. I need a empty row to show user that is end of operation.
The output that I need as below.
OprA OprB Data
A100 (null) Definition
(null) B100 Definition
(null) (null) (null)
A200 B200 Definition
A200 (null) Definition
(null) B200 Definition
(null) B200 Definition
all of the null column from row 1, 2, 4, 5, 6, 7 is direct select from table. The row 3 is what I want to create. example A100 is same group with B100. After show last B100, is end of operation '100'. and need a empty or null row. Then continue with operation '200'.
Thanks for who help me on this.Hi Skymonster,
Not sure how you would be doing your processing.
However assuming if you are doing it one after the other, meanig you first process 100 display it (here is where you want to append 200 now)
here is one way of doing it.
with data as (
select 'A100' a,null b ,'DEFINiTION' c from dual union all
select null,'B100','DEFINiTION' from dual),
dat2 as (
select null,'B200','DEFINiTION' from dual union all
select 'A200',null,'DEFINiTION' from dual union all
select null,'B200','DEFINiTION' from dual)
select * from data
group by rollup(a,b,c)
having (grouping(a)=1 and grouping(b)=1 and grouping(c)=1) or
(grouping(a)=0 and grouping(b)=0 and grouping(c)=0)
union all
select * from dat2However i am of the strong opinion that formatting should be handled by front end application and not in such a manner especially in this case.
Peter's example is much better than mine where you directly uinon NULL
Howver if you can give a clue how we can identify end of a record that will be helpfull.
Regards,
Bhushan -
Hello Experts!
I have a crosstab, which contains Years on the left and some statstic values on the right for each Schools. Since not all schools have data for each years. My crosstab will skip some rows when no data have found for some years of the school. But I want to show all rows even no data was found.
Although I have checked all "YES" for "Show rows with empty measure....", "Show empty columns", "Show rows with empty dimension values", "Show empty columns", "Show rows with empty dimension values" and "Show when empty" in Edit Format - Display properties.
The empty rows just won't show up. Did I miss something? Please help all experts.
Thanks.Hi Jonathn,
Have a look on the SAP note 1295827 - When unticked, the 'Show when empty' property for a table in a WebIntelligence report does not work as expected if the table contains null values.
Symptom
'Show when empty' property for a table does not work as expected in WebIntelligence report when it is unticked.
If table contains null values, this does not work.
Need to hide the table but it is always displayed.
Reproducing the Issue
Open Club.mdb & remove 'French Riviera' from Resort table.
Login to Infoview & create a new WebIntelligence report using Island Resorts.unv selecting Country and Resort objects. Insert condition on Country=France. Run query.
Remove <Country> column from the table.
Select the table and go to Properties.
The option 'Show when empty' is ticked by default. Untick this -> The table is still displayed.
WebIntelligence XI Release 2
WebIntelligence XI 3.0 & 3.1
Cause
If this is unticked & the table contains null values, the table is still displayed. This is normal behaviour - this feature does not work with null values in a table.
Resolution
The 'Show when empty' functionality, when unticked, only hides the table when it is entirely empty, i.e. when no rows have been returned in the query. It is then only visible in 'Structure' mode.
For hiding a row which is empty, untick the option/s 'Show rows with empty measures/dimensions'. But the entire row must be empty before it will be hidden by this feature.
Make use of this for good report design if there are many tables/blocks within the report. If the tables are empty, it's best if they are hidden from view.
I hope this will help.
Regards,
Hitesh -
Hi there,
In my advanced table with multiple selection check box, I have the logic to insert 10 rows into the view object before the table is rendered. So my table display 10 new blank rows.
Assume user only enter 3 rows and I don't want to save those 7 empty rows. How can I recognize the 7 empty rows and remove them from the VO?
Please advise.
thanks,
CharlesHi Charles,
You may be dispalying some columns on OAF page, check all thos for null, if every field is Null then it is unused and you can remove it.
This is sample code:
public void deleteUnusedLines()
XXEGASRLinesVOImpl pervo = getXXEGASRLinesVO1();
if(pervo==null)
Row row[] = pervo.getAllRowsInRange();
System.out.println("No of items "+row.length);
for (int i=0;i<row.length;i++)
XXEGASRLinesVORowImpl rowi = (XXEGASRLinesVORowImpl)row;
if((rowi.getItemDescription()==null)||("".equals(rowi.getItemDescription().trim())))//add more conditions here to locate empty rows.
rowi.remove();
Regards,
Reetesh Sharma -
Suppressing an empty row in an af:table?
Is there a way to suppress / hide displaying of an individual row of an af:table if the value is empty or null? I understand how to hide an entire column using the rendered attribute, but I need to hide any rows where a particular field is empty?
For example, if 'Comments' is empty, I don't want to display that particular row (but do want to display other rows where Comments is not empty):
<af:column formatType="text" >
<af:outputText value="#{row.Comments}"/>
</af:column>
thanksJust wondering if a simple solutions will do for you ?
If you don't want to show the row, then why do you have it in your VIEW object ?
Maybe the solution is really this simple (don't select the rows at all) maybe it's not. It's worth a try....
Regards
Luc Bors -
How can I create an empty row on a #TempTable based on an input parameter
So if my Line of Business is 'MC' or 'MG', I have to go over to Oracle and get its data accordingly. Then, when I create my final report result set, I think I'll want to UNION in that result set if my Parameter is 'MC' or 'MG'. I don't think I can UNION
based on the value of the Parameter. So my thought process was to create an empty row on my #TempTable so when I UNION and my parameter is NOT 'MC' or 'MG' then it will have nothing to UNION in. My struggle is how do I create an empty row in my #TempTable
if my parameter is NOT 'MC' or 'MG'
If I am wwwaaayyy off here, please tell me so.
This is my #TempTable Creation SQL...
IF EXISTS
(SELECT 1
FROM [#TempTable_LineOfBusiness_Parameter]
WHERE [#TempTable_LineOfBusiness_Parameter].[RESULT] IN ('MC','MG'))
BEGIN
SELECT *
INTO [#TempTable_Market_Prominence_Member_Data]
FROM OPENQUERY
(RPDMHF,
'SELECT HCFA_NAME_ORG.NAME_ID,
HCFA_NAME_ORG.MEMBER_ID,
HCFA_NAME_ORG.HIC_NUMBER,
MEMBER.NAME_FIRST,
MEMBER.NAME_LAST,
HCFA_DATE.START_DATE,
HCFA_DATE.END_DATE,
HCFA_NAME_ORG.COUNTY_CODE,
HCFA_NAME_ORG.PART_A_PAYMENT,
HCFA_NAME_ORG.PART_B_PAYMENT,
HCFA_NAME_ORG.STATUS,
HCFA_NAME_ORG.ORG_ID,
HCFA_NAME_ORG.PLAN,
HCFA_NAME_ORG.ENROLL_DATE,
HCFA_NAME_ORG.PBP_ID,
HCFA_DATE.VALUE
FROM SC_BASE.HCFA_DATE
LEFT JOIN SC_BASE.HCFA_NAME_ORG
ON HCFA_NAME_ORG.NAME_ID = HCFA_DATE.NAME_ID
LEFT JOIN AMIOWN.MEMBER
ON TRIM(MEMBER.MEMBER_NBR) = TRIM(HCFA_NAME_ORG.MEMBER_ID)
WHERE HCFA_DATE.INDICATOR = ''plan''
AND HCFA_DATE.START_DATE >= ''2015-01-01''
END
If I add an ELSE, it always comes back and tells me the #TempTable_Market_Prominence_Member_Data already exists. As if it's creating it regardless of the Top IF.
Thanks for your review and am hopeful for a reply.Hi ITBobbyP,
The error came back from your ELSE Statement most probably caused by the reason mentioned in Hoffmann's post.
Regarding your requirement, I would suggest you CREATE the [#TempTable_Market_Prominence_Member_Data] explicitly.
CREATE TABLE [#TempTable_Market_Prominence_Member_Data]
NAME_ID INT,
MEMBER_ID INT,
HIC_NUMBER VARCHAR(99),
NAME_FIRST VARCHAR(99),
NAME_LAST VARCHAR(99),
START_DATE DATE,
END_DATE DATE,
COUNTY_CODE VARCHAR(99),
PART_A_PAYMENT MONEY,
PART_B_PAYMENT MONEY,
STATUS VARCHAR(99),
ORG_ID INT,
PALN VARCHAR(99),
ENROLL_DATE VARCHAR(99),
PBP_ID INT,
VALUE INT
IF EXISTS
(SELECT 1
FROM [#TempTable_LineOfBusiness_Parameter]
WHERE [#TempTable_LineOfBusiness_Parameter].[RESULT] IN ('MC','MG'))
BEGIN
INSERT INTO [#TempTable_Market_Prominence_Member_Data]
SELECT *
FROM OPENQUERY
(RPDMHF,
'SELECT HCFA_NAME_ORG.NAME_ID,
HCFA_NAME_ORG.MEMBER_ID,
HCFA_NAME_ORG.HIC_NUMBER,
MEMBER.NAME_FIRST,
MEMBER.NAME_LAST,
HCFA_DATE.START_DATE,
HCFA_DATE.END_DATE,
HCFA_NAME_ORG.COUNTY_CODE,
HCFA_NAME_ORG.PART_A_PAYMENT,
HCFA_NAME_ORG.PART_B_PAYMENT,
HCFA_NAME_ORG.STATUS,
HCFA_NAME_ORG.ORG_ID,
HCFA_NAME_ORG.PLAN,
HCFA_NAME_ORG.ENROLL_DATE,
HCFA_NAME_ORG.PBP_ID,
HCFA_DATE.VALUE
FROM SC_BASE.HCFA_DATE
LEFT JOIN SC_BASE.HCFA_NAME_ORG
ON HCFA_NAME_ORG.NAME_ID = HCFA_DATE.NAME_ID
LEFT JOIN AMIOWN.MEMBER
ON TRIM(MEMBER.MEMBER_NBR) = TRIM(HCFA_NAME_ORG.MEMBER_ID)
WHERE HCFA_DATE.INDICATOR = ''plan''
AND HCFA_DATE.START_DATE >= ''2015-01-01''
END
Explicitly creating the temp table will offer below benefit in this case.
The ELSE statement is no longer needed, if the no rows get inserted into that table, it has nothing to union an empty table.
With the column datatype defined, you can avoid such conversion error
SELECT NULL AS COL1,NULL AS COL2 INTO #T
SELECT COL1,COL2 FROM #T
UNION
SELECT 1,'ABC'--Conversion failed when converting the varchar value 'ABC' to data type int.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Plsql - store function - passing a NULL or empty string argument
Please see the question I posed below. Does anyone have experience with passing a NULL or empty string to a store function? THANKS.
Hi All,
I have a function that takes in two string arrays, status_array, and gender_array. You can see the partial code below. Somehow if the value for the string array is null, the code doesn't execute properly. It should return all employees, but instead it returns nothing. Any thoughts? THANKS.
for iii in 1 .. status_array.count loop
v_a_list := v_a_list || '''' || status_array(iii) || ''',';
end loop;
v_a_list := substr(v_a_list, 1, length(trim(v_a_list)) - 1);
for iii in 1 .. gender_array.count loop
v_b_list := v_b_list || '''' || gender_array(iii) || ''',';
end loop;
v_b_list := substr(v_b_list, 1, length(trim(v_b_list)) - 1);
IF v_a_list IS NOT NULL and v_b_list IS NOT NULL THEN
v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') and gender in (' || v_b_list || ')';
ELSIF v_a_list IS NOT NULL and v_b_list IS NULL THEN
v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') ';
ELSIF v_a_list IS NULL and v_b_list is not null THEN
v_sql_stmt := 'select distinct full_name from t_employee where gender in (' || v_b_list || ')';
ELSE
v_sql_stmt := 'select distinct full_name from t_employee';
END IF;
OPEN v_fullname_list FOR v_sql_stmt;
RETURN v_fullname_list;Not sure what version of Oracle you are using, so here's an approach that will work with many releases.
Create a custom SQL type, so we can use an array in SQL statements (we'll do that at the end).
create or replace type string_list is table of varchar2(100);
/declare your A and B lists as the type we've just created
v_a_list string_list default string_list();
v_b_list string_list default string_list();populate the nested tables with non-null values
for iii in 1 .. status_array.count
loop
if status_array(iii) is not null
then
v_a_list.extend;
v_a_list(v_a_list.count) := status_array(iii);
end if;
end loop;Here you'd want to do the same for B list.
Then finally, return the result. Using ONE single SQL statement will help a lot if this routine is called frequently, the way you had it before would require excessive parsing, which is quite expensive in an OLTP environment. Not to mention the possibility of SQL injection. Please, please, please do some reading about BIND variables and SQL injection, they are very key concepts to understand and make use of, here's an article on the topic.
[http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1922946900346978163]
So here we ask for the distinct list of full names where either the status and the gender qualify based on the input data, OR the array passed in had no data to restrict the query on (the array.count = 0 does this).
OPEN v_fullname_list FOR
select
distinct
full_name
from t_employee
where
status in (select /*+ CARDINALITY ( A 5 ) */ column_value from table(v_a_list) A )
or v_a_list.count = 0
and
gender in (select /*+ CARDINALITY ( B 5 ) */ column_value from table(v_b_list) B )
or v_b_list.count = 0
);Hope that helps.
Forgot to mention the CARDINALITY hint i added in. Oracle will have no idea how many rows these arrays (which we will treat as tables) will have, so this hint tells Oracle that you expect X (5 in this case) rows. Adjust it as you need, or remove it. If you are passing in thousands of possible values, where i've assumed you will pass in only a few, you may want to reconsider using the array approach and go for a global temporary table.
Edited by: Tubby on Dec 11, 2009 11:45 AM
Edited by: Tubby on Dec 11, 2009 11:48 AM
Added link about using Bind Variables. -
How to add empty rows in table in smart form
how to add empty rows in table in smart form?
plz help me regarding this
send me ur queries to [email protected]You will need to add some extra rows to the internal table that your table is displaying. Use a program node to append additional rows with a key but no argument.
Alternaively a template may me more suitable for your requirement than a table.
Finally, please do not include you e-mail address in your question. Your question and the answers provided to it are for the benefit of everyone in the Community.
Regards,
Nick -
Button to delete all empty rows
I am in the process of creating an interactive form that has a button that add rows for the user to input issues and another button to add follow-ups to those instances. There are 3 different sets of these. However, we do not want to add a delete button to all rows, to allow for accidental deletion of already inputted data. I would like to create a button that will delete all empty rows, including all subforms. Either that, or upon saving the document, all empty rows would be deleted - whichever would be easier. Please help! This seems like it will be a complicated task and I am not that well versed in LiveCycle to be able to figure this out on my own.
Thank you!There is no doubt that looping through nested repeating objects is more complex:
Here is the script for the first table with follow-up rows:
// Technical
var nCount3 = VitalsSubform.Technical._Instance1.count;
for (var k=0; k<nCount3; k++)
// this is script to remove the follow-up rows in the first table only
var nCount6 = xfa.resolveNode("VitalsSubform.Technical.Instance1[" + k + "]").Table1._Row1.count;
// loop through the rows in the follow-up table
for (var i=0; i<nCount6; i++)
if (xfa.resolveNode("VitalsSubform.Technical.Instance1[" + k + "].Table1.Row1[" + i + "]").Cell4.rawValue == null)
// remove null row
xfa.resolveNode("VitalsSubform.Technical.Instance1[" + k + "]").Table1._Row1.removeInstance(i);
// recount nCount in case a row has been deleted
nCount6 =xfa.resolveNode("VitalsSubform.Technical.Instance1[" + k + "]").Table1._Row1.count;
// account for the row that is now deleted
i = i-1;
// now remove null statements
if (xfa.resolveNode("VitalsSubform.Technical.Instance1[" + k + "]").Table1.Statement.Statement.rawValue == null)
VitalsSubform.Technical._Instance1.removeInstance(k);
var nCount3 = VitalsSubform.Technical._Instance1.count;
k = k-1;
It is by no means tested and could still be flaky.
Have you considered a manual 'x'/delete button for the follow-up rows?
Here is the form: https://acrobat.com/#d=JMGUKXNQ*qMD18S3W5VxSQ
Niall
Maybe you are looking for
-
Problems + Itunes no longer works
Hello, I recently used a system optimization tool because my system in running pretty slow. It worked somewhat, but now I am having problems in other area that previously were just fine. For instance, whenever (since the optimization) I open iTunes,
-
Dear All, pl help that as i have used t code MM60, & selected mat type as ROH & given plant number then executed , but here in the list the column tab are available having mat type , plant pur grp but here the code is not displaying
-
I have my iPod synced to my PC, but I also have a iBook that I'd like to be able to hook it up to and add music from on a short-term basis. Is this possible? What do I have to do to avoid having my iPod auto-sync with my iBook?
-
Launching an action script from within my program
I am trying to develop an application that will launch Photoshop, load an image, load a saved action, run the action on the image and the save the image with a new name. I am writing the application in c#, and I have PhotoShop CS2. Any help, would be
-
Photoshop "unexpectantly quits" when I go to browse
Photoshop "unexpectantly quits" when I go to browse