Display Dynamic Columns in Crystal Report

Hello,
We are currently using Crystal Reports XI and connecting to an ADO .NET XML file as our data source. In this data souce we have a data table called IDENTIFIERS where every column, except for the ones used for joining tables is dynamic. These column will be different for each database thats its run against.
Is there any way to display these dynamic columns without having consistent column names?
You help is much appreciated.
Thanks,
Adam

Thanks Carl,
We do have control over the data table and a solution like this had crossed my mind. But this might not be practical for other reports that use this data table.
I think another solution would be to create a new data tabl that has all identifiers on their own row as opposed to columns.
id
dentifier
identifier_name

Similar Messages

  • Generating dynamic columns for a report

    Hi all,
          Can anybody pls. tell me how to output dynamic columns in a report. my req. is that i've to generate so many columns as there are no. of unique(a particular field value) rows in my internal table. for e.g say suppose i've 5 rows in my internal table which has 2 fields, one short text & it's corresponding value. so now my report output shud have 5 columns with the short text as the column heading & the their corresponding values below each column heading. i heard it can be done thru field-symbols. can anyone pls. guide me.

    Hi Sushma,
    This piece of code might be useful.
    The following sections will help you to understand the steps required to define a Dynamic ALV.
    Following symbol signifies:
    Þ                    Important
    Main Steps Required
    The following are the main steps that are to be performed for defining a dynamic Alv
    1.       Defining a field catalog
    2.       Defining the dynamic table
    3.       Filling data into the table
    4.       Displaying ALV list
    Defining a field catalog
    The purpose of defining a field catalog first in case of Dynamic ALV is somewhat different than in case of normal ALV. In case of Dynamic ALV the field catalog is used to define the final internal table that will hold the data, and would be used to display the final output.
    Þ It is very important to remember that the field catalog table be refreshed first, else it might give an error.
    For example:
    DATA: T_FIELDCAT TYPE LVC_T_FCAT,
    L_FIELDCAT TYPE LVC_S_FCAT.
       Refresh T_FIELDCAT.
      CLEAR L_FIELDCAT.
      L_FIELDCAT-FIELDNAME = 'LIFNR'.
      L_FIELDCAT-INTTYPE = ''.
      L_FIELDCAT-OUTPUTLEN  = 10.
      L_FIELDCAT-COLTEXT  = TEXT-002.
      APPEND L_FIELDCAT TO T_FIELDCAT.
    Defining the dynamic table.
    This table will hold the final data that needs to be displayed. To declare the table the following things need to be done.
    Declare a field symbol
    Displaying Alv List
    This is done in the same way as we do for normal Alv. Call function “REUSE_ALV_GRID_DISPLAY” and pass the field catalog table in the export parameters and the dynamic table in Tables.
    Reward Points if it is helpful.
    Reagrds,
    Kiran I

  • Display latest instance of Crystal Reports in SharePoint 2010

    Dear Sirs,
    I have BO 4.0 and SharePoint 2010 and Integration Option.
    I need to display latest instance of Crystal Reports in SharePoint webpart.
    I'd like to add "IOMS-Crystal Report Viewer" Web Part and display latest instance.
    But in Settings (in SAPBusinessObjects tab) I need to type only CUID.
    Is it possible to display latest instance of Crystal report in SharePoint Web Part?
    Best regards,
    Emmo

    Dear Sirs,
    I have BO 4.0 and SharePoint 2010 and Integration Option.
    I need to display latest instance of Crystal Reports in SharePoint webpart.
    I'd like to add "IOMS-Crystal Report Viewer" Web Part and display latest instance.
    But in Settings (in SAPBusinessObjects tab) I need to type only CUID.
    Is it possible to display latest instance of Crystal report in SharePoint Web Part?
    Best regards,
    Emmo

  • Problems using Dynamic parameters with Crystal Reports and SBO 8.8

    Has anyone been able to successfully use a dynamic parameter in Crystal Reports with 8.8 using the Business One connector? When we try we get an additional logon to the database that pops up and the logon fails.
    We need this because we want to return live lists of PO documents from the server for selection. We are also trying to use nested dynamic parameters, because we want to first return the PO document based on the PO number, and then chose specific rows based on a field value in POR1.
    It works if we don't use the Business One connector, but then the report doesn't function properly inside of SAP.
    Any ideas would be appreciated.

    I have tried using tokens but they are too simple. I need something like a subselect where you first select one value and then another that is a subset of those values. Apparently the tokens can't even use a "where" clause.
    SAP dances around Dynamic parameters, but won't come out and say that they can't be used with the B1 connector. If that is the case then they should just say so and stop wasting our time. Apparently Crystal is not truely interfaced with B1, just sort of hanging out with it.
    I don't really care other than I have to do this select, subselect. If someone has a way to do that with tokens I would love to hear it.
    Thanks,
    Roy

  • Displaying dynamic columns in the query output.

    Hello,
    Depending on current quarter output of the query would vary.
    If current quarter is 'Q1'
    O/p : InvQ1  Del  BackQ1  BackQ2  BackQ3  BackQ4
    If current quarter is 'Q2'
    O/p : InvQ1  InvQ2  Del  BackQ2  BackQ3  BackQ4
    If current quarter is 'Q3'
    O/p : InvQ1  InvQ2  InvQ3  Del  BackQ3  BackQ4
    If current quarter is 'Q4'
    O/p : InvQ1  InvQ2  InvQ3  InvQ4  Del  BackQ4
    So, out of 9 columns, 6 columns would display at any given time depending on the current quarter.
    Invoice of 4 quarters, Deliquency and Backlog of 4 quarters.
    I am not getting any way how to display dynamic columns or hide unwanted/blank columns.
    For the time being I have added all 9 columns in the query, and in the output unwanted columns shows blank.
    Can anybody please suggest me how to display only 6 columns in the output depending on current quarter.
    Thanks and Regards
    Shilpa

    Hello,
    This shouldn't be too difficult. Assuming you have a variable with the selected quarter, you may choose to display Inv (whatever that is) for quarters 1 through variable, Del, and Back for quarters variable through 4. You also need a drilldown on quarter in the columns (after the key figure structure). You would probably need to restrict 'Del' on the variable as well if you haven't already done it.
    Best regards,
    Christoffer

  • How to display dynamic column added by vo.addDynamicAttribute in jspx?

    Hi,
    I met problem when programmatically add cloumn and display it on screen. Here are my steps:
    0. define a ViewObject using xml. Define a transient column Addtion2. later will add a dynamic column Addtion3, but not defined here.
    1. Implement Application Module, adding a method init() and expose it to client.
    2. In init() method, get target VO and use vo.addDynamicAttribute("Addition3"). Then iterate it use row.setAttribute("Addition3", Math.random()). Add init() to page binding and invoke it.( it's invoked )
    3. In jspx, use dynamic table. But Addition3 never shows up.
    This is my last question: Re: How to display dynamic column added by vo.addDynamicAttribute in jspx? People say I should use dynamic table.
    please have a look at my code:
    Application Module: when it runs, it will print 6 coulmns. vo.getAttributeCount() is <font color="red">6</font>.
    <pre>
    public void init() {
    ViewObject vo = this.getCountryView1();
    if (vo.getAttributeIndexOf("Addition3") == -1) {
    vo.addDynamicAttribute("Addition3");
    vo.executeQuery();
    for (AttributeDef deft : vo.getAttributeDefs()) {
    System.out.println(deft.getColumnName() + ": " + deft.getName());
    RowSetIterator it = vo.createRowSetIterator("i1");
    while (it.hasNext()) {
    Row r = it.next();
    r.setAttribute("Addition2", Math.random());
    r.setAttribute("Addition3", Math.random());
    it.closeRowSetIterator();
    for (AttributeDef deft : vo.getAttributeDefs()) {
    System.out.println(deft.getColumnName() + ": " + deft.getName());
    System.out.println(vo.getAttributeCount()); //vo.getAttributeCount() is 6
    </pre>
    jspx: when it runs, only 5 columns are shown. Column Addition2's values are set as expected. but Column Addition3 never shows up. And #{bindings.CountryView1.attributeCount} shows <font color="red">5</font>.
    <pre>
    <af:table rows="#{bindings.CountryView1.rangeSize}"
    fetchSize="#{bindings.CountryView1.rangeSize}"
    emptyText="#{bindings.CountryView1.viewable ? 'No data to display.' : 'Access Denied.'}"
    var="row" rowBandingInterval="0"
    value="#{bindings.CountryView1.collectionModel}"
    selectedRowKeys="#{bindings.CountryView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.CountryView1.collectionModel.makeCurrent}"
    rowSelection="single" id="t1">
    <af:forEach items="#{bindings.CountryView1.attributeDefs}" var="def">
    <af:column headerText="#{def.name}"
    sortable="true" sortProperty="#{def.name}" id="c1">
    <af:outputText value="#{row[def.name]}" id="ot1"/>
    </af:column>
    </af:forEach>
    </af:table>
    <af:forEach items="#{bindings.CountryView1.attributeDefs}" var="def">
    <af:outputText value="#{def.name}" id="ot2"/>
    </af:forEach>
    <af:outputText value="#{bindings.CountryView1.attributeCount}" id="ot3"/>
    </pre>
    it's quite weird for me. The vo.getAttributeCount() is 6, but #{bindings.CountryView1.attributeCount} shows 5. And column Addtion3 never shows up.
    what's the matter? How can I show the dynamic added column Addtion3?
    Edited by: simon li on 2012-9-10 下午7:31
    Edited by: simon li on 2012-9-10 下午8:00

    Hi,
    Can you check the tree binding (CountryView1 - in the pagedef) and see it has the 5 attributes hardcoded in it. If yes, try removing everything and then run the page to see if it works fine.
    -Arun

  • Dynamic images in crystal reports for VS 2008

    The company logo scenario. The solution I'm trying unsuccessfully to implement entails:
    - the logo is not stored in the database, but resides locally on disk
    - strongly typed dataset generated by stored proc in sql server 2008
    - column defined in a dataset table as sqldatatype.binary, null value
    - populate dataset in .net by calling the proc
    - edit the byte[] column and replace null with a binary image
    - push the data into the report
    - print the report to pdf from a web application
    Everything works fine, no errors, but if I try and display the blob in the crystal report, nothing prints. If I remove the blob without modifying any of the above code, everything prints (all tables/rows).
    I have tried cloning the dataset and substituting the binary file into the appropriate column, thinking that the original might be READONLY, but the same result (prints perfectly if I don't try and show the blob).
    Robert

    Hi Don,
    I have read your response 10 times, but I don't really understand it.
    "Your only option is to use the Insert OLE Object or picture into the report" - fine, but how is this achieved from a dataset?
    "CR will not display BLOB fields as pictures" - fine, but maybe I used the word BLOB badly. The dataset column datatype is "byte[]". Will CR display byte[] columns as pictures?
    "You can use a database field to point to which picture file to use, then you won't be using up valuable memory space importing the images into your data set. And the Logo's now dynamic...." - this seems to suggest that the database field is a string storing the file location on disk. Yes? I don't care about memory space in this case and I'm happy to load a binary file into a byte[] column if there is a way of displaying it.
    So, if I understand correctly, you're suggesting the dataset contain a table.row.column which stores the filelocation. How do I convert that to display as a picture (dynamically)?
    Robert

  • Dynamic Images in Crystal Reports

    I have a report with Dynamic Images. I am able to run the report but once I try to export it or try to browse through the pages I get the following error:
    Application popup: Crystal Reports - [Inventory Graphics Report.rpt]: crw32.exe - Application Error : The exception Integer division by zero.
    (0xc0000094) occurred in the application at location 0x2c03a410.

    Hi Don,
    I have read your response 10 times, but I don't really understand it.
    "Your only option is to use the Insert OLE Object or picture into the report" - fine, but how is this achieved from a dataset?
    "CR will not display BLOB fields as pictures" - fine, but maybe I used the word BLOB badly. The dataset column datatype is "byte[]". Will CR display byte[] columns as pictures?
    "You can use a database field to point to which picture file to use, then you won't be using up valuable memory space importing the images into your data set. And the Logo's now dynamic...." - this seems to suggest that the database field is a string storing the file location on disk. Yes? I don't care about memory space in this case and I'm happy to load a binary file into a byte[] column if there is a way of displaying it.
    So, if I understand correctly, you're suggesting the dataset contain a table.row.column which stores the filelocation. How do I convert that to display as a picture (dynamically)?
    Robert

  • Unable to view Dynamic Prompts in Crystal Reports through JSP

    Hi,
    We are using Crystal Reports, SQL Server and Java in our application. We are using JSP to access Crystal Reports from another machine, get them as "ReportClientDocument" objects and then display them using "CrystalReportInteractiveViewer" object. We are able to view reports with Static Paramter values, but when we try to access reports with Dynamic Parameter values the parameter fields are not visible. It doesn't show any error but we can't see the parameter values.
    Any help in this regard will be great. Thanks in advance.

    Hi Ted,
    We are using the JAVA SDK to fetch the report. These are the steps we do using java.
    - Log in to the Crystal Enterprise
    - Get the Report Application Factory from Crystal Enterprise
    - Get the InfoStore service from Crystal Enterprise
    - Retrieve the report by name from Crystal Enterprise
    - Open the report in a ReportClientDocument
    - Instantiate a CrystalReportInteractiveViewer
    - Get the report source from the ReportClientDocument and set it as source for the CrystalReportInteractiveViewer
    - Process the HTTP request to view the report
    Please let me know if you need any further info.

  • How to Print a report with 50 columns. Crystal Reports

    Dear Experts,
    I'm Using Crystal Reports 2008. I have a requirement that 50 columns should be placed in a  Single Report with single line . But Page size should be A4 ( While Printing).
    With Page Size A4 I'm able to place 5 columns.
    Is there any possibility to acheave this no matter if number of opages increases
    I Appreciate for the help in this regard.
    But I need to display all the 50 fields (columns) in a single report.
    I Achieved this by changing horizontal width to 70.
    I can Place all the fields in one line.
    But my concern is to print this report in A4 Paper I think its horizontal width will be 11.  from crystal reports itself
    I don't want to use cross tabs nor even use sql expression. Its just a simple display report for all the employees.
    is there any simple way out to Achieve this by paging... or any other method.
    Any help regarding this issue will be appreciated.
    Thanks

    Hi:
       I'm not a expert in crystal report, but I would like help you,  i don't understand if must to show 50 diferrents fields in your report  or same field through 50 columns ?  for exemple:
    first case: You ned diferents fields
    F1                F2                 F3                 ... F50
    item1  F1      Item1 F2         Item1 F3       Item F50
    item2  F1      Ite21 F2         Item2 F3       Item F50
    In this case you must put the 50 fields in the report, just enough small to fit page
    second case: You nedd the same field in 50 columns
    Colum 1      Colum2      Column 50
    item 0          item 11      item 490
    item 1          item 12      item 491
    item 2          item 13      item492
    item 10       item 20      item 500
    inm this case i haven't idea how to make it (sorry)
    Edited by: Wgramirez on May 29, 2010 7:01 PM

  • Dynamic publishing of crystal report in portal.

    Hi All,
    My understanding of publishing Crystal Report in portal is using the URL iview, is my understanding correct.
    I have checked this in [Integration of BOE XI3.1 into the SAP Enterprise Portal 7.x|http://wiki.sdn.sap.com/wiki/display/BOBJ/IntegrationofBOEXI3.1intotheSAPEnterprisePortal+7.x] wiki
    and my question is, when publishing the crystal report from Crystal Report Designer, it is published in BI via the bw publisher and saved under some BW role. Is it possible to display the saved report in portal with out creating the url iview as an object of pcd in portal, i mean the report which is saved under BW role needs to be displayed dynamically in portal with out iview creation. Is this possible.
    Can someone comment on this.
    Many Thanks,
    Ansar

    Hi Ansar,
    The Crystal reports can be used for publishinh good quality gralha and charts through BW. though making a URL iView is not the only option.
    Good examples of Crystal report usage have been explained in the link below:
    [Crystal Report with BW|http://www.bi-expertonline.com/article.cfm?id=3666]
    Regards,
    Shailesh

  • Variable Text not working as dynamic header in Crystal report

    Dear Experts,
    I'm working Crystal report that connected to Query BEX SAP BW trough SAP integration kit,
    currently i have case that need report dynamic header using variable text from BEX query, but seem the variable text not working in Crystal reports. the header in Crystal report shown as Desription\technical name, not result from the variable text in Query BEX in SAP.
    In https://wiki.sdn.sap.com/wiki/display/BOBJ/Crystal%20Reports%20and%20BW%20query%20elements stated that the "Text variable" with "replacement path" is supported, but i don't know in my query is not working.
    i already set in Database -> options->  table and fields -> Show Both, but the text variable still not working.
    can you help me
    Crystal Reports 2008 12.2.0.290
    SAP Integration KIT 12.1.0.890
    Thanks
    Luqman

    Post your question BEX and B1 and classic SAP data source issues to the Integration Kit forum

  • Dynamic columns in ALV report

    halo fellow SAPiens,
    i need to show dynamic columns for a particular material........the scenario is as follows....
    1) there r 7 fixed columns describing the material...
    2)when the material returns back to the plant for some reason , i need to insert a column which shows the date and reason(char) of return.
    3)again after dispatching the material for some reason it comes back again a new column shld be displayed showin the date and reason(char).
    4)if the material doesnt come back...the report shows only 7 columns.
    any solution?

    try <a href="http://www.alvrobot.com.ar/home.php">here</a>  ......its a useful tool for dealing with ALV
    <b>reward points if useful</b>

  • Display HTML code in Crystal Reports

    We have a field in the database in which the data is encoded HTML, it includes links to images.  I have tried to use the RTF/HTML interpretation option for the field but it doesn't work.  I saw on the other thread that there's limitation to displaying HTML - I am using Cyrstal Reports XI.  So the crysal can't understand img tags correct?  I am allowing users to do just about anything with HTML so it's hard to find a workaround if the we have to limit the tags.  Would this issue be fixed in the future?  Any piece of advice how to handle this would be great!
    Thanks.

    Hi Pizzaz,
    The HTML tags that are supported by Crystal Reports are:
    " html
    " body
    " div (causes a paragraph break)
    " tr (causes only a paragraph break; does not
    preserve column structure of a table)
    " span
    " font
    " p (causes a paragraph break)
    " br (causes a paragraph break)
    " h1 (causes a paragraph break, makes the font bold
    & twice default size)
    " h2 (causes a paragraph break, makes the font bold
    & 1.5 times default size)
    " h3 (causes a paragraph break, makes the font bold
    & 9/8 default size)
    " h4 (causes a paragraph break, makes the font bold)
    " h5 (causes a paragraph break, makes the font bold
    & 5/6 default size)
    " h6 (causes a paragraph break, makes the font bold
    & 5/8 default size)
    " center
    " big (increases font size by 2 points)
    " small (decreases font size by 2 points if it's 8
    points or larger)
    " b
    " i
    " s
    " strike
    " u
    And the supported HTML attributes are:
    " align
    " face
    " size
    " color
    " style
    " font-family
    " font-size
    " font-style
    " font-weight
    Hope this helps you!
    Regards,
    Anindita

  • To increase dynamically columns in ALV report

    hi everyone,
    Could any one give me a sample code ,to increase columns in ALV report output dynamically as record increase, i need to increase columns so that i can keep all the years data of a particular project in one row

    Please refer to the code piece
    *& Report  ZTEST_DYNAMIC_ALV
    REPORT  ztest_dynamic_alv.
    DATA: gt_fcat TYPE lvc_t_fcat,
          gw_grid TYPE REF TO cl_gui_alv_grid.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
    PARAMETERS: p_number TYPE i.
    SELECTION-SCREEN : END OF BLOCK b1.
    ** Start of Selection
    START-OF-SELECTION.
    *1) Create Base Catalog
      PERFORM sub_create_base_catalog.
    *2) Add additional fields
      PERFORM sub_fill_addtional.
    *3) Display output data.
      PERFORM sub_display_output.
    *&      Form  SUB_CREATE_BASE_CATALOG
    *       Create Base catalog for display
    FORM sub_create_base_catalog .
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'ZSTRCT'
        CHANGING
          ct_fieldcat            = gt_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    ENDFORM.                    " SUB_CREATE_BASE_CATALOG
    *&      Form  SUB_FILL_ADDTIONAL
    *       text
    FORM sub_fill_addtional .
      DATA: lw_fcat  TYPE lvc_s_fcat,
            lw_from  TYPE i,
            lw_data  TYPE REF TO data,
            lw_fname TYPE stfna,
            lw_index(2) TYPE n.
      FIELD-SYMBOLS: <l_output> TYPE table.
      DESCRIBE TABLE gt_fcat LINES lw_from.
      DO p_number TIMES.
        lw_from = lw_from + 1.
        lw_index = sy-index.
        CONCATENATE 'DYNA' lw_index INTO lw_fname SEPARATED BY '-'.
        lw_fcat-col_pos = lw_from.
        lw_fcat-fieldname = lw_fname.
        lw_fcat-tabname = '1'.
       lw_fcat-scrtext_l = lw_fcat-scrtext_m = lw_fcat-scrtext_s = lw_fname.
        APPEND lw_fcat TO gt_fcat.
        CLEAR lw_fcat.
      ENDDO.
    ** Convert gt_fcat to internal table.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = gt_fcat
        IMPORTING
          ep_table                  = lw_data
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc = 0.
    ** Create the internal table form field catalog.
        ASSIGN lw_data->* TO <l_output>.
    ** display the ALV data.
        CREATE OBJECT gw_grid
          EXPORTING
            i_parent          = cl_gui_container=>screen0
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5.
        IF sy-subrc = 0.
          CALL METHOD gw_grid->set_table_for_first_display
            CHANGING
              it_outtab                     = <l_output>
              it_fieldcatalog               = gt_fcat
            EXCEPTIONS
              invalid_parameter_combination = 1
              program_error                 = 2
              too_many_lines                = 3
              OTHERS                        = 4.
          IF sy-subrc = 0.
            MESSAGE s000(zrak) WITH p_number 'DISPLAYED DYNAMICALLY'.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " SUB_FILL_ADDTIONAL
    *&      Form  SUB_DISPLAY_OUTPUT
    *       text
    FORM sub_display_output .
      CALL SCREEN '9001'.
    ENDFORM.                    " SUB_DISPLAY_OUTPUT
    *&      Module  STATUS_9001  OUTPUT
    *       text
    MODULE status_9001 OUTPUT.
      SET PF-STATUS ' '.
      SET TITLEBAR 'MAIN00'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
    *       text
    MODULE user_command_9001 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR
             'CANC' OR
             '%EX'.
          SET SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT

Maybe you are looking for

  • Partner Profile error

    Hi XI experts,                    I m working on jdbc to idoc scenario. when i try to create partner profile and save it in my R/3 system i receive this error: "Please enter a valid value for the receive type". Also the "create inbound/outbound param

  • Color shift in Photoshop CS6

    I use Photoshop CS6 which had problems with disappearing icons with Mountain Lion but with Mavericks I cannot achieve the hex color #e4e2c8 (first noticed it with Save for Web) for object or background color - it keeps reverting to hex #dbd9c0. But I

  • Regarding SQL query performance

    Hi, I have two queries and want to check which one would give a better performance. Is there any way other than Explain Plan to do this ?

  • Script(new window)

    hi expects, i want to create a new window in exist form i.e for "P.O" and i want print the company logo in backside. please help me.

  • TV Show shows on AppleTV but not in iTunes library

    I've been adding TV shows from various sources to iTunes for awhile now and watching them on my TV through home sharing to the appleTV. For awhile this has all worked great. However, tonight I've run into a strange issue: On the AppleTV, under the ho