JTable displays only default column headers

Hello,
after a tblModel.setDataVector(dataArray, (Object[])headers) I check the header with a System.out.println(tblModel.getColumnName(0)) and it's correct. But only the capitals A, B, C ... are displayed as headers. I am using a DefaultTableModel. Any associations?
Regards
Joerg

Some code will better demonstrate the problem.
Without a TableColumnModel in the constructor and with table.setAutoCreateColumnsFromModel(true); (default) the headers are painted, but then the CellRenderer won't work.
With a TableColumnModel and table.setAutoCreateColumnsFromModel(false) it's better.
It seems that if you want to use a renderer you have to supply a TableColumnModel as well.
As the TableColumnModel is in fact of no interest to me in this case, I only coded what I thought to be the minimum necessary. But now it has become so little that the headers are not dispayed at all. What is missing?
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
public class TTest extends JFrame
{ JTable table = null;
  public TTest()
  { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(300, 300);
    Container cp = getContentPane();
    int countOfColumns=3;
    String[] headers = {"One","Two","Three"};
    Object[][] dataArray= {{"R1-C1","R1-C2","R1-C3"},
           {"R2-C1","R2-C2","R2-C3"},
           {"R3-C1","R3-C2","R3-C3"}};
    DefaultTableModel tblModel = new DefaultTableModel(20, countOfColumns)
    { // Make read-only
      public boolean isCellEditable(int x, int y)
      { return false;
    createTable(tblModel, 2);
    JScrollPane scrollPane = new JScrollPane(table);
    cp.add(scrollPane, BorderLayout.CENTER);
    System.out.println(tblModel.getColumnName(0));
    tblModel.setDataVector(dataArray, (Object[])headers);
    System.out.println(tblModel.getColumnName(0));
    setVisible(true);
  public void createTable(DefaultTableModel tblModel, int twoColumn)
    DefaultTableColumnModel tblColModel= new DefaultTableColumnModel();
    for (int i=0; i<tblModel.getColumnCount(); i++)
    { tblColModel.addColumn(new TableColumn(i));
    table= new JTable(tblModel, tblColModel);
//    table= new JTable(tblModel);
//  Without the following line the renderer won't work; but now the table headers
//  are no more created automatically.
    table.setAutoCreateColumnsFromModel(false);
    table.getColumnModel().getColumn(twoColumn-1).setCellRenderer
                              (new RightJustCellRenderer());
  class RightJustCellRenderer extends DefaultTableCellRenderer
  { public RightJustCellRenderer()
    { setHorizontalAlignment(SwingConstants.RIGHT);
  public static void main(String args[])
  { new TTest();
}

Similar Messages

  • Display Periods in Column headers for CO-PA report

    SDNers
    I'm trying to create a CO-PA Report with Column headers that are required to be showing Current Period, last period etc until 6 months back.
    I've tried to put in &0FP .. but that only display the Current period/year...
    How do i get the previous periods displayed in the column headers??
    thanks

    hi Sruthi....
    In standard SAP, the only reports which are available are line item reports - KE24 (Actuals) and KE25 (Plan). However, using Report writer / painter we can create reports as per Business requirements.
    Once we create reports as required, we can execute the same using transaction code KE30 (Execute report).
    You can create / change / display COPA reports using transaction codes KE31 / KE32 / KE33 respectively.
    Once again create the new Report and then execute it.....
    http://help.sap.com/saphelp_erp2005/helpdata/en/7a/4c48c64a0111d1894c0000e829fbbd/frameset.htm
    Regards
    Ranjit

  • In the new Numbers, How can I get a 2D stacked column chart to display only 1 column?

    In the new Numbers, How can I get a 2D stacked column chart to display only 1 column?

    This is one of those things that I find really strange about Numbers 3. The control for what you want to do is not where anyone would expect to find it.
    Select the Chart
    Click on Edit Data References
    Look at the bottom left corner of the Numbers window. It should say "Plot Columns as Series" or "Plot Rows as Series"
    Click on it and change it to the other

  • How to display only selected columns in the table on the tableview

    Hi All,
    I am displaying in the below tableview the data from the SFLIGHTS tables in the tableview using flow logic. It displays all the columns in the database table. How can I set in the code to display only selected columns and not all columns.
    Also, in these columns displayed I want to make the key columns of SFLIGHT as non editable and the rest of the columns in SFLIGHT editiable. Can you please kindly share the code to implement this.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "10"
                           selectionMode   = "lineEdit"
                           table           = "<%= flights %>"
                           filter = "SERVER"
                           sort = "server"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks
    Karen

    Hi,
       Please try this code.
    <!-- To display Table control on BSP page with table internal table it_hist  --!>
              <htmlb:tableView id              = "TV_HIST"
                               headerText      = "Previous History"
                               headerVisible   = "TRUE"
                               footerVisible   = "TRUE"
                               design          = "ALTERNATING"
                               selectionMode   = "LINEEDIT"
                               visibleRowCount = "5"
                               fillUpEmptyRows = "TRUE"
                               table           = "<%= it_hist %>"
                               width           = "500" >
    <!--  to show selected columns give required field name --!>
    <htmlb:tableViewColumns>
      <htmlb:tableViewColumn columnName          = "FIELD1"
                                         title               = "COLUMN1"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD2"
                                         title               = "COLUMN2"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD3"
                                         title               = "COLUMN3"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
    <!--  to make column editable set edit property to TRUE --!>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         edit = "TRUE"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
                </htmlb:tableViewColumns>
              </htmlb:tableView>

  • Displaying dates as column headers for BEx Query

    Hi all,
    I have to display dates in sequence as descriptions for 15 columns based on the keyed in date in Bex Query Analyser. I'm able to display date as column heading for one column using text variable with replacement path.I could not able to increment date for other descriptions.Could you please help me to solve this issue.
    Ex: Input Date 05/09/2007 then in the out put column headers should be 0509 0609    0709   ............ 1909
    These are only column headers, values for the columns are quantities calculated using formulas.
    It is urgent.
    Thanks in advance.
    Regards,
    Mandadi.

    hi mandadi,
    if u want dates as headers only then u should use a text variable .
    as a rule u can not set off set for text variable so u create restricted key figure with date restricted and set off set.
    now u use this rkf to populate the text variable using replacement path.
    text variable can use replacement path for replacing from any variable and characteristics.
    bye

  • Web analyzer displaying only 4 columns

    Hi,
    After executing the query in the web analyzer initially it is showing first 4 columns to show the next 4 colomns need ti click next button.then first 4 colomns are disappearing.
    finally we are able to see only 4 columns at all times.
    please provide the solution to display all 12 columns in the web analyzer.
    Thanks,
    Sri

    Dear Sri,
    The following thread is dealing with the same question, the last answer will solve your issue.
    Sizing issue for query runtime in portal
    Best regards,
    Janine

  • Displaying only the column names

    hi there,
    is there any query to fetch only the column names from a table, excluding the datas from that particular column?
    Thanks,
    Balu.

    SQL> select * from dual
      2  where rownum < 1;
    no rows selected                                                                                                                                                                               

  • Display only default user name and password

    Hi all,
    I just want to display the default usernames and passwords. Can i do that?
    Thank you!
    Dan.

    try this,
    SQL> SELECT USERNAME,PASSWORD,CREATED FROM DBA_USERS WHERE CREATED <=( SELECT CREATED from v$database);note:- Some of us who have done more than one CREATE CONTROLFILE and observed what happens know that V$DATABASE.CREATED is not "Creation date of the database".
    It is actually "Creation date of the *controlfile*".
    source:-http://hemantoracledba.blogspot.com/2010/07/vdatabasecreated-is-this-database.html

  • Variable/field value no displayed in query column headers

    Hello to all,
    I have a concern on the column entries for variable values not being displayed. 
    Example.  The column will display &Month& Instead of displaying 08 (August).
    Please help me diagnose on the issue.
    Thanks.
    -Patvin

    patvin,
    unfortunately no access to messenger:(
    probably it is because you are in display and not in change mode.
    Of course, you should only change to 'Change' mode if you are in development system. changing in production is not the best idea.
    so first try to set the view mode to "Change". the sixth Icon from right (glasses / pencil)

  • Customized CQWP display only multiple columns after migration to 2013 when source is a list.

    If I select Show items from all sites in this site collection or Show items from the following site and all subsites as Query source all my custom columns are with out value, if I select Show items from the following list every thing is as it should be.
    (Se picture)
    This is show multiple columns values correctly:
    <webParts>
      <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
        <metaData>
          <type name="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
          <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
        </metaData>
        <data>
          <properties>
            <property name="Filter1ChainingOperator" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterChainingOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">And</property>
            <property name="FilterOperator1" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">Eq</property>
            <property name="Direction" type="direction">NotSet</property>
            <property name="FilterOperator3" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">Eq</property>
            <property name="GroupByDirection" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Asc</property>
            <property name="DataSourceID" type="string" />
            <property name="ChromeState" type="chromestate">Normal</property>
            <property name="SystemViewFields" type="string" />
            <property name="ListName" type="string">Document library</property>
            <property name="FilterDisplayValue3" type="string" />
            <property name="FilterDisplayValue2" type="string">5.7.2</property>
            <property name="FilterDisplayValue1" type="string">HCM/Payroll</property>
            <property name="FilterField1" type="string">SectionName</property>
            <property name="Description" type="string">Use to display a dynamic view of content from your site on a web page</property>
            <property name="DataColumnRenames" type="string" />
            <property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
            <property name="PageSize" type="int">-1</property>
            <property name="ViewContentTypeId" type="string" />
            <property name="ParameterBindings" type="string" null="true" />
            <property name="HelpUrl" type="string" />
            <property name="AdditionalFilterFields" type="string" />
            <property name="DataMappingViewFields" type="string">{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;</property>
            <property name="Title" type="string">Prod CQWP</property>
            <property name="FeedDescription" type="string" />
            <property name="UseCache" type="bool">True</property>
            <property name="XslLink" type="string" null="true" />
            <property name="AutoRefresh" type="bool">False</property>
            <property name="Filter1IsCustomValue" type="bool">False</property>
            <property name="FireInitialRow" type="bool">True</property>
            <property name="FilterValue3" type="string" />
            <property name="SortByFieldType" type="string">DateTime</property>
            <property name="ManualRefresh" type="bool">False</property>
            <property name="HelpMode" type="helpmode">Modeless</property>
            <property name="AllowConnect" type="bool">True</property>
            <property name="ItemStyle" type="string">DesignDocumentsTest</property>
            <property name="SampleData" type="string">&lt;dsQueryResponse&gt;
                        &lt;Rows&gt;
                            &lt;Row Title="Item 1" LinkUrl="http://Item1" Group="Group Header" __begincolumn="True"
    __begingroup="True" /&gt;
                            &lt;Row Title="Item 2" LinkUrl="http://Item2" __begincolumn="False" __begingroup="False"
    /&gt;
                            &lt;Row Title="Item 3" LinkUrl="http://Item3" __begincolumn="False" __begingroup="False"
    /&gt;
                        &lt;/Rows&gt;
                        &lt;/dsQueryResponse&gt;</property>
            <property name="FilterIncludeChildren2" type="bool">False</property>
            <property name="XmlDefinitionLink" type="string" />
            <property name="ServerTemplate" type="string">101</property>
            <property name="TitleUrl" type="string" />
            <property name="CommonViewFields" type="string">Title,Text;Product_x0020_Name,Choice;Areabranch,Choice;ProdcutDesignDocCategory,Choice;User_x0020_Story,Text;Status,Choice</property>
            <property name="QueryOverride" type="string" />
            <property name="DataSourcesString" type="string" />
            <property name="DisplayName" type="string" />
            <property name="ListGuid" type="string">ce5f8d8e-6ab9-4ed1-8c10-557362473348</property>
            <property name="DataFields" type="string" />
            <property name="ShowWithSampleData" type="bool">False</property>
            <property name="GroupByFieldType" type="string">Choice</property>
            <property name="Default" type="string" />
            <property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">None</property>
            <property name="ContentTypeBeginsWithId" type="string">0x010100634C5EFE866C834E92467F3F8D9C37C7080401</property>
            <property name="AllowHide" type="bool">True</property>
            <property name="FeedEnabled" type="bool">False</property>
            <property name="SortBy" type="string">Modified</property>
            <property name="FilterByContextTerm" type="bool">False</property>
            <property name="TitleIconImageUrl" type="string" />
            <property name="PlayMediaInBrowser" type="bool">True</property>
            <property name="ViewFlag" type="string">0</property>
            <property name="Xsl" type="string">&lt;xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:cmswrt="http://schemas.microsoft.com/WebPart/v3/Publishing/runtime" exclude-result-prefixes="xsl cmswrt x" &gt; &lt;xsl:import href="/Style Library/XSL Style Sheets/Header.xsl" /&gt; &lt;xsl:import href="/Style
    Library/XSL Style Sheets/ItemStyle.xsl" /&gt; &lt;xsl:import href="/Style Library/XSL Style Sheets/ContentQueryMain.xsl" /&gt; &lt;/xsl:stylesheet&gt;</property>
            <property name="FilterField2" type="string">Product_x0020_Version</property>
            <property name="ChromeType" type="chrometype">TitleOnly</property>
            <property name="CacheXslTimeOut" type="int">86400</property>
            <property name="AdditionalGroupAndSortFields" type="string" />
            <property name="UseSQLDataSourcePaging" type="bool">True</property>
            <property name="Height" type="string" />
            <property name="DataMappings" type="string">User_x005F_x0020_Story:|LinkUrl:|Description:|OpenInNewWindow:|Product_x005F_x0020_Name:|Areabranch:|ImageUrl:|Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|LinkToolTip:|ProdcutDesignDocCategory:|Status:|SipAddress:|</property>
            <property name="ListUrl" type="string" null="true" />
            <property name="ShowUntargetedItems" type="bool">False</property>
            <property name="AllowMinimize" type="bool">True</property>
            <property name="GroupBy" type="string">Areabranch</property>
            <property name="FilterIncludeChildren1" type="bool">False</property>
            <property name="BaseType" type="string" />
            <property name="MainXslLink" type="string" />
            <property name="AsyncRefresh" type="bool">False</property>
            <property name="FilterValue1" type="string">HCM/Payroll</property>
            <property name="FilterValue2" type="string">5.7.2</property>
            <property name="InitialAsyncDataFetch" type="bool">False</property>
            <property name="AutoRefreshInterval" type="int">60</property>
            <property name="Filter3IsCustomValue" type="bool">False</property>
            <property name="GroupStyle" type="string">Band</property>
            <property name="AllowZoneChange" type="bool">True</property>
            <property name="FilterIncludeChildren3" type="bool">False</property>
            <property name="EnableOriginalValue" type="bool">False</property>
            <property name="ItemLimit" type="int">3</property>
            <property name="FilterType1" type="string">Choice</property>
            <property name="UseCopyUtil" type="bool">True</property>
            <property name="FilterType3" type="string" />
            <property name="FilterType2" type="string">Choice</property>
            <property name="FilterOperator2" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">Eq</property>
            <property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
            <property name="FilterByAudience" type="bool">False</property>
            <property name="ItemXslLink" type="string" />
            <property name="Hidden" type="bool">False</property>
            <property name="WebUrl" type="string">~sitecollection/ProductDevelopment/HCMPayroll/HRMSproject572</property>
            <property name="HeaderXslLink" type="string" />
            <property name="CacheXslStorage" type="bool">True</property>
            <property name="ListsOverride" type="string" />
            <property name="SortByDirection" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Asc</property>
            <property name="Filter2IsCustomValue" type="bool">False</property>
            <property name="AllowEdit" type="bool">True</property>
            <property name="FeedTitle" type="string" />
            <property name="FilterField3" type="string" />
            <property name="MediaPlayerStyleSource" type="string" null="true" />
            <property name="DisplayColumns" type="int">2</property>
            <property name="Filter2ChainingOperator" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterChainingOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">And</property>
            <property name="XmlDefinition" type="string" />
            <property name="WebsOverride" type="string" />
            <property name="AllowClose" type="bool">True</property>
            <property name="ContentTypeName" type="string" />
            <property name="ListId" type="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">00000000-0000-0000-0000-000000000000</property>
            <property name="ExportMode" type="exportmode">All</property>
            <property name="NoDefaultStyle" type="string" null="true" />
            <property name="ViewFieldsOverride" type="string" />
            <property name="CatalogIconImageUrl" type="string" />
            <property name="ListDisplayName" type="string" null="true" />
            <property name="Width" type="string" />
          </properties>
        </data>
      </webPart>
    </webParts><label for="ctl00_MSOTlPn_EditorZone_Edit0g_789619b5_3406_469e_8b24_fc42ff130ea0_CBQToolPartshowItemsFromListRadioButton"></label>
    This is with missing columns values
    <webParts>
      <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
        <metaData>
          <type name="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
          <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
        </metaData>
        <data>
          <properties>
            <property name="Filter1ChainingOperator" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterChainingOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">And</property>
            <property name="FilterOperator1" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">Eq</property>
            <property name="Direction" type="direction">NotSet</property>
            <property name="FilterOperator3" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">Eq</property>
            <property name="GroupByDirection" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Asc</property>
            <property name="DataSourceID" type="string" />
            <property name="ChromeState" type="chromestate">Normal</property>
            <property name="SystemViewFields" type="string" />
            <property name="ListName" type="string" />
            <property name="FilterDisplayValue3" type="string" />
            <property name="FilterDisplayValue2" type="string">5.7.2</property>
            <property name="FilterDisplayValue1" type="string">HCM/Payroll</property>
            <property name="FilterField1" type="string">{a10809c0-a375-4279-ade5-2603dbdcd7e9}</property>
            <property name="Description" type="string">Use to display a dynamic view of content from your site on a web page</property>
            <property name="DataColumnRenames" type="string" />
            <property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
            <property name="PageSize" type="int">-1</property>
            <property name="ViewContentTypeId" type="string" />
            <property name="ParameterBindings" type="string" null="true" />
            <property name="HelpUrl" type="string" />
            <property name="AdditionalFilterFields" type="string" />
            <property name="DataMappingViewFields" type="string">{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Text;</property>
            <property name="Title" type="string">Prod 1 Lib CQWP</property>
            <property name="FeedDescription" type="string" />
            <property name="UseCache" type="bool">True</property>
            <property name="XslLink" type="string" null="true" />
            <property name="AutoRefresh" type="bool">False</property>
            <property name="Filter1IsCustomValue" type="bool">False</property>
            <property name="FireInitialRow" type="bool">True</property>
            <property name="FilterValue3" type="string" />
            <property name="SortByFieldType" type="string">DateTime</property>
            <property name="ManualRefresh" type="bool">False</property>
            <property name="HelpMode" type="helpmode">Modeless</property>
            <property name="AllowConnect" type="bool">True</property>
            <property name="ItemStyle" type="string">RDDesignDocuments</property>
            <property name="SampleData" type="string">&lt;dsQueryResponse&gt;
                        &lt;Rows&gt;
                            &lt;Row Title="Item 1" LinkUrl="http://Item1" Group="Group Header" __begincolumn="True"
    __begingroup="True" /&gt;
                            &lt;Row Title="Item 2" LinkUrl="http://Item2" __begincolumn="False" __begingroup="False"
    /&gt;
                            &lt;Row Title="Item 3" LinkUrl="http://Item3" __begincolumn="False" __begingroup="False"
    /&gt;
                        &lt;/Rows&gt;
                        &lt;/dsQueryResponse&gt;</property>
            <property name="FilterIncludeChildren2" type="bool">False</property>
            <property name="XmlDefinitionLink" type="string" />
            <property name="ServerTemplate" type="string">101</property>
            <property name="TitleUrl" type="string" />
            <property name="CommonViewFields" type="string">Title,Text;Product_x0020_Name,Choice;Areabranch,Choice;ProdcutDesignDocCategory,Choice;User_x0020_Story,Text;Status,Choice</property>
            <property name="QueryOverride" type="string" />
            <property name="DataSourcesString" type="string" />
            <property name="DisplayName" type="string" />
            <property name="ListGuid" type="string" />
            <property name="DataFields" type="string" />
            <property name="ShowWithSampleData" type="bool">False</property>
            <property name="GroupByFieldType" type="string">Text</property>
            <property name="Default" type="string" />
            <property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">None</property>
            <property name="ContentTypeBeginsWithId" type="string">0x010100634C5EFE866C834E92467F3F8D9C37C7080401</property>
            <property name="AllowHide" type="bool">True</property>
            <property name="FeedEnabled" type="bool">False</property>
            <property name="SortBy" type="string">{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}</property>
            <property name="FilterByContextTerm" type="bool">False</property>
            <property name="TitleIconImageUrl" type="string" />
            <property name="PlayMediaInBrowser" type="bool">True</property>
            <property name="ViewFlag" type="string">0</property>
            <property name="Xsl" type="string">&lt;xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:cmswrt="http://schemas.microsoft.com/WebPart/v3/Publishing/runtime" exclude-result-prefixes="xsl cmswrt x" &gt; &lt;xsl:import href="/Style Library/XSL Style Sheets/Header.xsl" /&gt; &lt;xsl:import href="/Style
    Library/XSL Style Sheets/ItemStyle.xsl" /&gt; &lt;xsl:import href="/Style Library/XSL Style Sheets/ContentQueryMain.xsl" /&gt; &lt;/xsl:stylesheet&gt;</property>
            <property name="FilterField2" type="string">{d51bf689-5b9f-454b-9d6a-4e2c375ec3fe}</property>
            <property name="ChromeType" type="chrometype">TitleOnly</property>
            <property name="CacheXslTimeOut" type="int">86400</property>
            <property name="AdditionalGroupAndSortFields" type="string" />
            <property name="UseSQLDataSourcePaging" type="bool">True</property>
            <property name="Height" type="string" />
            <property name="DataMappings" type="string">User_x005F_x0020_Story:|LinkUrl:|Description:|OpenInNewWindow:|Product_x005F_x0020_Name:|Areabranch:|ImageUrl:|Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|LinkToolTip:|ProdcutDesignDocCategory:|Status:|SipAddress:|</property>
            <property name="ListUrl" type="string" null="true" />
            <property name="ShowUntargetedItems" type="bool">False</property>
            <property name="AllowMinimize" type="bool">True</property>
            <property name="GroupBy" type="string">{5c67db99-375a-4afa-a1b0-16f2aac40bb8}</property>
            <property name="FilterIncludeChildren1" type="bool">False</property>
            <property name="BaseType" type="string" />
            <property name="MainXslLink" type="string" />
            <property name="AsyncRefresh" type="bool">False</property>
            <property name="FilterValue1" type="string">HCM/Payroll</property>
            <property name="FilterValue2" type="string">5.7.2</property>
            <property name="InitialAsyncDataFetch" type="bool">False</property>
            <property name="AutoRefreshInterval" type="int">60</property>
            <property name="Filter3IsCustomValue" type="bool">False</property>
            <property name="GroupStyle" type="string">Band</property>
            <property name="AllowZoneChange" type="bool">True</property>
            <property name="FilterIncludeChildren3" type="bool">False</property>
            <property name="EnableOriginalValue" type="bool">False</property>
            <property name="ItemLimit" type="int">3</property>
            <property name="FilterType1" type="string">Text</property>
            <property name="UseCopyUtil" type="bool">True</property>
            <property name="FilterType3" type="string" />
            <property name="FilterType2" type="string">Text</property>
            <property name="FilterOperator2" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">Eq</property>
            <property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
            <property name="FilterByAudience" type="bool">False</property>
            <property name="ItemXslLink" type="string" />
            <property name="Hidden" type="bool">False</property>
            <property name="WebUrl" type="string" />
            <property name="HeaderXslLink" type="string" />
            <property name="CacheXslStorage" type="bool">True</property>
            <property name="ListsOverride" type="string" />
            <property name="SortByDirection" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Asc</property>
            <property name="Filter2IsCustomValue" type="bool">False</property>
            <property name="AllowEdit" type="bool">True</property>
            <property name="FeedTitle" type="string" />
            <property name="FilterField3" type="string" />
            <property name="MediaPlayerStyleSource" type="string" null="true" />
            <property name="DisplayColumns" type="int">2</property>
            <property name="Filter2ChainingOperator" type="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterChainingOperator, Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c">Or</property>
            <property name="XmlDefinition" type="string" />
            <property name="WebsOverride" type="string" />
            <property name="AllowClose" type="bool">True</property>
            <property name="ContentTypeName" type="string" />
            <property name="ListId" type="System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">00000000-0000-0000-0000-000000000000</property>
            <property name="ExportMode" type="exportmode">All</property>
            <property name="NoDefaultStyle" type="string" null="true" />
            <property name="ViewFieldsOverride" type="string" />
            <property name="CatalogIconImageUrl" type="string" />
            <property name="ListDisplayName" type="string" null="true" />
            <property name="Width" type="string" />
          </properties>
        </data>
      </webPart>
    </webParts>
    <label for="ctl00_MSOTlPn_EditorZone_Edit0g_789619b5_3406_469e_8b24_fc42ff130ea0_CBQToolPartshowItemsFromListRadioButton"></label>
    <label for="ctl00_MSOTlPn_EditorZone_Edit0g_789619b5_3406_469e_8b24_fc42ff130ea0_CBQToolPartshowItemsFromListRadioButton"></label>

    Hi, 
    may i know how many items that you have that CQWP filter for?
    because as i remember there should be a limitation on the items number.
    http://technet.microsoft.com/en-us/library/cc262813(v=office.14).aspx
    http://office.microsoft.com/en-us/sharepoint-foundation-help/manage-lists-and-libraries-with-many-items-HA010377496.aspx
    you can try to upsize the threshold but it will affect your environment's performance.
    http://blogs.msdn.com/b/dinaayoub/archive/2010/04/22/sharepoint-2010-how-to-change-the-list-view-threshold.aspx
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • JTable update, column headers

    I am trying to write my own tablemodel which does not change the specified
    column widths when updating. So far everthing works fine, only the column
    headers are not repainted. Does anybody know what is missing?
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class UpdateTable
    { static String headers[]= {"Baum", "Blatt", "Frucht","H�usigkeit"};;
      static String data[][]= {
         {"Eiche", "gez�hnt","Eichel","ein"},
         {"Buche", "glatt", "Buchecker","ein"},
         {"Tanne", "Nadel", "Zapfen","ein"},
         {"Pappel", "wechselst�ndig","Kapsel","zwei"},
      static MyTableModel tblModel;
      static JTable table;
      public UpdateTable()
      { JFrame frame = new JFrame("UpdateTable");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container contentPane = frame.getContentPane();
        tblModel = new MyTableModel(data, headers)
        { // Make read-only
          public boolean isCellEditable(int x, int y)
          { return false;
        table = new JTable(tblModel);
        table.getColumnModel().getColumn(1).setPreferredWidth(200);
        table.getColumnModel().getColumn(3).setPreferredWidth(20);
          // Set selection to first row
        ListSelectionModel selectionModel = table.getSelectionModel();
        selectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        selectionModel.addListSelectionListener (new ListSelectionListener()
        { public void valueChanged(javax.swing.event.ListSelectionEvent e)
            if (e.getValueIsAdjusting()) return;
                System.out.println(table.getSelectedRow());
          // Add to screen so scrollable
        JScrollPane scrollPane = new JScrollPane (table);
        contentPane.add(scrollPane, BorderLayout.CENTER);
        frame.setSize(500, 100);
        frame.setVisible(true);
      public static void main(String args[])
      { new UpdateTable();
        try
        { Thread.sleep(3000);
        catch (InterruptedException e)
        { System.out.println ("Fehler: "+ e.toString());
        String headers_neu[] = {"Arbre", "Feuille", "Fruit", "Maisonette"};
        headers = headers_neu;
        data[0][0]= "Eberesche";
        tblModel.setDataVector(data, headers);
    //    table.revalidate(); // is of no use.
        table.repaint();
    // The table model
    class MyTableModel extends AbstractTableModel
      private int cols, rows;
      private String[] columnNames;
      private String[][] data;
      public MyTableModel(int cols, int rows)
      { this.cols = cols;
        this.rows = rows;
      public MyTableModel(String[][] data, String[] columnNames)
      { setDataVector(data, columnNames);
      public String getColumnName(int col)
      { return columnNames[col].toString();
      public int getColumnCount()
      { return cols;
      public int getRowCount()
      { return rows;
      public Object getValueAt(int row, int col)
      { return data[row][col];
      public void setDataVector(String[][] data, String[] columnNames)
      { this.cols = data[0].length;
        this.rows = data.length;
        this.data= data;
        this.columnNames= columnNames;
    //    Firing the event will change column widths as usual.
    //    fireTableChanged(new TableModelEvent(this,TableModelEvent.HEADER_ROW););
    }

    // fireTableChanged(new TableModelEvent(this,TableModelEvent.HEADER_ROW););
    You have to fire a table changed event.
    The table neverasks the model if things have changed. The model always notifys the table of changes.
    No event fired no table repaint.
    Instead of fireTableChanged(...) you have the option of fireTableDataChanged() (if only the data has changed, not the nomber of columns or the type of columns) and fireTableStructureChanged() (if there have been columns changed).
    If fireTableStructureChanged happens (and HEADER_ROW event is the same thing), the table removes the columns and creates new onew. That's why column sizes are lost.
    If you really want the table not to manage columns, you have to do it yourself:
    Implement your own TableColumnModel and pass it to the table constructor. When adding/removing columns you can ask what was the size of the previous columns where and set the new columns to that size.
    Call setAutoCreateColumnsFromModel(false) in your table constructor so that the table will not remove/create new columns itself when a tableStructureChanged event happens.

  • Can we display only the required columns dynamically?

    Hi All,
    I have a scenario where in I have 30 columns in the rtf template. All the columns will never be displayed, only a select few will be available for display. So the output file is show blank columns. Now I want to display only the columns which contain data.
    FYI- We cannot know which columns consist data until we run the report.
    Any Advice.
    Thanks in advance.
    Madhav.

    Hi,
    You can use the following:
    Column header:
    <?if@column:/node/child_node="PUBLIC"?>My label<?end if?>
    Column data:
    <?if:/node/child_node="PUBLIC"?>My data<?end if?>
    The @column will tell XMLP wheater or not the column shall be shown.
    I hope this helps you.
    BR Kenneth

  • Column Headers are Jumbled when exporting to 'Excel Data only'

    Hi,
    When I am exporting a report to 'Excel Data only' the column headers are jumbled in the output,where as the data field are exported in the same order as it is in the report .
    They are being exported as
    Header:F3   F2    F1
    Detail   :F1   F2    F3
    Instead of
    Header:F1   F2    F3
    Detail   :F1   F2    F3
    Is there a way I can over come this issue.

    Can you explain how exactly the report was designed? Is it happening for every report or only for this report?
    Regards,
    Raghavendra

  • Assigning Column Headers Dynamically in ALV output

    Hello Experts,
    I have to create dynamic column headers based on the user input on the selection-screen. Basically users enter the period and the ALV output has to create the column headers dynamically for that along with some standard columns.
    For eg, The selection screen is like this:
    From:  'Q4' '2009'
    To      'Q2'  '2011'.
    Then I have to create 12 columns for the months and rest for the Quarters.
    Then the output will be like this:
    Material, Description,10/09, 11/09, 12/09, 01/10, 02/10, 03/10, 04/10, 05/10, 06/10, 07/10, 08/10, 09/10, Q4/10, Q1/11, Q2/11
    I have built the logic to determine the number of colums for the periods based on input.
    By reading other posts, I have learnt that I have to use call method cl_alv_table_create=>create_dynamic_table to get the functionality.
    I have also looked at program BCALV_TABLE_CREATE for some help. It only has column headers in increasing order. But I am not able to understand How to pass the Column Header Label (for eg 10/09 or Q1/10) to the fieldcat dynamically.
    Is there any blog/sample prog close to my req? Can anybody please please help me. I grealy appreciate it.
    Thanks.

    Hi Lope,
    You need to filll column heading based on dynamic internal table column names.
    In your final internal table, you will have some column names like '1009, 1109, 1209' .
    While filling fieldcatalog you need to put your logic for column heading text.
    If column name is 1009, concatenate '10 '  '/'   '09', or calculate the quarter 10 falls into ,and display Q4/09.
    Regards,
    Nisha Vengal.

  • Crystal 11.5 truncating column headers on export to excel

    Hi,
    We are currently (or finally as the case may be) upgrading our reports from Crystal 8.5 to Crystal 11.5 (which I know is a few versions behind but unfortunately the software that we integrate with is only compatible to 11.5).
    However, I've been having a problem exporting to excel.
    The column headers (which can be in a range of report header/page header/group header) are truncating to the the length that they display on the screen before the export.  When I view them in crystal viewer I can see that the entire text field is available.  However this does not flow through to export to excel.
    I have utilised the "Can grow" formatting option however this then creates a merged field up 3 rows high in excel and the report then has problems using excel functions like sort etc. 
    I also attempted to use the data only option which does export the full text in the column names but then I lose the rest of my formatting.
    There were no issues exporting from v8.5
    I have snapped to grid.
    The actual data exports without issue it is only the column headers (text) which pose a problem.
    I am unable to reduce the amount of data that we include in our report to free up space to display the entire text.
    I would prefer to not reduce to a 4pt text size to ensure that it exports correctly as this will have significant impacts for those people who actually export the reports.
    Is anyone able to shed some light on how to resolve this issue?   I've googled and searched these forums extensively but can't quite find a resolution to the issue and would really appreciate any assistance that anyone can offer me. 
    Kind regards
    Janne

    Ian
    It works for me whether my headers are text fields or field headers. Once I export them I expand the columns and set the cells to wrap, and I get the complete contents. Ditto for the fields themselved, and text fields containing data fields.
    I always export excel(97-2003)data only with Column width based on objects in the details & checking   Export object formating, Maintain relative object position, Maintain column alignment, export page header and page footer, Simplify page headers.
    Allow fields to grow is off on everything during exports.
    Note: nearly all my reports are designed in Crystal 2008 without any SQL commands and all exports are done manually. Perhaps it is a XI.5 issue?
    Edited by: Debi Herbert on Oct 5, 2011 10:07 AM

Maybe you are looking for