How to suppress columns on repor's dynamically
Hi,
I have a requirement where i need to suppress columns on reports depending on the parameter selection .
For example on report i have
col1, col2, col3
user can now select to display col1 and col3 on report.
Using format trigger i am able to suppress this the only problem is, there is a space equivalent to the size of col2 in between col1 and col3.
Is there any solution for this?
Thanks,
Shailesh
You are correct but how do i shift the col3 to left ?
Is there any best of doing this?
srw,anchoring....
Thanks!
Sh
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Raktim Kumar ([email protected]):
If you want to suppress the col2 then go to the property "conditional formatting" of the col2.
Now depending upon the user parameter hide the specific coloumn.
I think it will solve your purpose.
thanks<HR></BLOCKQUOTE>
null
Similar Messages
-
How to make columns in a table dynamic
Hi,
I want to make the columns of a table dynamic.
At design time I dont know how many columns will be required.
Rows are made dynamic by using the bean concept.
Please help me in this reference(columns).
Thanks
PoojaHi, i don't know how you create the rows dynamically but
have you tried to use a forEach?
<af:table ...>
<af:forEach items="..." var="...">
<af:column headerText="...">
<af:outputText value="..."/>
</af:column>
</af:forEach>
</af:table>
here there is an example of a dynamic panelList:
<af:panelList rows="3" maxColumns="6">
<af:forEach items="#{bindings.ContratosView1.rangeSet}" var="li">
<af:commandLink text="#{li.Codigo}" action="Edit"/>
</af:forEach>
</af:panelList> -
ALV problem - how to suppress column
I have one ALV report which is shoeing output.
However so many columns are with purely spaces (I mean no value exists in that column).
My requirement is to suppress the columns when ever that columns doesn't have values in them.
Could you please suggest me how ? The program is using REUSE_ALV_GRID_DISPLAY.
Thank you in advance.Hi Sam,
Check the rules and regulations once,
If anyone have more than 10 threads open we can report to moderator.
I wonder how you have still more than 150 threads open,
let make forums a better place..
please close all at the soonest.
-Dunlop. -
How to add columns for existing table dynamically?
Hi,
I created table structure only. I want to add columns for this existing table. Columns are not fixed, according to the user choice i need to write code.
Plz give me reply asap.
Thanks
ShirishaHi Shirisha,
I think the following code snippet will help you.
int l_no_cols = 0;
//Get the number of columns in this variable, something like the following
//l_no_cols = wdContext().currentContextElement().get<Context_attribute_name>;
IWDTable l_tab;
IWDTransparentContainer l_tbl_cont = (IWDTransparentContainer)view.getElement("TableDataCont");//ID of Container
l_tab = (IWDTable)view.getElement("TableData");//ID of Table
l_tab.setVisible(WDVisibility.VISIBLE);
l_tab.bindDataSource(wdContext.nodeTable_Data().getNodeInfo());
for(int a = 1; a <=l_no_cols; a++)
//Creating the column
IWDTableColumn l_tab_col = (IWDTableColumn)view.createElement(IWDTableColumn.class,"COL"+a);
//Creating Caption for Column Header
IWDCaption l_tab_cap = (IWDCaption)view.createElement(IWDCaption.class,"Caption"+a);
l_tab_cap.setText("Col"+i);
l_tab_col.setHeader(l_tab_cap);
//Creating Table Cell Editor for column
IWDInputField l_tab_cell = (IWDInputField)view.createElement(IWDInputField.class,"CellEditor"+a);
//creating context node attribute for the column dynamically
wdContext.nodeTable_Data().getNodeInfo().addAttribute("Col"+i,"com.sap.dictionary.String");
l_tab_cell.bindValue(wdContext.nodeTable_Data().getNodeInfo().getAttribute("Col"+i));
l_tab_col.setTableCellEditor(l_tab_cell);
l_tab.addColumn(l_tab_col);
l_tbl_cont.addChild(l_tab);
Regards,
Alka -
How to suppress column names in SQL-report
What I want is just the data, without any column names.
COLUMN LDATE OFF;
SELECT SYSDATE LDATE
FROM DUAL;
LDATE
07.11.11
This example doesn't work. There is still LDATE above column. Any idea?user5116754 wrote:
Great, it's so simple. Im sure there is a way to omit this result statement: "531 rows selected" at the end of report!There is, and it's also in the documentation...
SQL> set feedback off
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
SQL> -
How can i suppress columns in ALV ?? Will reward points.
Hello Gurus, how can i suppress column in ALV when i`m using the transparent table:
CALL METHOD grid->set_table_for_first_display
EXPORTING
i_structure_name = 'ZIANEXE'
is_layout = wa_layout
is_variant = wa_variant
i_save = 'U'
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
CHANGING
it_outtab = itab[]
it_fieldcatalog = fieldcat.
Please help.in the fieldcatalog you are providing there is a field NO_OUT use this.
Loop over internal table and check fieldname. If fieldname = column you want to hide, NO_OUT = 'X'.
Edited by: Micky Oestreich on May 8, 2008 12:06 PM -
How to add column dynamically based on user input in oracle?
**how to add column dynamically based on user input in oracle?**
I am generating monthly report based on from_date to to_date below is my requirement sample table
EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE | 01-OCT-12 | 02-OCT-12 | 03-OCT-12
100001.............John...........02-OCT-12...............6
100002.............chris...........01-OCT-12...............4
Based on user input, that is, if user need the report from 01-OCT-12 TO 03-OCT-12, i need to add that dates as column in my table, like 01-OCT-12 | 02-OCT-12 | 03-OCT-12....
below is my code
create or replace
procedure MONTHLY_LVE_NEW_REPORT_demo
L_BUSINESS_UNIT IN SSHRMS_LEAVE_REQUEST_TRN.BUSINESS_UNIT%TYPE,
--L_LEAVE_TYPE_CODE IN SSHRMS_LEAVE_REQUEST_TRN.LEAVE_TYPE_CODE%TYPE,
L_DEPARTMENT_CODE IN VARCHAR2,
--L_MONTH IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
L_FROM_DATE IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
L_TO_DATE in SSHRMS_LEAVE_REQUEST_TRN.LVE_TO_DATE%type,
MONTHRPT_CURSOR OUT SYS_REFCURSOR
AS
O_MONTHRPT_CURSOR_RPT clob;
v_return_msg clob;
BEGIN
IF (L_BUSINESS_UNIT IS NOT NULL
AND L_FROM_DATE IS NOT NULL
and L_TO_DATE is not null
-- AND L_DEPARTMENT_CODE IS NOT NULL
THEN
OPEN MONTHRPT_CURSOR FOR
select EMPLOYEE_CODE, EMPLOYEE_NAME AS NAME, DEPARTMENT_CODE AS DEPARTMENT,DEPARTMENT_DESC, CREATED_DATE,
NVL(WM_CONCAT(CL_RANGE),'') as CL_TAKEN_DATE,
case when NVL(SUM(CL2),0)<0 then 0 else (NVL(SUM(CL2),0)) end as CL_BALANCE,
from
SELECT DISTINCT a.employee_code,
a.EMPLOYEE_FIRST_NAME || ' ' || a.EMPLOYEE_LAST_NAME as EMPLOYEE_NAME,
a.DEPARTMENT_CODE,
a.DEPARTMENT_DESC,
B.LEAVE_TYPE_CODE,
B.LVE_UNITS_APPLIED,
B.CREATED_DATE as CREATED_DATE,
DECODE(b.leave_type_code,'CL',SSHRMS_LVE_BUSINESSDAY(L_BUSINESS_UNIT,to_char(b.lve_from_date,'mm/dd/yyyy'), to_char(b.lve_to_date,'mm/dd/yyyy'))) CL_RANGE,
DECODE(B.LEAVE_TYPE_CODE,'CL',B.LVE_UNITS_APPLIED)CL1,
b.status
from SSHRMS_EMPLOYEE_DATA a
join
SSHRMS_LEAVE_BALANCE C
on a.EMPLOYEE_CODE = C.EMPLOYEE_CODE
and C.STATUS = 'Y'
left join
SSHRMS_LEAVE_REQUEST_TRN B
on
B.EMPLOYEE_CODE=C.EMPLOYEE_CODE
and c.EMPLOYEE_CODE = b.EMPLOYEE_CODE
and B.LEAVE_TYPE_CODE = C.LEAVE_TYPE_CODE
and B.STATUS in ('A','P','C')
and (B.LVE_FROM_DATE >= TO_DATE(L_FROM_DATE, 'DD/MON/RRRR')
and B.LVE_TO_DATE <= TO_DATE(L_TO_DATE, 'DD/MON/RRRR'))
join
SSHRMS_LEAVE_REQUEST_TRN D
on a.EMPLOYEE_CODE = D.EMPLOYEE_CODE
and D.LEAVE_TYPE_CODE in ('CL')
AND D.LEAVE_TYPE_CODE IS NOT NULL
group by EMPLOYEE_CODE, EMPLOYEE_NAME, DEPARTMENT_CODE, DEPARTMENT_DESC, CREATED_DATE
else
v_return_msg:='Field should not be empty';
end if;
END;
my code actual output
EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE
100001....................John............02-OCT-12.................6
100001....................chris...........01-OCT-12.................4
how to add column dynamically based on from_date to to_date?
Thanks and Regards,
Chris Jerome.You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);
-
How to spilt columns dynamically in the report based on Date Parameters
Hi All,
We have an XML Publisher report in which the parameters are Fom date and To date.
User wants the data in the report to be split dynamically based on the months in the From date and To date interval.
Eg. if the From date is 01-JAN-2013 and To date is '31-MAR-2013' then the report should show 3 columns JAN,FEB and MAR and the corresponding data.
if the From date is 01-JAN-2013 and To date is '31-MAY-2013' then the report should show 5 columns JAN,FEB,MAR,APR and MAY and the corresponding data.
Can anyone please advise, how can we spilt the months and data dynamically in the report.
Regards,
Shrutiwell you wanted the columns to be added dynamically. the easiest way would be to use a Pivot since the columns are based on the values in the data. and if the values of that column are Month Name/Abbreviation for that date then you will get month columns.
Have you worked with Pivots before? -
How can we set the column size and height dynamically
Hi All,
I have a requirement where i am designing rtf for excel output.Here i have a column where the height of that particular column must get reset dynamically according to the data that's getting populated.
Thankq in advance.I had the same problem and I finally found that you can't set a form bean.
There is no methods to do this.
The only way is to make it a dynamic form bean, but i haven't investigated it.
Now I use normal beans to move data between pages.
Sorry if it's not what you want. If you have another solution let me know. -
Help on query : How to produce columns based on rows?
Hi All,
I have a table table1 with below structure and data
Item State Value
A1 MS 100
A1 GOA 3
A1 UP 4
B2 MS 34
B2 GOA 55
B2 PB 3
B2 DL 4
B3 MS 99
B3 TN 1I have an requirement to query this table and generate below output
Item MS GOA UP PB DL TN
A1 100 3 4 0 0 0
B2 34 55 0 3 4 0
B3 99 0 0 0 0 1The issue here is that we can have more State codes hence accordingly the query should dynamically return those number of columns
Is there any way to produce above output? Any help will be appreciated.
Oracle DB Version - Oracle 8i
Thanks in advance!Hi,
That's called a pivot .
The basic tecnique is something like:
SELECT item
, SUM (CASE WHEN state = 'MS' THEN value ELSE 0) AS ms
, SUM (CASE WHEN state = 'GOA' THEN value ELSE 0) AS goa
, SUM (CASE WHEN state = 'UP' THEN value ELSE 0) AS up
, SUM (CASE WHEN state = 'PB' THEN value ELSE 0) AS pb
, SUM (CASE WHEN state = 'DL' THEN value ELSE 0) AS dl
, SUM (CASE WHEN state = 'TN' THEN value ELSE 0) AS tn
FROM table_x
GROUP BY item;but this requires you to know how many states there are, and what they are, when you write the query.
Since you don't, you need to run a preliminary query that will generate a SELECT statement like the one above, or at least the SUM expressions for the variable columns. That's called dynamic SQL , and a technique for doing that is included below. (The example uses COUNT, but any aggregate function, including SUM, will work.)
Another possibility is String Aggregation, where instead of individual columns for each state, you have one huge VARCHAR2 column, formatted to look like separate columns. The tools avaiable for doing that in Oracle 8.1 are pretty poor, however, so I think you're better off with dynamic SQL.
How to Pivot a Table with a Dynamic Number of Columns
This works in any version of Oracle
The "SELECT ... PIVOT" feature introduced in Oracle 11
is much better for producing XML output.
Say you want to make a cross-tab output of
the scott.emp table.
Each row will represent a department.
There will be a separate column for each job.
Each cell will contain the number of employees in
a specific department having a specific job.
The exact same solution must work with any number
of departments and columns.
(Within reason: there's no guarantee this will work if you
want 2000 columns.)
Case 0 "Basic Pivot" shows how you might hard-code three
job types, which is exactly what you DON'T want to do.
Case 1 "Dynamic Pivot" shows how get the right results
dynamically, using SQL*Plus.
(This can be easily adapted to PL/SQL or other tools.)
NOTE: Using SQL*Plus file I/O, as in this example, is just
one of many ways to do dynamic SQL.
PROMPT ========== 0. Basic Pivot ==========
SELECT deptno
, COUNT (CASE WHEN job = 'ANALYST' THEN 1 END) AS analyst_cnt
, COUNT (CASE WHEN job = 'CLERK' THEN 1 END) AS clerk_cnt
, COUNT (CASE WHEN job = 'MANAGER' THEN 1 END) AS manager_cnt
FROM scott.emp
WHERE job IN ('ANALYST', 'CLERK', 'MANAGER')
GROUP BY deptno
ORDER BY deptno
PROMPT ========== 1. Dynamic Pivot ==========
-- ***** Start of dynamic_pivot.sql *****
-- Suppress SQL*Plus features that interfere with raw output
SET FEEDBACK OFF
SET PAGESIZE 0
SPOOL p:\sql\cookbook\dynamic_pivot_subscript.sql
SELECT DISTINCT
', COUNT (CASE WHEN job = '''
|| job
|| ''' ' AS txt1
, 'THEN 1 END) AS '
|| job
|| '_CNT' AS txt2
FROM scott.emp
ORDER BY txt1;
SPOOL OFF
-- Restore SQL*Plus features suppressed earlier
SET FEEDBACK ON
SET PAGESIZE 50
SPOOL p:\sql\cookbook\dynamic_pivot.lst
SELECT deptno
@@dynamic_pivot_subscript
FROM scott.emp
GROUP BY deptno
ORDER BY deptno
SPOOL OFF
-- ***** End of dynamic_pivot.sql *****
EXPLANATION:
The basic pivot assumes you know the number of distinct jobs,
and the name of each one. If you do, then writing a pivot query
is simply a matter of writing the correct number of ", COUNT ... AS ..."\
lines, with the name entered in two places on each one. That is easily
done by a preliminary query, which uses SPOOL to write a sub-script
(called dynamic_pivot_subscript.sql in this example).
The main script invokes this sub-script at the proper point.
In practice, .SQL scripts usually contain one or more complete
statements, but there's nothing that says they have to.
This one contains just a fragment from the middle of a SELECT statement.
Before creating the sub-script, turn off SQL*Plus features that are
designed to help humans read the output (such as headings and
feedback messages like "7 rows selected.", since we do not want these
to appear in the sub-script.
Turn these features on again before running the main query.
*/ -
How to Suppress Header and footer.
Hi,
I have master-Detail report. Report prints One master and all detail records on a page. If detail records are more than to fit on one page, report prints master gaian on next page followed by detail records. For a master record If there are no detail records, I supress the master record also using format trigger.
My problem is how to suppress the Header & Footer information that has to be printed on each page otherwise. When I suppress printing of master, All I get is Page header and footer. This happens only to the master records that fall in between. The pages related to last master records are not printed.
How can I suppress printing of header and footer on blank pages.
ThanksThanks Santa & Rohit,
As santa has suggested, I am already suppressing the printing of master record and its column headings based on the count of number of deatil records. If count of detail records = 0, I am suppressing master record.
The problem is with Report header (TITLE etc.) and footer. I have to print TITLE and FOOTER on each an very page. So I have put these into Margins. The Count of master records at the report level, can be used to suppress the master records column headings and also TITLE and FOOTER. So if there is no master records, report does not print anything and that is fine.
Problem comes when there are some master records with "No" detail records. Something like:
-M1
----D1
----D2
----Dn
-M2
----D1
----D2
----Dn
M3
M4
M5
----D1
----D2
----Dn
M6
M7
M8
My report now produces pages for M1, M2 and blank data area (with Title and Footer) for M3, M4 and the M5. It suppresses pages for M6, M7, M8 etc. So if a master record has no detail records, but happens to be the last records that suppresses the TITLE and footer also.
Any Ideas how to suppress TITLE/FOOTER for M3 & M4.
Thanks -
How to make column range based on a column in Oracle BI 11g
Hello everyone!
I want to know, how to make column range from a column in oracle bi 11g.
for example!
I have a column amounts and I want to build on this with other values of quantity, other column range 1-9,10-49,50-99,100-249, 249 o more.
regards!
when I try to make the range I have error.
Syntax error [nQSError: 26012] . (HY000)
SQL Issued: SELECT CASE WHEN "CUBO_DEEE_TAB"."CANTIDAD" BETWEEN 1 AND 9 THEN 1 a 9 ELSE "CUBO_DEEE_TAB"."CANTIDAD" END FROM "DM_DEEE"
Edited by: 964157 on 09-oct-2012 11:50You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);
-
How to suppress bars on chart and customize legend text
I am new to Crystal Reports and have a couple of questions about bar charts. I am using Crystal Reports XI Release 2 with Developer Studio 2005 (C# .NET) and SQL Server.
I have a very simple report that sums up the values of 14 different database columns. There is a also a bar chart to display the summed values.
My questions are:
1. Based on some user preferences, I may not want to display all 14 values. I found how to Suppress fields on the report, but cannot figure out how to prevent them from appearing in the bar chart as well.
2. Can I customize the names of the bars in the legend?
Any help will be great appreciated!Please re-post if this is still an issue to the .NET Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly
-
How to pass column name at run time in function.
how to pass column name at run time in function as parameter.
thank in advance
pramod patelHello,
Using dynamic sql you can pass column name to function. well I am not getting what you really want to do ? Please write in more detail. By the way I am providing one example here. see it uses dynamic sql.
Create or replace function fun_updtest (p_columnname_varchar2 in varchar2,
p_value_number in number)
return number is
v_stmt varchar2(500);
begin
v_stmt := 'update emp
set '||p_columnname_varchar2||' = '||to_char(p_value_number)||'
where empno = 7369';
execute immediate v_stmt;
return 0;
commit;
end;
call to this function can be like this..
declare
v_number number;
begin
v_number := fun_updtest('SAL',5000);
end;
Adinath Kamode -
How to suppress Missing and Zero rows in OBIEE SA for Essbase Cube as Sour
Hi All,
Currently we have Essbase(ASO) cubes as source for OBIEE.How to suppress #Misssing and Zero rows in OBIEE.
For example, Dim1 having 4 members and Dim2 having 10 members then it shows 4*10= 40 combinations in Results.
If we considered Metrics also along with attributes, OBIEE will suppress “No Data” values and shows attributes having Data.
In Essbase-Excel Combination, Metrics will automatically comes with attributes so there we have option to suppress “No Data” rows under "Essbase Options".
In our current requirement,Users are selecting only Metadata.Is there any work around where we can suppress even if the measures or metrics are not selected
Thanks,
SatyaBThanks Deepak.
As i am new to OBIEE,If possible could you please tell me procedure in brief manner,How to create implicit fact column.Currently we have 10 dimensions.
So,Do I need to create individual implicit fact column for each dimension or one column is enough.
Please advice
Thanks,
SatyaB
Edited by: SatyaBodhanapu on Sep 29, 2011 1:16 AM
Maybe you are looking for
-
BW Experts, What is the way to find out in <b>SAP r/3</b>, A field is used is what Datasource. Say for example "SPBUP" (Fisc Period)....How to find out what all Data sources have this field? Thanks Ashwin
-
How do I add an Attachment to an E-mail letter ?
I have to send two images of my art work to a gallery owner using E-mail. I have put each of these images on my desktop because I was told that it would be easier to attach them to the E-mail. But I'm unable to attach them. Please tell me how to do i
-
W32TM reverting to old settings.
Hi all, I have an issue which is driving me crazy and thought I would reach out to the experts. I am trying to update the time sources on a few servers running 2008 SP2, however it continually reverts back. Scenario - Windows Server 2008 SP2 - Not jo
-
Business area and profit centre field to make mandatory in all transactions
Dear Team, My client wants to make the above mentioned fields mandatory while entering any business transactions. viz. MM,FI / SD transactions. He wants to capture the details Business area wise as well as Profit Centre wise. Please let me know wheth
-
Regarding user exit BAPI_TRANSACTION_COMMIT
I'm trying to use BAPI_TRANSACTION_COMMIT in customer exit but its dumping. please let me know how to commit a transaction in user exit through CMOd