Dynamically show/hide columns for DelimitedData output

My users want to see only dynamic sets of data from the same report query.
For example, if the query returns:
Date, Widget1Count, Widget2Count, ..., WidgetZCount
User1 wants to see Date and counts for widgets 1,2, 5, and 10
User2 wants to see Date and counts for widgets 2, 3, 4, 5, 10-20.
Uset3 wants to see Date and widget 99 count.
I don't want to write a custom report for every single user nor do I want to create Z! number of queries to satisfy every possible request combination.
I wonder, is there a way to change "Exclude from XML Output" property for a particular query field(s) from a report AfterPForm or BeforeReport trigger?

Hi,
I had the same problem, but I saw the Metalink document: 340793.1, which gave the solution I needed.
In my case, I needed to limit the number of columns being outputted in a DELIMITEDDATA format based on a user parameter.
I ended up with the following code in my After PForm trigger, which did the job.
BEGIN
SRW.ADD_DEFINITION('<report DTDVersion="1.0">');
SRW.ADD_DEFINITION('<customize>');
-- For those columns I want displayed, Set the XMLSuppress property to False
FOR tmp IN 1 .. 10 LOOP
SRW.ADD_DEFINITION('<object name="col_'||LPAD(TO_CHAR(tmp), 3, '0')||'_title" type="REP_COL_MAP">');
SRW.ADD_DEFINITION('<properties>');
SRW.ADD_DEFINITION('<property name="XMLSuppress">False</property>');
SRW.ADD_DEFINITION('</properties>');
SRW.ADD_DEFINITION('</object>');
END LOOP;
-- For those column I don't want displayed, Set the XMLSuppress property to True
FOR tmp in 11 .. 100 LOOP
SRW.ADD_DEFINITION('<object name="col_'||LPAD(TO_CHAR(tmp), 3, '0')||'_title" type="REP_COL_MAP">');
SRW.ADD_DEFINITION('<properties>');
SRW.ADD_DEFINITION('<property name="XMLSuppress">True</property>');
SRW.ADD_DEFINITION('</properties>');
SRW.ADD_DEFINITION('</object>');
END LOOP;
SRW.ADD_DEFINITION('</customize>');
SRW.ADD_DEFINITION('</report>');
SRW.APPLY_DEFINITION;
END;
I hope this helps with your problem.
Paul

