Displaying Columns dynamically
Hi,
My reqiurement is to display n number of columns depending on the month entered
for example
if mar report should show 3 columns
if apr it should show four columns..etc...
How can we possibly hide and display the columns as per user entry.
Kindly provide useful pointers to the same.
Thanks & Regards,
Rathy
Hi,
Number of columns with the forecast values are to be from Forecast 1&2 till the month before the chosen selection. In order for us to calculate the variance, you should have 2 forecast values.
If March is chosen please show Forecast 1& 11, Forecast 2&10
If April is chosen please show Forecast 1& 11, Forecast 2&10, Forecast 3&9.
If November is chosen please show Forecast 1& 11, Forecast 2&10, Forecast 3&9, Forecast 4&8, Forecast 5&7
..Forecast 10&2.
Please guide how can this be achieved.
Regards,
Rathy
Similar Messages
-
How can i hide and display columns dynamically
Hi,
Is such a thing possible in BeX.?????
Following is the reqiurement.
Number of columns with the forecast values are to be from Forecast 1&2 till the month before the chosen selection. In order for us to calculate the variance, you should have 2 forecast values.
If March is chosen please show Forecast 1& 11, Forecast 2&10
If April is chosen please show Forecast 1& 11, Forecast 2&10, Forecast 3&9.
If November is chosen please show Forecast 1& 11, Forecast 2&10, Forecast 3&9, Forecast 4&8, Forecast 5&7 ..Forecast 10&2.
Please guide how can this be achieved.
Regards,
RathyHi,
well at least you can use some vba macros to achieve that. Best would be to have a static query embedded in a workbook and a sheet where the results are displayed as copies from the query via a macro.
regards
Siggi -
Change displayed columns dynamically
Hi,
I am new to this and am trying display differnt set of columns based on a value that is selected in the radio group. Please note that some columns are common for all selections. Any inputs on this will really help.
Thanks.
zuser761697 wrote:
I am new to thisNot that new: your first post was 8 months ago. Plenty of time to have read the FAQ and forum sticky threads to find out how to formulate a question effectively, and update your profile with a real handle instead of "user761697"?
You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB version and edition
<li>Web server architecture (EPG, OHS or APEX listener)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s)
With APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues.
trying display differnt set of columns based on a value that is selected in the radio group. Please note that some columns are common for all selections. Any inputs on this will really help."Set of columns" where? Standard report? Interactive report? Form? Tabular form?
Conditional rendering is likely to be of use. -
Need to display COlumn headers dynamically in ALG Grid
Hello,
I need to display column headers dynamically in alv grid Display with its corresponding value.
Column headers should be picked from a field in Final Internal table and its corresponding field will also need to pick from the same table.
T_final... Suppose Field STCTS - (To pick coulmn headers)
CCNGN - (To pick appropriate value for that column)
Can anybody explain me how i can pass these values to ALV Grid using
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = Y_I_FCAT
IMPORTING
EP_TABLE = DY_TABLE.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Any suggestions will be appreciated....
Regards,
KittuHi,
Go thru this link, and the code of Mr.Dev Parbutteea
Re: Probelm with Using Field Symbol in FM
thanks
Mahesh -
Is it possible to display only dynamically selected fields in the out put?
Is it possible to display only dynamically selected fields in the out put? i need to display set of columns in the selection criteria, but in the output i have display only input given fields. because i need to convert it into .csv file. So i have to display selected fields from internal table. In oracle they are using"execute immediate". is there any equivalent in SAP?
thanks in advance.Hi Remya,
Are you talking about dynamic programming in ABAP ?
If yes, there are concepts like RTTS which facilitates it.
Yes, the select query also supports dynamic selection of fields. ( Please care about ( ) in dynamic sql ).
Do more research on Field Symbols and statements like ASSIGN COMPONENT OF.
Regards,
Philip. -
How to create some columns dynamically in the report designer depending upon the input selection
Post Author: ekta
CA Forum: Crystal Reports
how to create some columns dynamically in the report designer depending upon the input selection
how export this dynamic report in (pdf , xls,doc and rtf format)
report format is as below:
Element Codes
1
16
14
11
19
10
2
3
Employee nos.
Employee Name
Normal
RDO
WC
Breveavement
LWOP
Sick
Carers leave
AL
O/T 1.5
O/T 2.0
Total Hours
000004
PHAN , Hanh Huynh
68.40
7.60
76.00
000010
I , Jungue
68.40
7.60
2.00
5.00
76.00
000022
GARFINKEL , Hersch
66.30
7.60
2.10
76.00
In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
Can anybody help me how do I design such report....
ThanksHi Developer life,
According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric values) in the details, add an filter to filter the data base on this column group, but if
the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
Similar threads with details steps for your reference:
https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings
If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
Any question, please feel free to let me know.
Best Regards
Vicky Liu -
Conditional display column in report
Hi,
If we have a single row report of 30 columns, and I want to display only the one with any values but null and hide the null ones, Is there a way to do it?
It's the same issue discussed in this thread conditional display column in report
thanks,
Fadi.Samara - I suspect there are a few ways to do this, but none obvious or very easy as far as I can see.
You can create dynamic SQL (as Arie and others have suggested) to only include the columns that are not null.
You can build and output the HTML directly to the page, choosing only to include the values that are not null.
You can create a set of conditions that you can apply to the report columns. A very crude example might be 30 hidden page items like 'SHOW_COL1' etc. (not great, I know), or perhaps you could set a hidden page item to a value like '01:02:03:'etc., with the number only being included if the value is not null (so that col3 being null gives you '01:02::04'etc.), so that the condition for each column is 'Text in expr 1 in contained in Item in expr 2', where expr 1 is '01' for column 1 etc.
Sorry, that is a very contrived example, but it's just to illustrate that there's generally a way of doing pretty much anything in APEX. You might create your item containing the comparison expression by requerying the data in this kind of way:
SELECT NVL2(column1, '01', '') || ':' || NVL2(column2, '02', '') || ':' etc.
FROM table
WHERE condition
However, wanting to create a single-row report with nulls hidden makes we wonder what you're actually trying to achieve and whether there's a better way? Could you use a series of page items, for example?
John. -
Multiple Models & Conditional Display in Dynamic Table.
Hi
There are 5 models pointing to different systems. The user will randomly select the system and accordingly the models will get executed.
My issue is in the second screen I need to populate a table which should display the data from multiple models at the same time.. I need to loop trough the models and check, the search term entered by the user, in which all system the same is present and accordingly I need to display in table...
Please help me by placing some sample code for looping in multiple output nodes and create table dynamically and display the data in the coloumn...Coloumn numbers are fixed.....
Regards
SUHi
I suggest to create a value node to show the results in a view.
and loop at all the model nodes and when match found create an new element for the table and add it to the table node.
This is the code to Create Table and its columns dynamically.
place the code in wdDoModifyView()
IWDTable <tableref> = (IWDTable) view.createElement(IWDTable.class,"<tablename>");
<tableref>.bindDataSource(wdContext.node<node>().getNodeInfo());
IWDTableColumn <colref> =(IWDTableColumn)view.createElement(IWDTableColumn.class,"F");
IWDInputField inf = (IWDInputField )view.createElement(IWDInputField.class,"d");
inf.bindValue(wdContext.node<node>().getNodeInfo().getAttribute("<attribute>"));
<colref>.setTableCellEditor(inf);
<tableref>.addGroupedColumn(<colref>);
IWDTransparentContainer <grp> =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
<grp>.addChild(<tableref>);
Regards
Abhimanyu L -
How to display dates dynamically in tabular form title
Hi,
I have a requirement of displaying dates of the week as title of each column heading in the tabular form dynamically (or) Is there a way to display the dates for each week as the titles for each column dynamically?Could anyone suggest me on this requirement?
Thanks & Regards,
Balaji.P.K.Hi Balaji,
if you want to be very generic than create a report based on a "PL/SQL Function returning SQL Query" and set the Report Column Headers to "PL/SQL" and specifiy a function returning the Header Titles.
brgds,
Peter
get Syntax Highlighting for the Application Builder: http://apex.oracle.com/pls/apex/f?p=APEX_DEVELOPER_ADDON:ABOUT:0:::::
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
BuilderPlugin: http://builderplugin.oracleapex.info
Work: http://www.click-click.at and http://www.wirsindapex.at -
Adding the columns dynamically in crystal report
Hi,
I am developing a application using asp.net and crystal report. In a report the column is created dynamically( ie, the report gets input from a sp which returns N no. of columns). Since i dont know the column name and no. of columns at design time i am not able to create the report. If any of you have any idea on adding the columns dynamically please send me the code or the link.
Thanks
SankarHello Sankar,
please see CS code for VS 2005 below to add a database field to a report using inproc RAS.
This sampels retrieves the table column name from the database and adds it to the report.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportAppServer.Controllers;
using CrystalDecisions.ReportAppServer.ClientDoc;
using CrystalDecisions.ReportAppServer.DataDefModel;
namespace CS_Add_Field_inproc
public partial class Form1 : Form
// CR Declarations
ReportDocument boReportDocument;
ISCDReportClientDocument boReportClientDocument;
CrystalDecisions.ReportAppServer.ReportDefModel.Section boSection;
CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject boFieldObject;
public Form1()
InitializeComponent();
//Create a new ReportDocument
boReportDocument = new ReportDocument();
// load the RPT file
boReportDocument.Load("..
AddField.rpt");
//Access the ReportClientDocument in the ReportDocument (EROM bridge)
boReportClientDocument = boReportDocument.ReportClientDocument;
//Get the first section in the details section
boSection = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[0];
//Create the field object that we will add to the report and set all of its properties
boFieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();
//Set which field to use for the data to be displayed
boFieldObject.DataSourceName = "{Customer.City}";
boFieldObject.FieldValueType = CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeStringField;
boFieldObject.Left = 4 * 1440; //1440 twips per inch
boFieldObject.Width = 3 * 1440;
boFieldObject.FontColor = new CrystalDecisions.ReportAppServer.ReportDefModel.FontColor();
boFieldObject.FontColor.Font.Name = "Arial";
boFieldObject.FontColor.Font.Size = 10;
boFieldObject.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentLeft;
//Add the object to the report
boReportClientDocument.ReportDefController.ReportObjectController.Add(boFieldObject, boSection, -1);
// show in reportviewer
crystalReportViewer1.ReportSource = boReportDocument;
private void button1_Click(object sender, EventArgs e)
//Get the first section in the details section
boSection = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[0];
//Create the field object that we will add to the report and set all of its properties
boFieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();
//Set which field to use for the data to be displayed
boFieldObject.DataSourceName = "{Customer.City}";
boFieldObject.FieldValueType = CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeStringField;
boFieldObject.Left = 4 * 1440; //1440 twips per inch
boFieldObject.Width = 3 * 1440;
boFieldObject.FontColor = new CrystalDecisions.ReportAppServer.ReportDefModel.FontColor();
boFieldObject.FontColor.Font.Name = "Arial";
boFieldObject.FontColor.Font.Size = 10;
boFieldObject.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentLeft;
//Add the object to the report
boReportClientDocument.ReportDefController.ReportObjectController.Add(boFieldObject, boSection, -1);
// show in reportviewer
crystalReportViewer1.ReportSource = boReportDocument; -
How to create table columns dynamically ?
Hi All,
I am working on an SSRS report that will show sales in the past 5 years. If the user selected to view sales of past 3 years he will only see 3 columns. so How can I create table columns dynamically at run time and how can I make sure that their dimensions
will adjust to fit the report page size.Hi Developer life,
According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric values) in the details, add an filter to filter the data base on this column group, but if
the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
Similar threads with details steps for your reference:
https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings
If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
Any question, please feel free to let me know.
Best Regards
Vicky Liu -
Sorting columns dynamically using Presentation Variables
Hi,
I have 4 measures say A,B,C,D , a period dimension and branch name dimension. I would like to select the measure in the prompt and the result should display rank for the selected measure using presentation variables. For eg: If measure-A is selected, the result should be arranged in order by based on "A".
Is it possible to sort the columns dynamically?
Kindly help me.
Regards,
RBHi RB,
You can do that, though it's a bit more complicated than a simple SQL statement. For example:
WITH BASEDATA AS (
SELECT
EMPNO,
ENAME,
MGR,
SAL,
COMM,
CASE WHEN :P4_SORT_ORDER = 1 THEN
ROW_NUMBER() OVER (ORDER BY UPPER(ENAME))
WHEN :P4_SORT_ORDER = 2 THEN
ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR))
WHEN :P4_SORT_ORDER = 3 THEN
ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR), UPPER(ENAME))
WHEN :P4_SORT_ORDER = 4 THEN
ROW_NUMBER() OVER (ORDER BY UPPER(ENAME) DESC)
WHEN :P4_SORT_ORDER = 5 THEN
ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR) DESC)
WHEN :P4_SORT_ORDER = 6 THEN
ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR) DESC, UPPER(ENAME) DESC)
END SORTITEM,
'O' STATUS
FROM
EMP
SELECT
EMPNO,
ENAME,
MGR,
SAL,
COMM
FROM
BASEDATA
ORDER BY
SORTITEMUsing a CASE statement this assigns a ROW_NUMBER to every record based on its ordering within the selected ORDER BY clause. The output is then sorted by this value.
Andy -
Is it possible to change nunmber of columns dynamically in table control
Is it possible to change number of columns dynamically in table control? if so how it could be done?
Thnaks in advance.
SounderYou can update the table control in your program, the table control is a structure of the type CXTAB_CONTROL of TYPE-POOLS cxtab.
There you can hide or display column the same way you do for fields in LOOP AT SCREEN. there you will ahve to LOOP AT <control>-COLS.
TYPE-POOL CXTAB .
TYPES:
BEGIN OF CXTAB_COLUMN,
SCREEN LIKE SCREEN, "Attributes struktur SCREEN
INDEX TYPE I, "Position of a column on the screen
SELECTED(1) TYPE C, "Indicator 'column selected'
VISLENGTH LIKE ICON-OLENG, "Visualised length of a column
INVISIBLE(1) TYPE C, "Indicator 'column invisible'
END OF CXTAB_COLUMN,
BEGIN OF CXTAB_CONTROL,
FIXED_COLS TYPE I, "Number of fixed columns
LINES TYPE I, "Number of lines to display
TOP_LINE TYPE I, "Top line during next PBO
CURRENT_LINE TYPE I, "Current line during LOOP/ENDLOOP
LEFT_COL TYPE I, "Fist scrollable column after fixed area
LINE_SEL_MODE TYPE I, "Line-selection : none(0), single(1),
COL_SEL_MODE TYPE I, "Column-selection: multiple(2)
LINE_SELECTOR(1) TYPE C, "Indicator: 'With line-selection col'
V_SCROLL(1) TYPE C, "not used
H_GRID(1) TYPE C, "Indicator: 'Horizontal grid-lines'
V_GRID(1) TYPE C, "Indicator: 'Vertikal grid-lines'
COLS TYPE STANDARD TABLE OF CXTAB_COLUMN
WITH NON-UNIQUE DEFAULT KEY,
INVISIBLE(1) TYPE C,
END OF CXTAB_CONTROL,
Regards -
Displaying multiple dynamic html pages within a single Portal folder.
Hi all,
Question: How can I display multiple dynamic html pages that are linked to each other, within a single portal folder?
History:
I have a designer/web server application (PL/SQL packakges) on Oracle
8.1.7. Early in the development process we built it into WebDB2.2 and
used folders on the left side as a navigation bar and the contents of my packages on the right side. This was easy, WebDB used Frames.
Unfortunatley I could never automatically display a PL/SQL item in the folder area.
Now I need to integrate the application into Portal 3.0 not the early adopters version, the one with 9iAS (NT for now, Unix later). I have a page/content area divided into regions and a navigation portlet on the left side containing links to PL/SQL folders whose contents are displayed on the right side. On the right side I have (for example) a Queryview. When I click on any of the buttons (i.e. Find, New), I land in a new page outside of my portal folder. This page contains a dynamically built list (from one or more DB Tables) and of course the first column contains a list of links that bring you to the individual item. How do I set my links or configure my folder to display
within the portal folder area?Hi,
One alternate is, increase the size of your screen, for this go to the layout of your screen and increase it as much you want, and also the custom container size, so that no scroll bar will appear at least.
Other solution would be, as you said ALVs will be dynamical, it will be good to create buttons, or links on the screen based on the no of ALVs dynamically and on click of corresponding button call the corresponding ALV.
But i dont think this will serve, first check the first option.
Hope this helps u.,
Thanks & Regards,
Kiran. -
How to display a dynamic image file from url?
Hey,I want to display a dynamic image file from url in applet.For example,a jpg file which from one video camera server,store one frame pictur for ever.My java file looks like here:
//PlayJpg.java:
import java.awt.*;
import java.applet.*;
import java.net.*;
public class PlayJpg extends Applet implements Runnable {
public static void main(String args[]) {
Frame F=new Frame("My Applet/Application Window");
F.setSize(480, 240);
PlayJpg A = new PlayJpg();
F.add(A);
A.start(); // Web browser calls start() automatically
// A.init(); - we skip calling it this time
// because it contains only Applet specific tasks.
F.setVisible(true);
Thread count = null;
String urlStr = null;
int sleepTime = 0;
Image image = null;
// called only for an applet - unless called explicitely by an appliaction
public void init() {
sleepTime = Integer.parseInt(getParameter("refreshTime"));
urlStr = getParameter("jpgFile");
// called only for an applet - unless called explicitely by an appliaction
public void start() {
count=(new Thread(this));
count.start();
// called only for applet when the browser leaves the web page
public void stop() {
count=null;
public void paint(Graphics g) {
try{
URL location=new URL(urlStr);
image = getToolkit().getImage(location);
}catch (MalformedURLException mue) {
showStatus (mue.toString());
}catch(Exception e){
System.out.println("Sorry. System Caught Exception in paint().");
System.out.println("e.getMessage():" + e.getMessage());
System.out.println("e.toString():" + e.toString());
System.out.println("e.printStackTrace():" );
e.printStackTrace();
if (image!=null) g.drawImage(image,1,1,320,240,this);
// called each time the display needs to be repainted
public void run() {
while (count==Thread.currentThread()) {
try {
Thread.currentThread().sleep(sleepTime*1000);
} catch(Exception e) {}
repaint(); // forces update of the screen
// end of PlayJpg.java
My Html file looks like here:
<html>
<applet code="PlayJpg.class" width=320 height=240>
<param name=jpgFile value="http://Localhost/playjpg/snapshot0.jpg">
<param name=refreshTime value="1">
</applet>
</html>
I only get the first frame picture for ever by my html.But the jpg file is dynamic.
Why?
Can you help me?
Thanks.
JoeHi,
Add this line inside your run() method, right before your call to repaint():
if (image != null) {image.flush();}Hope this helps,
Kurt.
Maybe you are looking for
-
IMAC is freezing and shutting down without explanation
My IMAC is freezing and shutting down without explanation . Any thoughts or suggestions? Could this mean the motherboard is about to die? I have considered erasing the hard drive and reloading, but I'm unsure if that will help i.e. if I back up my
-
Kind of hard to word the problem in a non-confusing way, but here goes. After Effects CS6 and CC will only work if the Composition panel is in its default spot in the Standard workspace, and that it's the only thing displayed there. No layer or foota
-
WRT54G Wireless G Router and PS3
Hi there, I am a proud owner of the above mentioned items. The reason why I am posting this is that when I am playing on the PlayStation 3 and one of my other family members are on a hardwired computer, the hardwired computer I believe looses it's co
-
Is there a downloadable PDF of the Flash (Or and other application) help files? If so where can I get them? Thank you, R.
-
Error-page problem with Tomcat 5.0.24
I want to display an error page in case any exception is thrown by my JSF application. I configure the error page in the web.xml and run the application on Tomcat 5.0.24. When an error really happens while loading a jsf-page A the error page is not d