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?
Similar Messages
-
How to remove an empty row after a table anchor?
We are using FrameMaker 12 on a Windows 7 (64 bit) platform.
I am working my way down a chapter of training content. I am halfway down the chapter, and—as fate would have it—I need to start a table at the top of a page.
When I insert a table (with a caption/title at the top), FM creates an anchor at the top of the page. The space to the right of the anchor is a blank line. I actually want the table to start at the top of the page without the blank line to the right of the anchor.
This is what I tried, with the results:
I put the cursor after the anchor, and press Delete.
Result: The text *below* the table is brought up above the table.
I put the cursor after the last bit of text on the previous page, and press Delete.
Result: The paragraph on the previous page moves down to the next page on top of the table, leaving a large blank space on the previous page.
I change the Start option (on Table Designer) to Top of Column (or Top of Page).
Result: FM leaves the anchor where it was, moves the table down to the next page, and leaves a totally empty page where the table used to be.
Is there any way to just move the table up so that it is on the same line as the anchor?
(And as a tool design issue, is there EVER a reason why a content developer would want an entire blank line above of a table?)
Thank you in advance,
TimI've always thought it strange that FrameMaker doesn't properly butt
tables against the top of a column by default. Here's how to make tables
do it.
1. First, in the Table Designer, on the Basic tab, set Spacing Above to
a negative number, such as -2.0 pt, for the table. (You probably want to
update all of your table styles to use this number by default.)
2. Create an anchor paragraph style to hold tables, perhaps naming it
TableAnchor. In the Paragraph Designer, on the Basic tab, set Spacing
Below Pgf to the same negative number, such as -2.0 pt, for this
paragraph style and select the "Fixed" checkbox. On the Default Font
tab, set the font to the same number, but positive-- such as 2.0 pt.
3. Now, whenever you want to insert a table, first insert a TableAnchor
paragraph to hold the table, then insert your table. The table will not
only fit properly against the top of a column, but should also look
better when it follows text in a column.
NOTE: Anywhere I've used 2.0 or -2.0, you can use any number you want,
just be sure to get the signs right and use the same number in all three
places. Some people use 12.0 pt and -12.0 pt, for example. -
How to make a empty row in a table in itext
Table table = new Table(4,2);
table.setWidth(100);
table.setBorder(1);
Cell cell = new Cell("1");
table.addCell(cell);
table.addCell("2");
table.addCell("3");
table.addCell("4");
table.addCell("");
table.addCell("");
table.addCell("");
table.addCell("");
document.add(table);
in this 1st row will be created bt not the second one.can u plz tell me any solution.i will b thank ful to you..can u plz tell me any solution.i will b thank ful to you.http://www.catb.org/~esr/faqs/smart-questions.html#writewell
How To Ask Questions The Smart Way
Eric Steven Raymond
Rick Moen
Write in clear, grammatical, correctly-spelled language
We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. **Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.** -
How can I display the rows into columns.
How can I display the rows into columns. I mean
Create table STYLE_M
(Master varchar2(10), child varchar2(10));
Insert itno style_m
('MASTER1','CHILD1');
Insert itno style_m
('MASTER2','CHILD1');
Insert itno style_m
('MASTER2','CHILD2');
Insert itno style_m
('MASTER3','CHILD1');
Insert itno style_m
('MASTER3','CHILD2');
Insert itno style_m
('MASTER3','CHILD3');
Note : The Master may have any number of childs.
I want to display like this..
Master child1, child2, child3, .......(dynamic)
MASTER1 CHILD1
MASTER2 CHILD1 CHILD2
MASTER3 CHILD1 CHILD2 CHILD3
Sorry for disturbing you. Please hlp me out if you have any slution.
Thanks alot.
Ram DontineniHere's a straight SQL "non-dynamic" approach.
This would be used if you knew the amount of children.
SELECT
master,
MAX(DECODE(r, 1, child, NULL)) || ' ' || MAX(DECODE(r, 2, child, NULL)) || ' ' || MAX(DECODE(r, 3, child, NULL)) children
FROM
SELECT
master,
child,
ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r
FROM
style_m
GROUP BY
master
MASTER CHILDREN
MASTER1 CHILD1
MASTER2 CHILD1 CHILD2
MASTER3 CHILD1 CHILD2 CHILD3 Since you said that the number of children can vary, I incorporated the same logic into a dynamic query.
SET AUTOPRINT ON
VAR x REFCURSOR
DECLARE
v_sql VARCHAR2(1000) := 'SELECT master, ';
v_group_by VARCHAR2(200) := 'FROM (SELECT master, child, ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r FROM style_m) GROUP BY master';
v_count PLS_INTEGER;
BEGIN
SELECT
MAX(COUNT(*))
INTO v_count
FROM
style_m
GROUP BY
master;
FOR i IN 1..v_count
LOOP
v_sql := v_sql || 'MAX(DECODE(r, ' || i || ', child, NULL))' || ' || '' '' || ';
END LOOP;
v_sql := RTRIM(v_sql, ' || '' '' ||') ||' children ' || v_group_by;
OPEN :x FOR v_sql;
END;
PL/SQL procedure successfully completed.
MASTER CHILDREN
MASTER1 CHILD1
MASTER2 CHILD1 CHILD2
MASTER3 CHILD1 CHILD2 CHILD3I'll point your other thread to this one. -
Query for how to display unique rows in a table
Can i have a query for displaying unique rows in a table.
use d query
select distinct col1,col2... from table ; -
Count of non-empty rows of a table
How to I get the number of non-empty rows of a table ?
ThanksYou can loops through the rows and check whether any cell is empty or not? Use a counter variable to increment the same.
Thanks,
Bibhu -
How to delete a particular row in ALV table
Hi,
How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
Thanks
Bala DuvvuriHello Bala,
Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
data : lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lr_config TYPE REF TO cl_salv_wd_config_table.
lr_table_settings ?= lr_config.
** Setting the ALV selection to multiple selection with no lead selection
lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
Next delete the selected rows in the action triggered by the button:
METHOD onactiondelete_rows .
DATA: wd_node TYPE REF TO if_wd_context_node,
lt_node1 TYPE ig_componentcontroller=>elements_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set,
row_number TYPE i VALUE 0.
wd_node = wd_context->get_child_node( name = 'NODE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
wd_node->remove_element( EXPORTING element = wa_temp ).
ENDLOOP.
CALL METHOD wd_node->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_node1.
wd_node->bind_table( new_items = lt_node1 ).
ENDMETHOD.
If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
Regards,
Uday -
How to find newly updated rows in a table
Hi..
How to know newly updated rows in a table.
Thanks in advance
palOr other good thing would be to add LAST_UPDATED column to your table, that can reflect the time the row gets updated.
G -
How to get count of rows for a table?
Hi,
How to get count of rows for a table and secondly, how can i have access to a particular cell in a table?
Regards,
DevashishHi Devashish,
WdContext.node<Your_node_name>().size() will give you the no: of rows.
This should be the node that is bound to the table's datasource property.
WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value); will select the row at that particular index.
You can access an attribute of a particular row as
WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value).get<attribute_name>();
Hope this helps,
Best Regards,
Nibu.
Message was edited by: Nibu Wilson -
How to list all the rows from the table VBAK
Friends ,
How to list all the rows from the table VBAK.select query and the output list is appreciated.Hi,
IF you want to select all the rows for VBAK-
Write-
Data:itab type table of VBAK,
wa like line of itab.
SELECT * FROM VBAK into table itab.
Itab is the internal table with type VBAK.
Loop at itab into wa.
Write: wa-field1,
endloop. -
How to limit no of rows in ADF table
Hi all,
i want to limit the number of rows displayed in ADf table. I tried using range size, but it didn't work. In the post
Limiting ADF table number of rows is not working
it was stated that it is a bug. Is it fixed now or is there any work around to fix this.
Thanks in advance,
NadHi Nad..
Hope this would help you..
Suppose you have these..
Jspx Page - RangeTable.jspx
Backing Class - RangeTable.java
Iterator used to load Table in page definition - ViewObjTableData
First of all In your pagedefinition page change the RangeSize value to -1 to display all rows in your table like
<iterator id="ViewObjTableDataIterator" RangeSize="-1"
Binds="ViewObjTableData" DataControl="AppModuleDataControl"/>Now Goto your Backing bean and there put the setter getter method to limit your Table to show data as you want.. Like..
public static int rangeSize = 10;
public void setRangeSize(int rangeSize) {
this.rangeSize = rangeSize;
AdfFacesContext.getCurrentInstance().addPartialTarget(table1);
public int getRangeSize() {
return rangeSize;
}Line having this is your default no of rows which you will get on table load..
public static int rangeSize = 10;and
this will forcely refresh your table according to your choise
AdfFacesContext.getCurrentInstance().addPartialTarget(table1);Now come to Your Jspx page and
Add af:selectOneChoice to Action facet of your table and add some selectItem having value of *10*,*20*, and *30* According to your choise
<af:selectOneChoice label="Row Limit" autoSubmit="true"
binding="#{backing_RangeTable.selectOneChoice1}"
id="selectOneChoice1"
value="#{backing_RangeTable.rangeSize}">
<af:selectItem label="10" value="10"
binding="#{backing_RangeTable.selectItem1}"
id="selectItem1"/>
<af:selectItem label="20" value="20"
binding="#{backing_RangeTable.selectItem2}"
id="selectItem2"/>
<af:selectItem label="30" value="30"
binding="#{backing_RangeTable.selectItem3}"
id="selectItem3"/>
</af:selectOneChoice>set its autoSubmit property to true and bind the value property to the rangeSize of your backing beans
now in your table change binding property of Rows to your backingbean's rangeSize like
rows="#{backing_RangeTable.rangeSize}"and also set this
partialTriggers="selectOneChoice1"That all dear..
Now check it out and let me know that you got your solution or not?
and if you got your right answer then dont forget to put \[SOLVED\] tag with your subject line. and mark this answer as correct and helpful.. :-)
Thanks,
Fizzz... -
How to avoid displaying a blank row in the table component
Hi,
I have a create insert button and a table as in a read only form.
Each time i click on a create insert button a popup appears were the person enter the corresponding values and on clicking submit button it has to show changes in the table and on clicking cancel button it has to go back to the page.
But even when i click the cancel there is still an empty row is shown in the table. Is there a way to avoid it ?
Thanks in advance.I am using this managed bean to refresh the table.
public class popupRefreshBean
private RichTable refreshTable;
public popupRefreshBean()
public void refreshTable(ReturnEvent returnEvent)
AdfFacesContext adf=AdfFacesContext.getCurrentInstance();
adf.addPartialTarget(this.getRefreshTable());
// Add event code here...
public void setRefreshTable(RichTable refreshTable)
this.refreshTable = refreshTable;
public RichTable getRefreshTable()
return refreshTable;
} -
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,
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 -
How to insert an empty row on a matrix with multiple loaded lines?
Hi.
I want to insert an empty row on my form's matrix. Currently I am using the <b>AddRow </b>method, as it is:
// C# - it's mandatory to give parameters to the method (=
oMatrix.AddRow(1,1)
But, when the matrix already has some rows (at least 1), the method <b>AddRow </b>inserts the new line as a copy of above line, then, I have to manually clear all cells.
Any idea on this?
Thanks in advance.If you matrix is bound to a dbDatasource you can insert a record in the dbdataspurce instead of using matrix.AddRow... If not only way to do it is by clearing the row after add
Maybe you are looking for
-
Is there anyway to convert video taken by ipad and burn it to a DVD that can play on DVD player?
-
2 Formatted Searches on the same field
Good Evening Experts: I thought maybe one of you might have come across a similar need to what I have to do and could help out. I have a screen that uses Whse id as the unique identifier for each record. I have a Formatted search on the Whse id in m
-
GAAP ETIF 00-21 Multiple Element Arrangements
Does anyone out there have any experience with GAAP invoice and revenue recognition rule EITF 00-21, dealing with Multiple Element Arrangements? This is the scenario where a contract or sales orders includes support or service that is packaged with a
-
This is actually a sub-thread of this one: Mylenium, "Initial issues with PS CS4 Extended Windows XP Pro." #1, 16 Oct 2008 8:52 pm Since several users, including me, have reported that the top part of the Arrange Documents menu is blank in PS CS 4, I
-
Hi all, How to Load HR Master data, is there any specific BAPI or Function Modules for it. Also HR_INFOTYPE_OPERATION function module for maintaing single records and HR_MAINTAIN_MASTERDATA for maintaing multiple records. is there any other FM or BAP