Problem with dynamic columns in smartforms.
Dear SDN Experts,
I have a requirement in smartforms for dynamic columns.
i have used template with 10 columns, So from these 10 columns,Columns may vary monthly MIN 2 to MAX 10 depending on
readings with them for that month.
i cannot fix column headings also,Because headings also changes dynamically.
So Problem is if there is no data in columns,Columns is displayng empty.
For EX: In this month i have 2 columns data remaining all columns is displaying empty boxes.
Please suggest me a solution is this posible in smartforms if i use table also.
<removed by moderator>
Regrds,
MNR
Edited by: Thomas Zloch on Sep 11, 2011 3:50 PM
Hi friend,
See the link below it is having the solution of hiding the columns in smart forms
Hide table columns in smart form?
Create a table to display your values with 12 col and hide the columns based on the idea provided in the link above.
I think this will solve your issue if you still have queries please revert back to me i will help you.
Thanks,
Sri Hari
Similar Messages
-
Problem with dynamic column in SBWP
Hi Friends,
In SWL1 I have created two attributes with header as "CANCELLED" and " DESCRIPTION" for a particular task.But my SBWP is still showing columns as "Dynamic column" for the workitems of that task.
Please help me on this.
Thanks.
DilipHi Dilip,
The column headings will only appear in the task-specific view. In other words, by default the headers will be generic because you can have mixed tasks in the worklist, and column 1 can be a date for one task and a company name for another.
The user needs to expand the tree on the left hand side and navigate to the "Approve Purchase Order" (or whatever) node to show only items of that task, then column headers should show up.
Regards,
Mike -
Problem with dynamic columns in the BEx report
Hi Gurus,
I am tryging to build some planning application using BI-IP and input ready queries.
I'm facing issues with making the columns in the query 'dynamic'. The example is given below: -
Lets say there are states and cities for which we have to plan sales volumes. Depending on the value I choose for 'State' it should create as many columns for 'Cities' as per the hierarchy of the cities.
Lets say if I choose Maharashtra then the report shud look like :-
State-> Maharashtra
Rows Column1 Column2 Column3
GL Account Mumbai/0quantity Pune/0quantity Aurangabad/ 0quantity
1000000 1000 1500 1200
State--> Karnatka
Rows Column1 Column2
GL account Bangalore Mangalore
1000000
Any idea how this can be achieved?
Best Regards,
SSCHi friend,
See the link below it is having the solution of hiding the columns in smart forms
Hide table columns in smart form?
Create a table to display your values with 12 col and hide the columns based on the idea provided in the link above.
I think this will solve your issue if you still have queries please revert back to me i will help you.
Thanks,
Sri Hari -
Problem with checkbox column in matrix
Hello.
I have a little problem with checkbox column in matrix.
Column is binded to the UserData.
It has ValOn="Y", ValOff="N".
I use C++. It is wird problem. In matrix I have 10 columns - scrollbar role and if You want see checkbox column, You must role to the right. If this column is on the screen, and I use:
checkcell->PutChecked(VARIANT_TRUE);
then the checkbox is cheched, and if the checkbox isn`t on the screen and I use this comment - it nothing happening.
I tried to use ValOn="Y", PutChecked...
The problem i solved if the column is on the screen - if the column is first in matrix or second, but if it`s last I have a big problem.
My column with checkbox is not editable, but I tried to make it editable, check it, and then make it uneditable - the same efect.
How can I solve it ?
Sorry for my english.
Kamil WydraHello Kamil,
I am not sure about your problem, but here is an example of how to use checkbox in UI API.
First, create the matrix with checkbox column in Screen painter, and the output is an xml file, like this. Type as 121 indicates that it is a check box.
- <column AffectsFormMode="0" backcolor="-1" description="" disp_desc="0" editable="0" right_just="0" title="Rented" type="121" uid="Rented" val_off="N" val_on="Y" visible="1" width="41">
<databind alias="U_RENTED" databound="1" table="@VIDS" />
<ExtendedObject />
Second, bind the column to table from DB. This is a bug of 2004 Screen Painter, so if you are using 2005 Screen Painter, there is no problem.
Third, when you open the form, you can check and uncheck the cell.
BTW, please set the editable of the column to true.
Hope this helps,
Nick -
Importing From Flat File with Dynamic Columns
HI
I am using ssis 2008,i have folder in which I have Four(4) “.txt” files each file will have 2 columns(ID, NAME). I loaded 4
files in one destination, but today I receive one more “.txt” file here we have 3 columns (ID, NAME, JOB) how can I get a message new column will receive in source. And how can I create in extra column in my destination table dynamically …please help meHi Sasidhar,
You need a Script Task to read the names and number of columns in the first row of the flat file each time and store it in a variable, then create a staging table dynamically based on this variable and modify the destination table definition if one ore more
new columns need to be added, and then use the staging table to load the destination table. I am afraid there is no available working script for your scenario, and you need some .NET coding experience to achieve your goal. Here is an example you can refer
to:
http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/
Regards,
Mike Yin
TechNet Community Support -
WebRowSet Problem with database columns defined as TEXT??
Hello,
Can somebody help me on this subject. (http://forum.java.sun.com/thread.jspa?forumID=31&threadID=778586)
I have the same problem with TEXT column when I try to populate the WebRowset.
Thanks,
StephaneOK,
I change my postgresql driver for the lastest version (postgresql-8.2-506.jdbc3.jar) for JVM 1.5 and it's find...
This driver support the javax.sql.
St�phane
Edited by: Borealis on Oct 15, 2007 12:43 PM -
Creating Query with dynamic columns to show results
Hi experts,
I need to know how to create a query with dynamic columns. Meaning, I don't want to create a query with fixed columns representing the 12 periods of the fiscal year to show me actuals as the fiscal year proceeds.
For example, if I am currently in the middle of period 3 (March) of a fiscal year, when I execute the query, I need it to automatically only show me the 'Actuals' for periods 1 and 2, without seeing the columns from periods 3 to 12 showing blank.
Then when I am in the middle period 5 (May) the query should ONLY show me the columns for periods 1 to 4 'Actuals', no results should be shown for periods 5 to 12 yet, and I don't want to even see blank columns for period 6 to 12.
How do I define my columns, to achieve this.
Maximum points will be awarded.
Thanks Everyone.Hi Josh,
I'm having a little difficuluty understanding what should be included in my restricted key figures.
The time characteristics that I have available to use are:
0FISCPER3 (posting period)
0FISCYEAR (fiscal year), currently using SAP EXIT to default current fiscal year.
0FISCVARNT (fiscal year variant).
In addition, I have the following characteristics available to be used in the columns:
Value type (10)
version (currently I'm using variable for it)
Currency type (020)
Currency (USD).
Can you explain what my restricted key figure should be based on and how it should look.
I tried to create a restircted key figure using 0AMOUNT, and 0FISCPER3. For 0FISCPER3 I created a range from 1 to previous period (using SAP EXIT that supplied previous period).I also had value type, version, currency type, and currency included in that restricted key figure.Then when I tried to drag 0FISCPER3 under the restricted key figure once again, it wouldn't let me, probably because I've already used 0FISCPER3 in the restricted key figure.
Please let me know if my explanation is not clear.
Your step by step help would be great.
Thanks
Edited by: Ehab Mansour on Sep 23, 2008 2:40 PM -
DataTable with dynamic columns
Does somebody have an example of how to code a h:dataTable with dynamic columns? I have seen hints about how to do it in these two articles:
http://forum.java.sun.com/thread.jspa?forumID=427&threadID=5218508
http://forum.java.sun.com/thread.jspa?threadID=577589&messageID=2909047
but a complete working example would be really helpful.
I think the key is understanding the "binding" parameter to h:dataTable but I'm having a hard time understanding it. Thanks.I found it here:
http://balusc.blogspot.com/2006/06/using-datatables.html#PopulateDatatable -
Logic to upload file with dynamic columns
hi
in my requirement i hav given to add logic to upload file with dynamic columns so that this upload program can be reused.
this way the program is flexible, irrespective of the number of columns in the file.
can any one explain this?
and let me know what actually i hav to do.Check the program and the dynamic column is in the col_pos internal table and in the routines get_structure onwards.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/scm/dynamic%2bstructures%2band%2bcomponents
cheers
Aveek -
Difficult to achive the report layout with dynamic column names
I have a report layout as below.
So here the column names are dynamic.And each fixed row group has different calculations. I have a date parameter. If I select July 2013, then I need to show data from July 2012 to July 2013 with Columns(Jul-12, Aug-12...Jul-13). How to achive below layout
with dynamic columns?Hi Sarayu_CM,
According to your description, you want to filter the records of prior year based on only one parameter selection. Right?
In this scenario, we can create two parameters. The first one is for user to select. The second parameter is based on the first parameter selection. We don't need to specify Available Values for the second parameter, but we should use expression to specify
Default Values based on the first parameter selection. Use the expression below:
=DateAdd("m",-12,FormatDateTime(Parameters!param1.Value))
Then we just need to apply a filter on the matrix/dataset to get the records which the date is between values in these two parameters.
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
After Effects won't close/Problems with dynamic links
When I quit After Effects the icon still shows up and it says that it is still open, even force quit will not work. Also having problems with dynamically linked files between after effects and Premiere pro. Rendering in Premiere doesn't work unless I go to AE, save the project, then go back to Premiere. I have OSX Mavericks 10.9.2, a late 2012 mac pro, and AE CC 12.2.1.5
Kevin: would appreciate further thoughts on this.
I am using Pr2014, version 8.0.0 I am using AE2014, version 13.0.2.3. When I was on earlier versions of each, I had no problem importing AE comps into Pr. I'd choose import in Pr, then select the AE project, then select the comp. But with my new and improved versions of AE and Pr, I keep getting "importer reported a generic error."
I also tried to go the other way. I selected in Pr the clips I wanted to work on in AE, and then tried "replace with AE comp" but got the "generic error" message again..
Finally, I attempted to create a Dynamic Link from Pr via the File menu, but with each of the options from there, I got "failed to connect to AE Dynamic Link"
Any advice you can share, would be most welcome. -
Problem with dynamic LOV and function
Hello all!
I'm having a problem with a dynamic lov in APEX 3.0.1.00.08. Hope you can help me!
I have Report and Form application. On the Form page i have a Page Item (Popup Key LOV (Displays description, returns key value)).
When i submit the sql code in the 'List of vaules defention' box. I get the following message;
1 error has occurred
LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
When i excecute the code below in TOAD or in the SQL Workshop it returns the values i want to see. But somehow APEX doesn't like the sql....
SELECT REC_OMSCHRIJVING d, REC_DNS_ID r FROM
TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
returns_dns_lov_fn is a function, code is below;
CREATE OR REPLACE FUNCTION DRSSYS.return_dns_lov_fn (p2_dns_id number)
RETURN dns_table_type
AS
v_data dns_table_type := dns_table_type ();
BEGIN
IF p2_dns_id = 2
THEN
FOR c IN (SELECT dns_id dns, omschrijving oms
FROM d_status dst
WHERE dst.dns_id IN (8, 10))
LOOP
v_data.EXTEND;
v_data (v_data.COUNT) := dns_rectype (c.dns, c.oms);
END LOOP;
RETURN v_data;
END IF;
END;
and the types;
CREATE OR REPLACE TYPE DRSSYS.dns_rectype AS OBJECT (rec_dns_id NUMBER, rec_omschrijving VARCHAR2(255));
CREATE OR REPLACE TYPE DRSSYS.dns_table_type AS TABLE OF dns_rectype;
I tried some things i found on this forum, but they didn't work as well;
SELECT REC_OMSCHRIJVING display_value, REC_DNS_ID result_display FROM
TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
SELECT REC_OMSCHRIJVING display_value d, REC_DNS_ID result_display r FROM
TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
SELECT a.REC_OMSCHRIJVING display_value, a.REC_DNS_ID result_display FROM
TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) a order by 1
Edited by: rajan.arkenbout on 8-mei-2009 14:41
Edited by: rajan.arkenbout on 8-mei-2009 14:51I just had the same problem when I used a function in a where clause.
I have a function that checks if the current user has acces or not (returning varchar 'Y' or 'N').
In where clause I have this:
where myFunction(:user, somePK) = 'Y'
It seems that when APEX checked if my query was valid, my function triggered and exception.
As Varad pointed out, check for exception that could be triggered by a null 'p2_dns_id'
Hope that helped you out.
Max -
DataGrid with dynamic columns & renderers
I'm developing using Flash Builder 4 & Flex SDK 4.1.
I need to manage very dynamic DataGrid components and keep their definitions, which are all part of a complex item renderer of an Offers list.
The objects structure is simplified as follows -
Data: Model --> Offers ArrayCollection --> Offer VO --> DataGrid data ArrayCollection & DataGrid columns Array
View: List --> Offer Item Renderer --> DataGrid
1. Since the DataGrid's columns property accepts only an Array (not ArrayCollection), it seems like Data Binding for defining the columns is very problematic.
I tried to bind it to the source property of an ArrayCollection that would keep my columns definitions, but it didn't really work (mainly header display bugs).
What is the recommended way to keep the dynamic columns definition of a DataGrid?
2. Each column can have a set of dynamic properties, so I created a "mutant" - Column VO that extends DataGridColumn and got a dynamic properties ArrayCollection on it.
The columns got a custom header renderer that includes an icon when there are properties.
The header renderers got 4 main states (NotSelectedWithProperties, SelectedWithProperties, NotSelectedWithoutProperties & SelectedWithoutProperties).
However, the header renderer area seems a bit buggy when maintaning dynamic columns.
Any thoughts on the subject?
3. Anyway, I ended up recreating the DataGrid's columns Array very often (copying the columns definition on the offer's item renderer's dataChange event handler).
Note that the dynamic properties can be edited when the column is selected and I copy their values from the view back to the model when entering the state NotSelectedWithProperties.
This feels way too complicated and I really try to keep it simple, inspite of the required complexity.
Does anyone have better ideas?
4. In some cases the column's item renderer should also be modified into another DataGrid (grid-in-grid).
I used the MXDataGridItemRenderer with a DataGrid and included an ArrayCollection for the "newValue" returned by the editor.
(I use RendererIsEditor=true and on updateComplete populate that variable with the DataGrid's dataProvider contents)
When needed, I loop though the data objects of the parent DataGrid and populate the related field with an ArrayCollection of key-value objects that are displayed on the internal DataGrid.
After adding this feature I encounter very strange bugs -
a. After editing the grid-in-grid values and changing the column's state (selecting & deselecting), I get the following exception:
ArgumentError. Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/setChildIndex()
at mx.core::UIComponent/setChildIndex().......6993....
All I could find about this is that it might be related to some context error or something, but I'm really stuck on this one.
b. Sometimes another column might copy value from one row to another, running over the previous value.
I'm not sure exactly what sequence of actions causes this behavior, but it's related to that itemRenderer for sure.
c. Switching places with a column that uses the grid item renderer (headerShift) causes a stak overflow of StyleManager that tried to get style from the DataGridItemRenderer. This one I just found out, but couldn't reproduce a second time... strange!
I'm pretty sure this caused another problem that I don't remember at the moment.
The bottom line is that there got to be a better way to implement this feature within this already-complicated environment.
Maybe I'm doing something very wrong here...
Please advice and thanks for reading all this.Update on item 4a -
This was a major issue (the main reason for opening this thread really) and I managed to resolve it!
As part of my application, I override the default DataGrid behavior for column selection (headerRelease event).
Instead of sorting, I change the column's header looks and define it as Selected (for showing its dynamic properties and enable its deletion).
At first I did this by setting styles, but the look didn't refresh unless I created a new instance of the header renderer.
Later I changed thi behavior to work with states, but I left the new header renderer instance creation commands and those lines created all the mess!
Conclusion -
If you define a custom header renderer for your datagrid column and then a custom item renderer, don't create a new instance of your header renderer!
It would still be nice to get some response for the other issues I raised.
Thanks and have a nice week. -
Sorting a Collection with dynamic columns using a custom compare function for multiple columns
I need help and ideas on how to sort a ListCollectionView. My problem is complicated by 3 requirements-
1. The column values contain HTML tags that needs to be removed before sorting (use custom compareFunction to strip HTML)
2. The columns are dynamic, so dataField names are not known at compile time (need a single compareFunction for all columns)
3. The data is used in an AdvancedDataGrid so multi-column sorting is required
I have figured out how to solve any 2 of the 3 requirements. However, I am having difficulties supporting all 3 requirements.
Any help or ideas would be greatly appreciated. Thanks.After playing with this some more I think I've figured out a solution. This seems to work in initial testing. Also, there is not a need to capture the current sort column in the headerRelease event which many offered solutions suggested. Another benefit to this solution is that keyboard initiated sorting is handled also. Whereas the headerRelease event is only triggered by a mouse click on the column header and special handling is required if the user uses the keyboard to access the column header.
One point that I don't understand is how ascending/decending order is determined. Behavior seems to be different between a single SortField versus multiple SortFields. Notice how the compareResults are handled for the different situations. Anyone out there know why???
private function colSortCompareFunction(obj1:Object, obj2:Object, fields:Array = null):int{
var compareResults:int = 0;
var newObj1:Object = new Object();
var newObj2:Object = new Object();
// should not be a condition that is met
if (_dataProviderDetails.sort.fields == null) {
var s:Sort = new Sort();
var f:Function = s.compareFunction;
return f.call(null, obj1, obj2, fields); }
// when a single column is selected for sorting
else if (_dataProviderDetails.sort.fields.length == 1) {
var firstFld:SortField = _dataProviderDetails.sort.fields[0];
newObj1[firstFld.name] = stripHTML(obj1[firstFld.name]as String); newObj2[firstFld.name] = stripHTML(obj2[firstFld.name]
as String);
compareResults = ObjectUtil.compare(newObj1[firstFld.name], newObj2[firstFld.name]);
return compareResults; }
// when multiple columns are selected for sorting
else {
for each (var fld:SortField in _dataProviderDetails.sort.fields) {
newObj1[fld.name] = stripHTML(obj1[fld.name]
as String); newObj2[fld.name] = stripHTML(obj2[fld.name]
as String);
compareResults = ObjectUtil.compare(newObj1[fld.name], newObj2[fld.name]);
if (compareResults != 0) {
if (fld.descending) {
return compareResults * -1; }
else {
return compareResults; }
return compareResults; }
Does anyone see any problems with this solution?
NOTE: stripHTML(String) is a simple function using regular expression to remove HTML tags.
Thx -
Oracle 9i, Rel.2 - Problems with dynam statement and cursor
Hello,
I have the following problem with Oracle 9i, Release 2:
I have a SQL-statement, which I create with the help of a configuration table. That means I don’t know how this statement looks at runtime. It could be look like this:
SELECT Att1, Att2, Att3
FROM Tab1
or this…
SELECT Att1, Att2
FROM Tab1
or this…
SELECT Att1
FROM Tab1
etc.
That means I don’t know in advance how many columns will be in the select-clause.
Here my code snippet until here:
v_query_str := 'SELECT ' || v_select_clause_str
|| ' FROM cb.' || v_table;
,,v_select_clause_str" willl be created dynamically
,,v_table" is as well from the config-table
Now I want to iterate through the result of the query and do further processing.
For this reason I wanted to use a cursor, iterate through the rows and save every value of each row in an own variable (but I don’t know the number of columns!!!).
But how can I open a cursor and iterate through it without knowing the number of columns???
The following code is NOT working:
TYPE t_dataColumnComp IS TABLE OF VARCHAR2(200);
a_dataColumnComp t_dataColumnComp;
--here I create the query…
v_query_str := 'SELECT ' || v_select_clause_str
|| ' FROM cb.' || v_table;
OPEN c_tempAtt FOR v_query_str;
LOOP
FETCH c_tempAtt INTO a_dataColumnComp; --THIS DON’T WORK
EXIT WHEN c_tempAtt%NOTFOUND;
FOR i IN 1..a_dataColumnComp.COUNT
LOOP
DBMS_OUTPUT.PUT_LINE(a_dataColumnComp(i));
END LOOP;
END LOOP;
CLOSE c_tempAtt; --close cursor variable
Regards
HomerYou will need to use DBMS_SQL to handle this since the number of columns in the result set is not known until runtime.
See here for an example of using DBMS_SQL:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:235814350980
Maybe you are looking for
-
Difference between scalable and failover cluster
Difference between scalable and fail over cluster
-
Successive dates with last day of that month being added to succesive date
Hi , I have a piece of code that displays the succuessive dates from the given date to tilll date with a date interval of 30 days. My requirement goes some thing like this. since the given date is '26-nov-08' the next successive date should be the nu
-
I followed the trouble-shooting steps for this issue, to no avail (Sign in, activation, or connection errors | CS5.5 and later, Acrobat DC). The back story is that I was an independent contractor working for a company and had my own CreativeCloud acc
-
New iPod touch 4 won't work or restore after update
I got an iPod touch 4 in January. (I am using an H-P desktop, 3.0Ghz, 2.5 GB RAM, 250 GB HD, mostly empty, with Win XP home.) The first time there was an iOS software update available, it didn't work after the update and would not restore. After many
-
Lately every time i open my browser Safari Version 7.1 on Macbook pro with retina display IOS X 10.9.5 i keep getting these ads from "macshop" also the pages keep directing to files fetcher and i don't know why it keep doing that although i have bloc