Dynamic add column in Bex report
Hi all,
we have input parameter is month wise. For example if i have input 12.2011 - 03.2012
Output:
12.2011--01.2012--02.2012-----04.2012
50kg -
70--90--
54
Like above dynamically have to change column based on month input parameter. Please guide me how to design bex query.
Thanks
Saravanan
hi,
restrict calmonth with variable type manual input, and put this calmonth in columns on top of amount or quantity. It will give you your desired output.
hope this helps,
regards,
ray
Edited by: ray100 on Mar 9, 2012 2:54 PM
Similar Messages
-
Dynamic comparison column in Bex report
Hi Gurus
I have the following request, could any of you kindly help me out?
Content example in Cube:
GL Act| Fiscyear| Fiscper3| Amount
10001 |2004 |12 |100
Report: Cross-year comparison determined by period
Specifying fiscyear and period range is enabled as user-input, e.g. choose year 2003 to 2005 and period 01 to 03
The following layout is our target:
header: period 01-03
GL Act| Y2003| Var2003-2004| Y2004| Var2004-2005| Y2005
10001 | 100 | 200 | 300 | -100 | 200
10002 | 300 | 500 | 800 | 200 |1000
I think the point is to achieve the "variance" column which is dynamically determined by fiscyear where user inputs, since restricted key figure cannot achieve the "dynamic" solution.
Thanks in advance!Hi Eric,
My approach is somewhat not flexibible but it may suit your needs.
Will try to describe it in more details.
Lets assume that this periods contain full information: a year and a period within a year and that there are 12 periods in the year. A user enters a a range of periods P1 P2 (lets say of 2005) and wants to compare some KF for the given time period with that for 2004, 2003 and calculate difference between periods.
Solution:
Create two for P1 and P2. All vars are user entry ones. If P1 is always the first period in the year then P1 might be determined in the user exit.
Create a structure in rows.
New selection. Name it as Y2003. Put here your KF and Fiscal year/period. Restrict it with P1 24, P2 24.
New selection. Name it as Y2004. Put here your KF and Fiscal year/period. Restrict it with P1 12, P2 12.
New selection. Name it as Y2005. Put here your KF and Fiscal year/period. Restrict it with P1, P2.
New formula for Var2003-2004. Place into formula Y2004 - Y2003.
New formula for Var2004-2005. Place into formula Y2005 - Y2005.
Regardless of selections names this query will show values for given periods of 3 years: entered, year before entered and entered -2.
Best regards,
Eugene -
How to add filter in Bex report
hi how to add filter in BEx report and what is the difference between filter and free charcteristics.
Regards,
Viren.Hi Viren,
difference between filter and free characteristics is that free characteristics can be added to drilldown at query runtime. Filter values can not be changed at query runtime.
You can add a filter to a query by placing a characteristic in filter section and restrict the characteristic to certain values. Characteristics in rows / columns / free characteristics section can be restricted to certain values, too.
Best regards,
Björn -
Concatenate out put of 2 or more columns in BEX Report in to one column
Hi,
I am working on service order report in BEX, and i would like to Concatenate out put of 2 or more columns in BEX Report in to one column.
Please share me if any scenarios.
Thank
NeniHi Ashutosh,
Thanks for your reply,
Actually in my report 4 different columns belongs to service orders information from different departments, i want see all 4 columns information in to single column, those four are virtual characteristics.
As per your solution concatenate in workbook using function, can you please give me the steps how to do that.
Thanks for your help.
Thanks
Neni. -
Add Columns to Updatable Report
Hello,
i need some help regarding an "Updatable Report".
My goal is to have some SelectLists in comluns named "2008_05", "2008_08", ....."2010_01", "2010_04".
The user must have the option to add more cloumns.
My process on submit is:
declare
SQL_STRING varchar2(4000);
begin
SQL_STRING := 'ALTER TABLE TAB_REPORTS ADD "' || :P3700_COLUMN_NAME || '" varchar2(100)';
EXECUTE IMMEDIATE(SQL_STRING);
return;
end;At the moment I have this code for a standard report returning a SQL query:
declare
q varchar2(4000);
begin
q := 'SELECT R_ID, PLANT_NAME, UNIT_NO, R_TSO_NO TSO_NO';
For i in (SELECT * FROM USER_TAB_COLUMNS
WHERE table_name = 'TAB_REPORTS'
AND column_name like '2%')
loop
q := q || ', ';
q := q || 'APEX_ITEM.SELECT_LIST_FROM_LOV (1, ';
q := q || chr(34);
q := q || i.column_name;
q := q || chr(34);
q := q || ', ';
q := q || chr(39);
q := q || 'LOV_QER';
q := q || chr(39);
q := q || ', ';
q := q || 'null';
q := q || ', ';
q := q || chr(39);
q := q || 'Y';
q := q || chr(39);
q := q || ') as "';
q := q || i.column_name;
q := q || '"';
end loop;
q := q || ' FROM TAB_REPORTS ';
q := q || ', TAB_SD';
q := q || ', TAB_CONTACT';
q := q || ' WHERE TSO_NO = R_TSO_NO';
q := q || ' AND CON_PLANT_NAME = TAB_SD.PLANT_NAME';
q := q || ' AND R_TSO_NO = decode(:P3700_FILTER_PLANT_NAME, ';
q := q || chr(39);
q := q || 'all';
q := q || chr(39);
q := q || ', R_TSO_NO, :P3700_FILTER_PLANT_NAME)';
q := q || ' ORDER by PLANT_NAME, UNIT_NO';
return q;
END;The function returning a SQL is not working for an updatable report.
It has to be static i think.
Any solutions or ideas?
Thx & greetings
ChrisProblem solved. See [this post|Add columns to CV04N report;
Regards.
Gregory. -
HOW TO FIX COLUMN IN BEX REPORT
Hello Gurus,
I have created BEX report in which user want 1st two column (Material and its describtion) to be fixed as if he want to check all relavent result related to Material the first 2 column should not be move it should be fixed and rest other results and other column should move,Hi Wajid,
The VBA code i gave earlier will do this automatically for your users. Please use it. It freezest columns A and B so that columns A and B dont move even if your users scroll to the right. It just stays there.
In your workbook after you have inserted your query, go to Tools->Macro->Visual Basic Editor. Then go to Insert Menu->Module. Double click the module that have been created (probable name is Module1) and then on the code editor paste this code:
Public Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
Range("C1").Select
ActiveWindow.FreezePanes = True
End Sub
Everytime the users refresh your query it will freeze the first to columns. So at least you are sure that the columns A and B are frozen. -
OIM report / add column to working report
Hi,
I need some help with OIM reports.
Cannot add a column to a working report. What I have done is that I have changed the Stored procedure and then changed the Report XML Metadata to include that column.
The report just turns out to be blank after the changes made.
A snippet of the change to the Stored Procedure(added line in bold):
-- contruct the query
strColumnList := ' tusracc.system as "SYSTEM", ' ||
' vifs.ifsemp_employee_id as "EMP_ID", ' ||
' vusr.usr_first_name || '' '' || vusr.usr_last_name as "EMP_NAME", ' ||
*' vusr.usr_status as "USR_STATUS", ' ||*
' tusracc.attribute as "ATTRIBUTE", ' ||
' tusracc.attrvalue1 as "ATTRVALUE" ';
strFromClause := ' v_users vusr, v_ifsusers vifs, tmp_user_access tusracc ';
strWhereClause := ' tusracc.usr_key = vusr.usr_key ';
strWhereClause := strWhereClause || ' and vusr.usr_key=vifs.usr_key(+)';
IF strsortcolumn_in IS NULL THEN
strOrderByClause := ' 2 ' ;
ELSE
strOrderByClause := strsortcolumn_in ;
END IF;
IF strsortorder_in = 'DESC' THEN
intSortDirection_in := 0;
ELSE
intSortDirection_in := 1;
END IF;
-- run the report query
XL_SPG_GetPagingSql(strColumnList,
strFromClause,
strWhereClause,
strOrderByClause,
intSortDirection_in,
intStartRow_in,
intPageSize_in,
select_stmt
OPEN csrresultset_inout FOR select_stmt;
ELSIF intdocount_in = 2 THEN
OPEN csrresultset_inout FOR select dummy from dual;
END IF;
In the report XML Metadata I have added a line for the USR_STATUS column(change in bold):
<Report layout="Tabular">
<StoredProcedure>
<InputParameters>
<InputParameter name="v_resource_name" parameterType="varchar2" order="1" fieldType="LookupField" fieldLabel="report.ResourceAccessList.label.resourceName" required="true">
<ValidValues lookupCode="Lookup.Reports.Objects"/>
</InputParameter>
</InputParameters>
</StoredProcedure>
<ReturnColumns>
<ReturnColumn name="SYSTEM" label="customer.report.system" display="true" position="SectionHeader" primarySort="true" filterColumn="false" />
<ReturnColumn name="EMP_ID" label="customer.report.emp_id" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
<ReturnColumn name="EMP_NAME" label="customer.report.emp_name" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
*<ReturnColumn name="USR_STATUS" label="global.label.Status" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />*
<ReturnColumn name="ATTRIBUTE" label="customer.report.attribute" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
<ReturnColumn name="ATTRVALUE" label="customer.report.value" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
</ReturnColumns>
</Report>
Anything that I have missed to do? We have restarted the app server, but it still doesn't work.
Regards,
ThomasArghle.....
I found the reason for the blank result page with this...
apparently we are not allowed to name a resulting column in a stored procedure to USR_STATUS, silent fail :/
When I renamed this to EMP_STATUS it all works as intended...
Duh!
I wonder in where it says not to do this... -
Dynamically selecting column names in report builder ???
Dear members,
I have a requirement in which the user dynamically selects the tables column names. Like suppose take DEPT table. My query would be
select &P Report from dept;
so if the user selects DNAME then i would get the dname values and so on... This is fine but if one gives the value for the lexical parameter as DEPTNO,DNAME then i should get two columns in my report output. The select statement then becomes
select DEPTNO,DNAME Report from dept;
But i am not able to do this in report builder(6i). If i use just one value for the parameter then i get the o/p but if i use more than one (eg: DEPTNO,DNAME) then its giving an error.when i run this query through toad or sql plus then i am getting the desired o/p but wher as in report builder i am not able to get the o/p.
My report triggers are :
Before Parameter form :
:P := NULL;
After parameter Form :
function AfterPForm return boolean is
begin
IF :P = 'DNAME,DEPTNO' THEN
:P := ' DNAME,DEPTNO ' ;
ELSE
:P := NULL;
END IF;
return (TRUE);
end;
Your comments and suggestions are welcomed.
thanks
regards
sandeepNumber of columns can not be changed at run time. If your data model has three columns, lexical parameter should pass 3 values. If you have query like this in data model:
select &p_1 from table
Whatevere you have as initial value in user parameter p_1, data model captures that info. -
Hi Guys,
How to add logo in a Bex report.Hi ABDUL KHADAR
We can only add the logo at Work book level but not the query level @the query
level it wont allow us to add.
Jus open an ordinary excel sheet format it as you wish Ctrl+A and fill with white
color .Then jus save u r logo which u wont to upload in the desktop.
Then go to file insert picture or file and place it wher ever u wont in the work sheet
and save it as a templete and then insert the query in this templete and format it
as per your standarads.
If any struck up feel free to let me know. We explain you clearly...
hope its helpful..
Cheers
R M K
**Assigning poitz ez da only way of saying thankz in SDN** -
Hi folks,
Plz tell me if u know how can i add column dynamically
in oracle content management SDK webstarterapp.I am stucked here for quite sometimes.plz tell me ASAP.
Regards
PrasenjitTake a look at:
http://download-east.oracle.com/docs/html/B12187_02/toc.htm
You should use OMBALTER TABLE command.
Regards,
Marcos -
Dynamically assign column heading to Report columns
I need to assign values to column headings of various Report Columns of my Report region based on current value of one of my application items. How can I do it?
Never mind, there was another post like this. Duplicate. Just in case someone is looking for the answer, here is what worked for me:
Assume the Application item is called app_item_My_dynamic_head_col1.
Add a page computation before the page loads to set the value of the application item based on whatever condition.
Edit the report column.
In place of hard coded column heading "Project Name" (that was my column heading), replace it with
&app_item_My_dynamic_head_col1.
The key here is the period after &app_item_My_dynamic_head_col1.
As the page loads, the column heading will be value of the app_item_My_dynamic_head_col1 (as assigned by the computation). -
Dynamic add column to datatable
Hi ,
How can I add columns to datatable dynamically ? I don't know how many columns will be selected.
Actually I don't know how to do it in the jsp file. There is columns tag in it. Is there any tag like 'for' ?
Thanks in advance.
Wilsonthanks for that but still cannot figure out what is wrong with my code (I'm really getting crazy !). I can see the titles of the columns but I cannot see any data. Any ideas ?
<h:dataTable styleClass="dataTable" id="tablecsv"
binding="#{mainPage.dataTable}" rendered="#{mainPage.completed}"
value="#{mainPage.resultsModel}" var="varresultsModel" />
public UIData getDataTable()
FacesContext context = FacesContext.getCurrentInstance();
String[] cols = getTheTable();
List children = dataTable.getChildren();
children.clear();
dataTable.setVar("vartableRow");
for (int i = 0; i < cols.length; i++)
UIColumn col = new UIColumn();
col.setId("column" + i); //?
UIOutput out = new UIOutput(); //?
out.setId(cols[i] + i); //?
/* children.add(col);
HtmlOutputText header = new HtmlOutputText();
String label = "" + cols;
header.setValue(label);
col.setHeader(header);
HtmlOutputText data = new HtmlOutputText();
col.getChildren().add(data);
data.setValueBinding("value", context.getApplication().createValueBinding("#{" + (i +1) + "}"));
HtmlOutputText header = new HtmlOutputText();
String label = "" + cols[i];
header.setValue(label);
col.setHeader(header);
ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{result." + cols[i] + "}");
out.setValueBinding("value", vb);
col.getChildren().add(out);
dataTable.getChildren().add(col);
this.completed = true;
return this.dataTable;
public ArrayList getResultsModel()
this.resultsModel = new ArrayList();
for (int n = 0; n < getTheTable().size() - 1; n++)
this.resultsModel.add(new Integer(n));
return this.resultsModel; -
How can I delete/add Columns in my Report?
Hi everybody,
i´ve just a silly little question...
We´re using APEX to revise our Daily Reject-Rows and some other Dimensiontables.
For every Table, witch is to revise we´ve got a single Page in our APEX Application.
Also, in every Page we created a Report for our users,
so that they can revise the Data,
and published it in our intranet, using a Webserver.
Now my Question...
In one of these Pages we´ve more then 110 columns in the sql Region Source,
placed in the Region Definition.
But...in the Report Attributes, there are only shown 99 Columns.
I must integrate 3 or 4 more Columns from my Source Definitioned Table in the Report.
Where can i do this?
I only see how i can edit the columns, make them visible or hide them,
define their Propertys...but where can i add a new Column?
or delete one?
I´m very thankfull for every Awnswer :-)
Best Regards
LoneWolfOk, i found a Solution...
It seems to be a BUG. (?)
The Report Attributes will be realy generated automaticly
under using the Source Definition, but...
- There´s a Restriction in the Sum of all Columns,
it can be only 99 witch will be able to define and revise.
- If you´ver got more then 99 Columns in your Source
you have to specified them exactly, by Name
...AND...
- you have to create the Source SQL new.
It is not sufficiently if you change the Position of the Columns in the SQL Source (placed at the Region Definition).
I copied and pasted the Source SQL three Times,
before APEX accept the changes of the Position from the Columns.
At least...
In the Moment as i define the needed Column,
(now in the Report Attribute available),
APEX understands it an i can put the others Columns (Columns 99 till 110) back in the Source SQL, without loosing my needed Column in my Report again. -
Hi Experts
I have a requirement where i need to populate result columns based on user input.
for Example if user inputs Fiscal year period as 001.2010,002.2010,003.2010 then report should have 3 columns based on inputs and display value of pertucular keyfigure for that perticular fiscal period.
youser may input multiple fiscal periods here.
Is it possible to do this?
Regards
SudeepHi
when i drag fiscper in columns i see only 1 column and agreegated values for all inputs entered by user.
Regards
Sudeep -
Add Column Delete in report, How to delete row using this delete Option
Hi Friends,
i have a report ,iwant to add an option DELETE in last column.When i click on DElete then respective id sholund be deleted.
My Table Is
CREATE TABLE "DUMY_FILE"
( "ID" NUMBER,
"NAME" VARCHAR2(500),
"FILE_OBJ_ID" NUMBER,
"MIME_TYPE" CLOB,
"DOC_SIZE" NUMBER,
"BLOB_CONTENT" BLOB,
"DESCRIPTION" VARCHAR2(500),
"UPLOAD_DATE" CHAR(25)
How can i do this.
Thanks
Edited by: 805629 on Nov 16, 2010 11:51 PMTrent,
Thanks for you suggestions. .. Let me explain my problem a little better ...
I have a report that lists fields associated with a report ... I have a delete icon which deletes a row and removes it from the underlying table ... however, I am trying to implement a Before header process which runs a pl/sql process that checks if the selected field is the last field in the report ... if so, I want a confirmation dialog to pop up ... if they click cancel .. then the deletion is aborted, else the field is deleted (which triggers other status changes).
Based on this logic if there is a way to implement this based on your suggestion I would appreciate it ...
Here is the process I was trying to use .... but the I have a few issues with this approach
declare
-- cursor to check if this is the last field
cursor fld_cnt is
select count(*) from prm_ptnr_rpt_fields
where report_uid = :P22_REPORT_UID;
num_flds number;
msg varchar2(300);
begin
open fld_cnt;
fetch fld_cnt into num_flds;
If num_flds > 1 then
delete from prm_ptnr_rpt_fields
where report_uid = :P22_REPORT_UID
and field_user_key = :P9_DELETED_FLD;
commit;
:P9_DELETED_FLD := NULL;
msg := :P9_FIELD_NAME || ' Field Excluded From Report' ;
apex_application.g_print_success_message := msg;
else
htp.p('<script type="text/javascript">');
htp.p('
var r=confirm("This is the last field included in this report .. \n Deleting it will Inactivate the report and remove it from schedule (if scheduled) ...\n Do you want to proceed?");
if (r==true)
{ delete from prm_ptnr_rpt_fields
where report_uid = :P22_REPORT_UID
and field_user_key = :P9_DELETED_FLD;
:P9_DELETED_FLD := NULL;
commit;
msg := :P9_FIELD_NAME || ' Field Excluded From Report' ;
update prm_ptnr_rpts
set report_status = 'INCOMPLETE',
active_report = 'N'
where report_uid = :P22_REPORT_UID;
msg := msg || ' and Report Status changed to INCOMPLETE';
apex_application.g_print_success_message := msg;
htp.p('}else {
alert("Delete Action Aborted");
htp.p('</script>');
End if;
Close fld_cnt;
end;
a) Even if I click cancel ... the field still gets deleted ...
b) :P9_DELETED_FLD is the id for the selected field ... I am setting it on the link attributes which places it on the URL ... I would rather user javascript (but not exactly sure how).
Thanks,
Gerald
Edited by: user5459177 on Feb 22, 2011 2:45 PM
Maybe you are looking for
-
Help.define purchasing options
hello gys; in EBS r12.1.1 I want define purchasing options but not open the web page,cause this error.. the profle is fine. Error Page Exception Details. oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during
-
Deleted items showup in custom search
We are using custom search portlet for search functionality on our site. The problem is, items that were deleted from a page in the past are also showing up in search results. And when we click on the item in search result, it throws page not found e
-
Error in ODS activation : URGENT
Hi ! <b>ODS object 0FIAP_O03 was built incorrectly. Cannot update request REQU_CAZ1PIIRCEYV2WX9Z3H7MIZBU</b> <i><b>Diagnosis The data request was a delta update, meaning, the data basis in the source system has not changed since the last upda
-
Can any one tell me if and how you can play video's from the internet on the 6300. Do you need a flash player or something?
-
In the Add-ons Manager when I click on Extensions, the Extensions window is empty. How can I get my Extensions to show up in the Extensions window in the Add-ons Manager?