Similar Messages

  • Dynamically Show/Hide Columns

    Hello friends
    I am working on Crystal report 12.1
    I have a table in SQL server with 24 fields.
    Every 2nd field is bit field. kind of Visible True/False tag for previous column.
    e.g.  Name, Name_SH, Fund, Fund_SH    -
      Column names
    Name, Fund stores value.
    Name_SH stores, True/False for Name
    Fund_SH stores, True/False for Fund
    So, now, when I display report in Crystal report, user will select some fields from that 12 fields.
    That will be processed throug Stored proc in SQL and feeds data in same table.
    Now, in Report, How can I implement this situation, of display only columns with _SH = True.
    and also, user need proper format, means, there should be equal space between all columns.
    Please help me to solve this.
    thanks in advance.
    Thanks & Regards
    Utkarsh

    UNION to a single column with a secondary column for Type (field name) and remove invisible ones from the UNION process.
    Then, use a CrossTab to show the final result.

  • Dynamically show/hide pages in a workset for special users at runtime

    Hi all,
    I want to create a workset that contains pages for different countries. The portal users should only be able to see the countries where they do business. I also would like masterdata from R/3 to drive the display of content on the portal.
    - Is there a way how I could dynamically show/hide certain pages of the workset for the specific users?
    - Would this showing/hiding of pages affect the workset for all users or only the instance for the specific user?
    - Would there be a difference when I want to dynamically show/hide iviews in a page instead of showing/hiding pages in a workset?
    Thanks a lot in advance.

    Hi Timo,
    Check out the article located at:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/portal_content/filtering role and workset content.htm
    It talks to exactly what you're trying to do.  I'd imagine you could extend this simplistic example to have the service pull the users country from his/her master record in R/3 and set their filtering expression accordingly.
    Hope this helps,
    Marty

  • Dynamically show/hide Excel WPA

    Hello,
    I am working on a web page, where list of links will be given. On user-click on a link either it will show target web page in a iframe or it will show a excel sheet in excel wpa. On the basis of link clicked, I need to hide/show iframe and Excel WPA. I can
    control iframe using javascript but i don't know how to work with Excel WPA. At a time either iframe or Excel wpa will be shown on the screen but not both.

    Hi,
    According to your post, my understanding is that you wanted to dynamically show/hide Excel WPA.
    If the Excel WPA is Excel Web Access Web Part, you need to  get the ID of the Web part and hide the web part.
    When you click the link, you need to get the parameter form the URL and then display the web part.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/en-US/219b388e-0979-46b4-9a46-f7e6449738b8/hide-and-show-a-list-view-webpart-by-clicking-on-a-link-in-the-same-webpart-page-in-sharepoint-2010?forum=sharepointgeneralprevious
    For more information, please refer to:
    Dynamically Show/Hide Multiple Web Parts
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Show/hide layers for repeated recordset data

    Is there any product out there to assist with the creation of
    show/hide layers for repeated recordset data?

    You can't build that functionality in with InDesign — but you can with Acrobat Pro. You've got to use the form builder functions to create a button that will show or hide another element.
    d

  • Hide column in Excel output?

    I have a .cfm file generating Excel output using CFContent.
    The client want to have certain data in a hidden column.
    I am already using XML to freeze the header and I tried
    hiding the column by using a <LeftColumnVisible> tag within
    the WorkSheetOptions (which is what Excel generates when you hide a
    column). But it doesn't come through in the CF output.
    Any suggestions?
    Ken

    Thanks. But "Exclude XML output" does not work dynamically. It cannot be set to "No" or "Yes" programmetically.
    What I would like is to provide my user a parameter "Show Column X? (Yes/No)". Based on user's choice, the Excel output should display or hide column X.
    Thanks for the response!

  • How to make a layer from the ADF pivot table invisible , show-hide column-row-data

    Hello all ,
    I need to create a pivottable with ADF 12c for reporting purposes.
    I have a table or view with 10 items of type VARCHAR2 , C1,C2,C3,C4,C5,C6,C7,C8,C9,C10  and   10 items of type NUMBER N1,N2,N3,N4,N5,N6,N7,N8,N9,N10
    The items of type VARCHAR2 are for Column and Row areas and the items NUMBER are for Data Areas
    I want to create a jsf page with one empty pivottable and in code Show or Hide the items in the Column area , Row area , Data area
    Con you send me a small sample ?
    I test with this code that i find in oracle OTN but not work.
    <dvt:pivotTable id="pt2" value="#{bindings.WebPivotDataView1.pivotTableModel}" var="cellData"
    varStatus="cellStatus" splitMode="enabled"
    binding="#{backingBeanScope.CmfPivotBean.pivotTable}"
    >
    <dvt:headerCell>
    <af:switcher facetName="#{cellData.layerName}" defaultFacet="Default" id="s1">
    <f:facet name="DataLayer">
    <af:outputText value="#{cellData.label}" id="ot1"/>
    </f:facet>
    <f:facet name="C01">
    <af:outputText value="#{cellData.dataValue}" id="ot2"/>
    </f:facet>
    <f:facet name="Default">
    <af:outputText value="#{cellData.dataValue}" id="ot3"/>
    </f:facet>
    </af:switcher>
    </dvt:headerCell>
    <dvt:dataCell>
    <af:switcher facetName="#{cellStatus.members.DataLayer.value}" defaultFacet="Default" id="s2">
    <f:facet name="N01">
    <af:outputText value="#{cellData.dataValue}" id="ot4">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.WebPivotDataView1.hints.N01.format}"/>
    </af:outputText>
    </f:facet>
    <f:facet name="Default">
    <af:outputText value="#{cellData.dataValue}" id="ot5"/>
    </f:facet>
    </af:switcher>
    </dvt:dataCell>
    </dvt:pivotTable>
    DCBindingContainer bindingContainer = (DCBindingContainer)ADFContext.getCurrent().getRequestScope().get("bindings");
    CubicBinding cubicBinding = (CubicBinding)bindingContainer.findCtrlBinding("WebPivotDataView1");
    CubicEditor cubicEditor = cubicBinding.getCubicEditor();
    cubicEditor.removeLayer(DataDirector.ROW_EDGE, 0); //remove 1st row edge
    cubicEditor.removeLayer(DataDirector.COLUMN_EDGE, 0); // remove 1st column edge
    cubicEditor.removeDataItem(0);
    CubicDefinition def;
    def = cubicBinding.getProjection();
    LayerDefinition layerDefinition = new LayerDefinition("C3");
    cubicEditor.addLayer(DataDirector.ROW_EDGE, 0, layerDefinition);    
    LayerDefinition layerDefinition2 = new LayerDefinition("C4");
    cubicEditor.addLayer(DataDirector.COLUMN_EDGE, 0, layerDefinition2);
    DataItemDefinition def3 = new DataItemDefinition("N1");
    cubicEditor.addDataItem(def3);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pivotTable);
    Can you help me if is possible to create a pivottable binding to a one ViewObject and in code show/hide or compose the layout of the pivottable ??
    I search in google and OTN oracle and not find any code.
    Only find the code of the samples that is very complex for me , the code of the samples create the PivotTableModel from one Array , and i want to binding from one ADB BC ViewObject.
    Thanks in advance

    The solution I presented for your use case an DOAG 2013 was to create a pivot table binding out of user defined attributes from the table. For the defined attributes a VO is dynamically created as well as the pivot binding. The pivot binding is then exchanged at runtime together with the activation of the dynamic VO needed to only get the data needed for the particularly pivot table.
    Your solution using the CubicEditor is hard to implement due to the missing documentation. This was the reason I did not follow this approach, However it's not impossible (done it on a very small scale).
    None of the solution are what I call simple. They are complicated, complex and in part not supported solution (exchanging the pivot table binding at runtime need to use internal classes, which is not supported).
    I can't give you a working sample as it's too complex. I can make the slides available, however they are in German.
    Timo

  • Carl - Show Hide columns and report templates

    Carl,
    I've implemented the show/hide report column techniques from your demo pages. Thanks for that, it's working well.
    I am having a slight issue. I'm using theme12, and when I implement the technique there with the alternating row color template, the functionality works fine. But when I switch to standard report template I have some issues.
    Debugging the code :
    function html_HideCellColumn(pId){
    35 var l_Cell = html_GetElement(pId);
    36 var l_Table = html_CascadeUpTill(l_Cell,'TABLE');
    37 var l_Rows = l_Table.rows;
    38 l_CellI = getCellIndex(l_Cell.parentNode,l_Cell)
    39 for (var i=0;i<l_Rows.length;i++){
    40 html_HideElement(l_Rows.cells[l_CellI]);
    41 }
    42 return;
    the pId is what expect before line 35, but after, it looks like the html_GetElement is returning null.
    Is there something in the template that would cause this change? I am able to reproduce this behavior consistently. Thanks for any input.

    Hello,
    The table headers in the standard report template of that theme are missing the id attribute so changing this.
    &lt;th class="t12header" #ALIGNMENT# >#COLUMN_HEADER#&lt;/th>
    to
    &lt;th class="t12header" #ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#&lt;/th>
    and your good to go.
    Carl

  • Dynamically display/hide columns according to user inputs

    Hi,
    I need to display or hide columns in reports based on user input. ie. I have several prompts, if user doesn't input values, then the associated columns will not be displayed in the report. Is there a way to achieve this in BO XI R2. Greatly appreciated for your help.

    Hi Andy,
    You can't hide them totally, but you can get close using alerters.
    Build an alerter (probably a formula one) that put the value ="" in the field.
    Now the formula should test the userresponse for that column,
    based on the contents of it (filled in --> false, otherwise --> true).
    Apply the alerter to all cells of the column. It will empty completely when the prompt was not filled.
    Just set the width of the column to automatic (best use the header cell only) and the minimum width on zero. It will shrink the width when empty, making it seem as if hidden.
    Good luck,
    Marianne

  • Show Hide Columns

    Is there a way in which columns can be hidden from the resulting html report.
    I guess to bring them back you would have to click on show all, or something like that ?
    It would be like accessing setting a show/hide checkbox in the Report Attributes but in this case allowing the user to make the choice.
    Any ideas would be appreciated

    Mark,
    One way of doing this would be to make the columns conditionally displayed. You could then write a condition that e.g. checks the value of a page item being yes or no. The page item could be set by the user. So you could have a radio group, or button, or select list to turn off or turn on columns within your application.
    Regards,
    Marc

  • Dynamically show/hide regions out of the application workflow

    hi,
    is it possible to show/hide regions of a page dynamically with a "select list with submit" item?
    regards

    Hi,
    Do you mean "Conditionally display" items based on the value of a Select List with Submit?
    Andy

  • Show/hide column

    How to show or hide column within ADF table based on certain condition ?

    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/84-treetable-column-hide-show-404584.pdf
    https://forums.oracle.com/thread/2275114

  • Hide/show a column for some users in SSAS tabular

    Hi,
    I have a requirement to show one of the columns in a table only to some of the users. I know SSAS tabular only supports row level security. The only solution I came up with yet is to create two different models. Unfortunately this wastes a lot
    of expensive RAM in the server. Is there a better way? Some kind of work-around? ;)
    Best Regards
    Ulf

    One other way is to embed the security level into the table. You can do this by adding a "security_ID" into your structure and join it with a security table and join this to a security table which has a junction of Tablecolumns/User or TableColumns/UserGroups. 
    The next step is to use a Case When in your sql query  and make a decision to show null or real data for any column. 
    Business Intelligence Architect

  • Hide columns for ALV list output in SAP Query SQ01/SQ02

    Hi All,
    I have a requirement to hide the columns which are empty in sap query SQ01 alv list output.
    Please let me know this functionality available in Query (SQ01) like normal reports
    Regards,
    Venkat

    Hi,
    We just can't make changes in this case as this are all system generated programs.
    WE have to write our own reports to make things flexible to match our requirements.
    Things you are asking is not possible.
    Regards,
    Suvendu

  • How to hide columns in the output table in webdynpro based on input

    Hi Experts,
       I have 2 inputs and 1 input is optional.If both inputs are given proper table output is displayed,but if only 1 input is given a column is empty in the output table  so i want to hide this column dynamically at runtime based on my inputs.And i want to hide some empty rows also at runtime based on inputs.
    Can anyone help me out to solve this.
    Thanks in advance.
    Regards,
    Anita.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

Maybe you are looking for