Dynamic Columns Add

Hi,
I have a One Small requirements. Please suggest which method is best.
If user add the columns into DB that will be automatically add the columns into the Report.
Ex: In my Table A initially have Col1,Col2 then it should be display into report
Table A
Col1,Col2
After few days user added Col3 into Table A that should be added automatically.
Thank you
Regards
Venkat

Hi Venkat,
According to your description that you want to dynamically add the new columns in the table when you add new columns in the DB table, right?
Generally, the matrix's column group can dynamic increase in the report, if the data of the new columns are all numeric type, you can use the unpivot function to turn the column name of these fields to a single row and then you can add it in the column group
or there is no better method to do the dynamic add to tablix, I would suggest you to add new column manually as you don't have too many columns to add at a time.
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 feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support

Similar Messages

  • How to add  dynamic column  in jfreereport

    hi,
    i am working on a project aboit accounting package.
    i had created a report in jfreereport .. buti am facing the problem of dynamic column addition in that..
    i have to create the number of column as per user given range that will from 2 to 365
    i had generated column for that
    that should be like
    1 - 5 , 6 -10 , 11 - 15 , etc...
    how can i represent that alll column in print preview i can't represent that report in horizontal fashion . is there any way to display it ..
    this report has no bound in horizontal or verticle means i have any number of rows or columns..
    pls help.
    kamlesh

    hi,
    that means u have fixed columns right? ie 5 columns in a report
    if it write, than u can find out how u can rename the columns with exiting
    one.
    that means while runing report u have to pass all the 5 columns to report
    instead of the exiting columns (ie rename the columns that u want add
    columns)
    u have to search in code for renaming in the code ie jfreereport package.
    i think u understood.
    daya

  • HOW to add Dynamic Columns in ADF Faces CORE Table

    In ADF im going to display the dynamic column in Coretable,
    Header are displaying very fine. but im unable to display rows sucessfuly,how to resolve.
    Second thing is that JSF page isn't getting the value from dataList, whats wrong in JSF code.
    // JSF PAGE CODE
         <af:table binding="#{backing_test1.table1}" id="table1"
    value="{backing_test1.dataList}" var="myRec"/>
         public void setTable1(CoreTable table1) {
         this.table1 = table1;
         public CoreTable getTable1() {
    //create this table
    table1 = new CoreTable();
    CoreColumn dynamicCol;
    CoreOutputText outText;
    Application app=FacesContext.getCurrentInstance().getApplication();
    DCIteratorBinding iter = (DCIteratorBinding)bindings.get("listAllMonthsIter");
    RowSetIterator rsIter = iter.getRowSetIterator();
    rsIter.reset();
    Row row;
    while (rsIter.hasNext()) {
    row = rsIter.next();
    String header = (String)row.getAttribute("element");
    // element contain the value JAN, FEB...
    dynamicCol = new CoreColumn();
    dynamicCol.setHeaderText(header);
    String currRec = table1.getVar();
    outText = new CoreOutputText();
    ValueBinding vb = app.createValueBinding("#{myRec.value}");
    outText.setValueBinding("value",vb);
    outText.setRendererType("Text");
    dynamicCol.getChildren().add(outText);
    table1.getChildren().add(dynamicCol);
    public void setDataList(List dataList) {
    this.dataList = dataList;
    public List getDataList() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("listAllMonths");
    if (operationBinding == null)
    return null;
    List dataList = (Vector)operationBinding.execute();
    return dataList;
    }

    Well issue is that
    I have a list of values that can be chnaged any time during application execution sya its list of Fav Fruits..
    and in an other page i need a data table having these fruits as coulmns and their details as rows...
    how to achieve this..
    we can not guess the number of columns before time.. so can make the estimate and hide them.

  • How to add an extra dynamic columns in workflow inbox?

    Hi Every Expert,
    Transaction SWL1 only provides Six columns as dynamic columns for workflow inbox. But we need to use 7 to 8 dynamic columns. How to add these two extra columns into workflow inbox?
    Thanks,
    Shirley

    Thank you very much for all you responses.
    Due to SAP only provides 6 columns, I can't add anohter extra dynamic column. I may consider to change task to show the contents in preview pane.
    Thanks again to everyone.
    Shirley,

  • Dynamic columns: how can i add an adjacent column to each dynamic column?

    i would like to extend the dynamic columns example coming with XML Publisher MSWord plugin.
    the example produces a table like:
    TestScore 0-20 21-40 41-60 61-80 81-100
    Theology 20 37 50 12 122
    English 0 55 30 92 52
    Mathematics 30 45 50 102 22
    i would like to have an output like this:
    TestScore 0-20 21-40 41-60 61-80 81-100
    Theology     20 2,8% 37 5,1% 50 7,0% 12 1,7% 122 17,0%
    English     0 0,0% 55 7,6% 30 4,2% 92 12,8% 52 7,2%
    Mathematics 30 4,2% 45 6,3% 50 7,0% 102 14,2% 22 3,1%
    For each "original" value column i need an adjacent additional column with percentages
    one big header cell for the value- and adjacent percentage-column together.
    (the percentages can either be calculated in the template or they could be
    part of the XML. e.g. <PercOfStudents>2</PercOfStudents> as an additional child
    of the <TestScore> group.
    is this possible?
    how could i add an adjacent column to each dynamic column?
    any suggestions, tips or hints?
    Regards
    Peter

    Hi Peter
    Sorry, I was going to take a look at this this morning but got caught up in meetings. Glad you managed to work it out. I have a proposal for you, how about letting me post your solution to hte BIP blog? I can write it up and just use your examples ... full credit to you of course :o)
    Regards, Tim

  • Dynamic column names in Oracle

    HI SOS!! calling for help...
    i am trying to query the following. I want to remove the duplicates in the ID, and combine them into one... While doing so, I want to keep the data as it is by creating dynamic columns reason_1, reason_2, reason_3 with their corresponding TIME. In case of same reasons, I want to add the TIME. The database is as follows:
    ID     REASON     TIME
    A     41A..........     27
    A     93K..........16
    B     89C...........3
    B     93K...........7
    B     48C..........     4
    C     93K..........     24
    C     93K..........     7
    C     48C.........10
    Expected Result is
    ID     REASON_1......TIME_1.... REASON_2...TIME_2....REASON_3.........TIME_3
    A........ 41A............ 27........... 93K............16          
    B........ 89C............ 3............ 93K............7...........48C.................. 4
    C........ 93K........... 31.......... 48C..............10          
    Would be grateful if someone could try helping me out of this as early as possible.
    Edited by: 968125 on Oct 28, 2012 11:01 PM

    You still haven't made it clear what the requirement is.
    Is there a maximum number of reasons that can occur per ID? If so, you can code the pivoting of your data with something like:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'A' as ID, '41A' as reason, 27 as time from dual union all
      2             select 'A', '93K', 16 from dual union all
      3             select 'B', '89C', 3 from dual union all
      4             select 'B', '93K', 7 from dual union all
      5             select 'B', '48C', 4 from dual union all
      6             select 'C', '93K', 24 from dual union all
      7             select 'C', '93K', 7 from dual union all
      8             select 'C', '48C', 10 from dual)
      9  --
    10  -- END OF TEST DATA TABLE SIMULATED USING 'WITH' CLAUSE
    11  -- SIMPLY USE THE SELECT STATEMENT BELOW ON YOUR OWN TABLE
    12  --
    13  select id
    14        ,max(decode(rn,1,reason)) as reason_1
    15        ,max(decode(rn,1,time)) as time_1
    16        ,max(decode(rn,2,reason)) as reason_2
    17        ,max(decode(rn,2,time)) as time_2
    18        ,max(decode(rn,3,reason)) as reason_3
    19        ,max(decode(rn,3,time)) as time_3
    20        ,max(decode(rn,4,reason)) as reason_4
    21        ,max(decode(rn,4,time)) as time_4
    22        ,max(decode(rn,5,reason)) as reason_5
    23        ,max(decode(rn,5,time)) as time_5
    24  from (/* assign some row numbers within each ID, ordering by 'reason' then 'time' */
    25        select id, reason, time
    26              ,row_number() over (partition by id order by reason, time) as rn
    27        from   t
    28       )
    29* group by id
    SQL> /
    I REA     TIME_1 REA     TIME_2 REA     TIME_3 REA     TIME_4 REA     TIME_5
    A 41A         27 93K         16
    B 48C          4 89C          3 93K          7
    C 48C         10 93K          7 93K         24In this example, it will cater for up to 5 reasons/times per ID... and you can code for more if you need very easily.
    Also, as you're using 11g, you can use the new PIVOT query, for which you can find plenty of examples if you google or search these forums, or follow the FAQ link.
    If you don't have any idea how many reasons there could be, then you really are looking at generating columns dynamically.
    The problem with that is, because Oracle needs to know the SQL projection (see the FAQ link already provided), it has to know how many columns are going to be returned from a query before any data is fetched... but you are saying that the columns returned have to be based on the data itself. To do that you have two main options:
    1) You query the data once to determine how many columns you are going to need and then dynamically build up a query in PL/SQL code with the right number of columns (or use one of the other dynamic methods shown in the FAQ)
    or
    2) You step back and ask yourself if SQL is really the best place to be trying to produce this output. Reporting tools are often better suited to this requirement as they are made to query the data back from a database and then pivot and layout the data based on the data returned.

  • Multiple dynamic column in cross table

    Hi all,
    I have a cross table which stored the sale's quantity and amount.
    The layout in view result likes below:
    saler     quantity1 quantity2 quantity3 quantitysummary amount1 amount2 amount3 amount4 amountsummary
    S3           100           20
    S2           50             30
    S1           300           40
    The layout in view structure likes below:
    saler     quantity quantitysummary amount amountsummary
    S3           100           20
    S2           50             30
    S1           300           40
    the quantity1...n and amount1...n columns is not fixed.the 2 columns is dynamic.
    It's easy that only one column is dynamic,but now there are two columns is dynamic,I don't know how to achieve it.
    Has anyone an idea how to accomplish this?
    Thank you trying to help me!

    You cant do this on BO , you can add static columns but if you put some dynamic column in the left or right i turns dynamic...
    Regards

  • "Dynamic column" in the workplace

    Hi experts.
    Do somebody know the possible uses of the "Dynamic column" field in the task registers of the Workflow inbox? You can add some dynamic columns via the "select layout" menu of the workplace but they seem to be empty.
    I'm wondering if I can put some custom dynamic information on them via workflow definition (information such like users names or maybe some filter criteria) in order to help the user to show and order the active tasks easily.
    Any help on this topic will be interesting for me.
    Thank you all!!
    Ismael

    Hi Ismael,
    Dynamic columns are specific to each task, you can define them using tx SWL1.
    Once defined, the dynamic column fields should now be available. However they do take a performance hit and obviously the fields are not applicable to all tasks. For this reason it is not a good idea to have a dynamic column as a default layout, but to use them in the in the task-based inbox views:
    In the workplace view Inbox -> Workflow -> Grouped by task -> the task you just defined (you must have a workitem of that task already in your inbox). Define a layout and save it as a default, teach your users to navigate to a task if they want to use the columns.
    Of course some users can still create their own workflow inbox view with dynamic columns if e.g. the majority of their work is a particular task.
    Cheers,
    Mike

  • Dynamic Column in matrix

    Hi Experts
    Can anybody tell how to create a dynamic column in matrix?
    when user enter's a value say '4' then 4 clolumn should be created...
    regards
    shibin

    Hi,
    You can add the column by using the below line
    oMatrix.Columns.Add("Column ID", Column Type)
    Ex: oMatrix.Columns.Add("4", SAPbouiCOM.BoFormItemTypes.it_EDIT)
    Regards,
    Noor

  • Dynamic column in Workflow inbox

    HI All ,
         I would like to add a dynamic column in the SBWP layout which reflects the Last reserved by user...
        Any suggestion will surely be rewarded...
    Thank you
    Srinivas

    Hi Srinivas,
    the value will be updated each time the work item is <i>reserved</i>. When it is put back again, this value just stay as it was before.
    The virtual attributes gets refreshed when the inbox is refreshed (by refresh-button or by re-entering the Workplace).
    The algorithm to determine the last user, who has reserved, is the following:
    DATA: user_id_last_reserved    TYPE SWWLOGHIST-meth_user.
    CLEAR user_id_last_reserved.
    SELECT SINGLE meth_user
                  FROM SWWLOGHIST
                  INTO user_id_last_reserved
                  WHERE wi_id  = object-key-workitemID
                    and method = 'SWW_WI_SELECT'
                    and timestamp IN (
                        SELECT MAX( timestamp )
                               FROM SWWLOGHIST
                               WHERE wi_id = object-key-workitemID
                                and method = 'SWW_WI_SELECT'.
    IF sy-subrc <> 0.
       "There's no such user
    ENDIF.
    Have fun,
    Florin

  • Dynamic columns with grouping.... in crystal report...using java /c# api ??

    I need to create a report with dynamic columns
    for e.g/
                                           Pre   Scen 1   Scen 2   Scen 3   Scen 4   Scen 5   Scen 6      .....
    *Total                          4.5118   4.5118    4.5118   4.5118   4.5118        4.5118   4.5118     *
    *Canada                    1.7180    1.7180    1.7180   1.7180  1.4103     8.4103      8.4103     *
       BG                           1.6224    0.9641    1.0473   1.0473  6.4635     6.4635  1.6224     
       BI                              0.044     0.0827     0.3578   0.3578 0.0560     0.0560   0.0744     
      DIN                    0.0056     -0.0655     -0.0215     -0.0215     -0.0210     -0.0210     0.0056     
    *Czech Republic     1.7180     1.7180     1.7180     1.7180     18.4103     18.4103     18.4103     *
      CEE               0.0275     1.0000     0.7359     100.0000     0.0858     0.0858     0.0275     
    *Israel               1.7180     1.7180     1.7180     1.7180     18.4103     18.4103     18.4103     *
      F                    0.0077     1.0000     0.7359     100.0000     -0.0035     -0.0035     0.0077     
    *United States          1.7180     1.7180     1.7180     1.7180     18.4103     18.4103     18.4103     *
      A                    0.0144     0.1871     91.0473     0.0679     0.0544     0.0544     0.0144     
      AA                    0.0428     0.0626     0.3578     0.0675     0.1175     0.1175     0.0428     
      AB                    0.0431     0.1553     -0.0215     0.1685     0.1199     0.1199     0.0431     
    in this report....grouping will be parameterized ....and total also required at every stage...
    so how can i add the columns dynamically ?
    number of columns are not fixed...they may be 20...30....etc

    Requirement is...
    I have a table scn ... where i can make entries any time....assume they are some rules...
    I have another table called t1 ... where i need to calculate values of t1 again some specific rules are table scn.
    So for each t1 there will be one row with columns as scn entries which I select on interface.
             Original Value  --  Sc1 ......  Sc2  ...... Sc3  ......  Sc4 ......  Sc5 . . . . . .. .
    t1...................xx...... xx..........xx..........xx........ xx........ xx
    t3...... .............xx...... xx..........xx..........xx........ xx........ xx
    t4....................xx...... xx..........xx..........xx........ xx........ xx
    selection of these scn columns will be dynamic....so i cant create n number of columns in the report template and hide them as per requirement....it will not work.
    Wat is a feasible solution to create such kind of report ?
    Can we create template in C# or .net ?
    IF yes...do we have to save every time in order to render report ?
    e.g.   one report may contain 4 columns and other 10 ... so do i have to create new rpt file each in order to render the report ?
    Please if any1 have approach to create this kind of report then it will very helpful....
    Edited by: pchawan on Jul 19, 2011 11:28 PM

  • 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

  • Bex Query which uses Dynamic columns to display actuals

    Hi Bex experts,
    I have a query issue/question.
    I currently have a Bex query which shows me the the planned values for each period, spanning 6 years into the future. My Key figure columns are defined as follows:
    Value type  = '020'
    Version  = mandatory variable, entered at execution.
    Posting period (FISCPER3)  = These columns are fixed values using periods 1 to 12 for each column.
    Fiscal year (0FISCYEAR) = Each column contains SAP exit for current year, and using the offset +1, +2, +3, +4 etc, when I define the future years coulmns.
    Currency = fixed 'USD'.
    Fiscal year variant = fixed 'Z4'
    The above works fine for plan data.
    I want to now include is:
    Seperate 'Dynamic columns' to show only actuals for period ranges from period one to the previous period (or current period minus 1). Each period should have it's own column for actuals.
    The dynamic actuals columns should be grouped together to the left of the plan columns.
    Actuals are only for current year, so I will still use the SAP EXIT for current year in the column definition.
    Example: If I am currently in period 10, the query should show me actuals from period 1 to period 9 in seperate columns, then continue to show me my plan values columns that I have in place already.
    How can I construct these actuals columns in to my existing query. If you have possible screens shots.
    Thanks, and maximum points will be alotted.

    The way I have approached this you may not like as it involves quite a bit of coding
    12 CKFs
    each CKF adds up 2 RKFs
    So 24 RKFs
    example Column 6 CKF
    Adds Column 6 RKF Actual and Column 6 RKF Plan
    Column 6 RKF Actual contains Actual version + key figure + Period variable column 6 Actual
    Column 6 RKF Plan contains Plan version + key figure + Period Variable column 6 Plan
    Period variable column 6 Actual
    is a cmod variable which reads the entered date
    if the period of entered date is LE 6
    then return period 6 into "Period variable column 6 Actual"
    else put 0 into "Period variable column 6 Actual"
    Period variable column 6 Plan
    is a cmod variable which reads the entered date
    if the period of entered date is LE 6
    then return period 0 into "Period variable column 6 Plan"
    else put 6 into "Period variable column 6 Plan"
    Now what happens is that if you enter period 6 in your selection screen all the Actuals of columns greater than 6 all have period 0 put into their selection so return 0 and all the columns less than or equal to 6 return the values for the fiscal period (ie column 1 gets period 1)
    And in addition all the Plans columns return the value of their column ie for their period for those greater than 6 and for those less than 6 they all return 0
    It's convulted - but you get the idea - and yes it works
    There may be a better way to do it - and I am open to suggestions
    (this does assume that NOTHING is posted to period 0 otherwise it won't work)

  • Hide Dynamic columns and remove space

    I have an application that allows users to generate a Crystal report containing selected columns.  A user is able to check which columns should appear on the report from a web page.  I'm able to display and suppress the dynamic columns but the space for the dynamic columns that are not selected remains.  How can I remove the space and have the columns move to the left?  
    I'm using VS 2003 and Crystal 10.

    As Ludek mentioned you would need to use the RAS .NET SDK to completely remove the column from the report. What you could do is start with a blank report, only have your database info added, then build UP your report rather than remove items. The ReportObjectController has a method called AddByName() that will insert a field into your report. It will add the field from left to right with a small buffer space.
    In order to use the RAS .NET SDK with Visual Studio .NET you'll need to upgrade to Crystal Reports 2008 or Crystal Reports for Visual Studio 2010 (good free price here).
    [RAS .NET Developer Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_dg_12_en.chm]
    [RAS .NET API Ref|http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_apiRef_12_en.chm]

  • Dynamic columns

    Hello,
    we have several possibilities to show dynamic rows (table, row repeater, multi pane), is there any possibility to achieve this for dynamic columns?
    I have a table with two columns:
    - TEXT
    - VALUE
    I want to show this table in ONE line, is there any element which can realize that? I'm working on 7.02 system
    Thanks and Regards
    Christopher

    Hi Christopher,
    Can you please explain your requirement a bit more? Do you want a nested table or you want a table with dynamic columns?
    You can add columns dynamically and using cell variant in the column you can also decide what UI element you want to display in the cell?
    In this link, I have explained how to add Columns and Cell Variants dynamically into table:
    http://wiki.sdn.sap.com/wiki/display/Community/AddCellVariantintableatruntimeinWD+ABAP
    Hope this will help,
    Amit

Maybe you are looking for

  • Doubts in R/3 system

    Hi ,  Q1.) If a job one job is running for 1 hr daily and the same job running in next day for 5 hours .What is the reason and how you will go head to correct the problem .Answer me step by step. Q2). All user suddenly unable to run any T-code in SAP

  • Message Server connection in ABAP-Part failed

    Hi! I cannot start the J2EE-Part ofSAP Sokution Manager 4.0 system... I am getting the error message from CMD-console  "Message Server unrechable" and then "Running bur  not connected to Messager Server" and after this the disp+work.exe from J2EE-Par

  • Document scanned to preview - how then delete it

    Have scanned a document to attach to an email.  It ended in Previews but cannot now delete it as it is not wanted.  Went to 'help' which said edit then delete, but that option is not available.

  • Changing import settings for brightness etc

    Hi there, I'm importing RAW files from my Canon 5D, and they all come in with the brightness set to +50 and the contrast to +25, the blacks are +5, and the tone curve has a slight "S" curve on it. I appreciate this is probably a "good thing", but how

  • Problem with dragging/p​anning images in Lightroom

    I installed Lightroom 6 on a few days' old laptop - part of my initial set of intallations, and therefore very much a "clean" machine. An immediate problem I noticed was in the Develop module.  Here, a hand tool enables you to pan round a zoomed-in i