Unwanted extra column in a cross-tab at run-time

Hi all,
        I have a question about using a cross-tab on a report. I have a web page with the report and for the cross-tab column data I have selected some data from an array I supply to the report.  At run-time, when I call SetDataSource(data) for the report and look at the data there is only 2 items in the array for the column data. When the report is displayed the 2 column names and values from the data appear correctly on the cross-tab but I also have a third column. The third column has no name and has a value of 0.0.
The actual data I am associating with the column is the time member of the CategoryTime[]. Any ideas on what could be causing this?
public class ResourceActivity
        public string resourceName;
        public CategoryTime[] categoryTime;
public class CategoryTime
        public string categoryName;
        public float time;
Thanks in advance for any help
JohnN

John,
It sounds like there might be a null record returned and the crosstab is generating a column for it. You could try suppressing blank columns in the crosstab expert or filter out nulls in the record selection

Similar Messages

  • How to compare 2 columns in a cross tab

    Hi,
    I need some idea on how to compare 2 columns in a cross tab in Deski.
    Original Table is like this:
    Type..............ID...........Name
    Type1............1............BO1
    Type1............2............BO1
    Type1............3............BO2
    Type2............1............BO7
    Type2............2............ --     
    Type2............3............BO5
    I did Slice and dice to the original table and now it looks like a cross tab
    ......................1..............2............3
    Type1.........BO1....... BO1.......BO2
    Type2.........BO7........--     ...........BO5
    Now I want to compare column 1&2, 1&3 and put these values in new columns after column 3 for Type1 & Type2
    Does anyone has any idea on this?
    Thanks,

    1. Right click your table
    2. Select Calculations -> Count
    3. It will insert a new column. Edit this new column formula and substitute it with thos other formula:
    =If ( <Name> Where (<ID>=1)  = <Name> Where (<ID>=2)  ) Then "Column 1 equal to column 2" Else "They're not Equal"
    4.Put this title in that column's header:
    Column 1 vs Column 2
    5. Repeat steps for comparison between 1 and 3, just that this is the formula you have to use:
    =If ( <Name> Where (<ID>=1)  = <Name> Where (<ID>=3)  ) Then "Column 2 equal to column 3" Else "They're not Equal"
    Note: Apply necessary changes depending on what you need.
    Edited by: PadawanGirl on Jul 4, 2011 10:32 PM

  • Can we apply sorting on Column values in Cross tab??

    Can we apply sorting on Column values in Cross tab??
    Following is the scenario with me.
    I have 2 fields and one formula.
    Fields are HostName and Username.
    Formula is status which categorizes the Authorized and Unauthorized events.
    And in the Summary Field, I am calculating the total number of events.
    In cross tab, Fields are marking the Rows of the cross tab and Formula is making the Columns(Authorized and Unauthorized ) of the cross tab.
    Since in cross tab data is grouped from left to right and sorted by default. I want to remove this default sorting and want to put sorting on the formula for Unauthorized events.
    Is there any way to fulfill this requirement?

    Hi,
    You can assign a number to each Unauthorised field e.g
    Rank   Unauthorised
    1         A
    2         BC
    3         DF
    5         TD
    6         GF
    Then add "Rank" to the crostab Columns before the Unauthorised  field. Then you can control the sorting order on your crosstab.
    Hope this helps
    Regards
    Dotun

  • Setting Total Column width in Cross Tab report

    I am having an issue with the width of the Total Column in a Cross tab report. I have set the width of the column and saved the report but when I am reopening the report the Total column width is expanded but rest of the data column width remains the same (which I saved). Any idea how to adjust the total column width?
    TIA,
    AJ

    AJ.
    Did you ever solve this?

  • Sorting column name in cross tab

    Hi Experts,
    How to sort the column name in cross tab.Crystal is sorting alphabetically like
    Apr 2013 Apr 2014 Aug 2013 Aug 2014 Dec 2013 Dec 2014 Feb 2013 Feb 2014 Jan 2013 Jan 2014............................so on
    But i need result like
    Jan 2013 Jan 2014 Feb 2013 Feb 2014 Apr 2013 Apr 2014 Aug 2013 Aug 2014  Dec 2013 Dec 2014
    I am using crystal report 2013 version.
    Kindly see the attached file

    Hi Bharathiraja,
    Instead of using a string field to display the month names, use a Date field as the column of the Crosstab.
    You can then, highlight the column in the crosstab expert > Options > Options tab > check 'Customize group name field' > click the formula button beside 'formula' and use this code:
    Totext({DATE field}, 'MMM yyyy')
    -Abhilash

  • How to create a title over the top of the left-most column in a cross-tab.

    This is one of those things that seems simple until you try it.
    I'm almost there.  I moved the cross-tab from the report header to the report footer so I can have a page title.  I tried using an overlay but it didn't work for any page past the first.
    I can't seem to figure out how to put a title over the left-most column though.
    Thanks in advance,
    J

    I have used a text box, after you type in the text, select the box, and move it to the front.
    then select the crosstab and move it to the back.

  • Filtering Key Figures/Columns in a Cross Tab Component

    Hello All,
    I am creating a P&L Statement for Better/Worse comparisions, and I have to show only three columns at a time based on User Drop Down Selections.
    Here is my Bex Query Out put looks like.  The Rows part is "Structure" and Columns are "Cell Restrictions".
    Now, the CrossTab component has to show only Two columns at a time, based on user selections. Here is my desired output. User will Select either ' Avg' Rate or 'End Rate'. Based on that selction, Actual's will show in the First Column and based on Selection from Second DROPDOWN for Budget/Forecast/PY, the Second Column has to be displayed.
    Is there any DropDown Component or CrossTab Component Options are there to Filter the Columns based on User Selections ?
    Appreciate your help. This is the Crucial Chart for the whole Dashboard.
    Thanks,
    Sonti.

    Hi Tammy,
    Thanks for your quick reply.
    Can it be done dynamically without the User touching it ? My Cross Tab has to show values based on the Selctions. But, I couldn't find the code to restrict Cross Tab data.
    I have to code for Dropdown box --> On Select, to check / Un check the KF's in the Filter Panel Component. And in Filter Panel Comoponent, --> On Select, DATASOURCE.setFilterExt("KF1", "KF2").
    And assign the data source to Cross Tab.
    Please correct me if I am wrong.
    Regards,
    Sonti.

  • Conditional Formating of rows and columns in template(cross tab)

    Hi,
    I am developing a cross tab report in which I have row header as the year like 2008,2007,2006....column header as months jan,feb,mar...and the data area contains the respective data...I need to format the background color of the rows and columns which are below the date of the report(report is ran for a particular month like mar-08)..I was able to format the background color of all the rows that fall below(ex:08) the year of the report(using <?if@row:row_name<'$first'?> <xsl::attribute name="background-color" xdofo:ctx="incontext">#C0D27F</xsl::attribute><?end if?>)..
    and I need to format the 3(till march) columns in the yr 2008
    Thanks...

    Hello..
    Thanks for the reply...
    I have report date as mm|yyyy...below is a sample data of the cross tab..
    <Q1>
    <REPORT_DATE>04|2005</REPORT_DATE>
    </Q1>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>1.32</NET_ROR>
    <ACTUAL_DATE>01/01/2004</ACTUAL_DATE>
    <FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.21</NET_ROR>
    <ACTUAL_DATE>01/01/2005</ACTUAL_DATE>
    <FUND_FACT_YTD>5.739540457478967975310388578877768035</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>.59</NET_ROR>
    <ACTUAL_DATE>02/01/2004</ACTUAL_DATE>
    <YTD>7.942192987387475647074276803933198866</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>1</NET_ROR>
    <ACTUAL_DATE>02/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>0</NET_ROR>
    <ACTUAL_DATE>03/01/2004</ACTUAL_DATE>
    <YTD>7.942192987387475647074276803933198866</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.2</NET_ROR>
    <ACTUAL_DATE>03/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>-.07</NET_ROR>
    <ACTUAL_DATE>04/01/2004</ACTUAL_DATE>
    <FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.87</NET_ROR>
    <ACTUAL_DATE>04/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    MONTH_BEGIN_DATE goes as the column header, BEGIN_DATE goes as the row header and NET_ROR is the data area..I need to get the background color of each cell of NET_ROR below the report date as one color...
    Thanks ..

  • Column dissappeared in Cross tab with specific order

    Hi experts,
    I have a cross tab, with 2 columns from YEAR (2009, and 2010). Then I created a other column with the differences of both columns before, I changed the SPECIFIC ORDER and the 3th column is DISAPPEARED!!!
    I dont understand why!!
    thank you very much

    At the beggining i have the following columns:
    2009 2010 Desviation
    I created this with specifciar order.
    Then, I want to change the order and I put :
    2008 2009
    but the desviation is disappearing.
    thank u

  • Date Formatting in Charts and Dynamic column resizing in Cross tabs

    Hi All,
    I am new to Design Studio, so am in desperate need of your help on the following:
    Is there a way we can change the date format in x axis in charts?
    For ex: Am getting dates as mm/yyyyy from BW but requirement is to show in yy-Mon
    Requirement is to display data in cross tab just below the charts. How can I make the column widths in the cross tab the same as x-axis divisions in the chart? Also, this will be dynamic as depending on filter selection x axis scaling in charts will vary.
    In cross tab, can I hide the column header?
    Would really appreciate any kind of help from you.
    Thanks & Regards
    Swasti

    HI Swasti,
    To answer your first question, in Design Studio it's what you see is what you get! so it shows the Data Labels as it is in the BEx output, if you have to modify this you have to change it in the Background.
    There might be CSS workarounds, but I am not sure if that will satisfy your requirements.
    You can fix the Column width, but it would be constant, aligning that to your X-axis would require a lot of Effort.
    You cannot hide the Column header directly, but one workaround would be to use a white BG text component to overlay on the Crosstab.
    Regards,
    Fazith Ali Z

  • Display two different column types in cross tab

    I am using Cross Tab template in crystal XI and I have to show two different column types one is of type int and other is of type string. Below is the format of the report
                                  AmountGiven             Amount Spent            Attended
    Mike                       5000                              3000                         Yes
    Steve                     200                                 200                           No
    Is there a way I can do this showing "yes" or "no" in the third column???
    Thanks...

    Hi
    If you are trying to show "yes" or "no" for a column value in a cross tab, then yes we can try using a formula for it.
    I would suggest you 2 ways that you can try at your end:
    1.
    a) Create a formula in the cross tab expert and write your condition.
    for eg: if Sum({Orders.Order amount}) > 5000 then "yes" else "no"
    b) Then select that formula in the summarized fields in cross tab expert and change the summary to MODE.
    c) You can see the "yes" and "no" Within the same box.
    2.
    a) Add a field to the colums in the cross tab expert.
    b) A column gets inserted in the cross tab.
    c) Right click the field and select format field.
    d) Go to Common tab and write a formula for the display string.
    e) Write the condition in that formula.
    f) You can see a new column with the expected values.
    Hope this helps you..
    Please revert incase of any queries.
    Regards
    Pradeep Hulke

  • Adding a column to a cross tab report?

    Hi,
    I have a cross tab Report having measures and i want to add a one xtra column to it to display the "total values'.
    i found the option to insert a row. but i didn't find it for a column.
    can u please help me on this?

    Add a Summary

  • Change the Value of column of the internal table at run time

    Hello Experts,
    With the below code i am able to determine the value hold
    by internal table at run time for a sepcific column but i am not getting the way
    of how to update the internal if one of the value is changed,
      lr_desc_table ?= cl_abap_typedescr=>describe_by_data( itab  ).
      lr_desc_struc ?= lr_desc_table->get_table_line_type( ).
    loop at itab assigning <fs_data>.
        loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
          assign component  <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
          lv_excel_row = <fs_field>.
         CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
            EXPORTING
              INTEXT  = lv_excel_row
            IMPORTING
              OUTTEXT = lv_excel_row.
          assign lv_excel_row to <fs_field>. "this is not changing the value actually hold in internal table
        endloop.
      endloop.

    Hi,
    Resolved this issue with the code mentioned below.
    Code:
    loop at lt_export_items assigning <fs_data>.
      ls_data = <fs_data>.
        loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
          assign component  <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
          lv_excel_row = <fs_field>.
          CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
            EXPORTING
              INTEXT  = lv_excel_row
            IMPORTING
              OUTTEXT = lv_excel_row.
              concatenate 'ls_data-' <fs_comp_wa>-name into  lv_var.
              assign (lv_var) to <fs_var>.
              <fs_var> = lv_excel_row.
        endloop.
        modify lt_export_items from ls_data .
        clear:ls_data.
      endloop.
    Take care,
    Sanju

  • Setting column widths in a PdfPTable at run time

    My web application is building PDF output using iText. The data is coming from a database through JDBC. At run time I will not know how many columns are being returned and I will not know the relative widths of each column, so I have to set this at run time to make it look good. This is the problem I am having.
    I am calling the data and returning an ArrayList of ArrayLists, each of the internal ArrayLists contains the data and the first one contains the column labels. The labels are going to be longer than the data so I can set the column widths to the labels and it should be fine. But how?
    Here is what I am trying so far, without success.
    ArrayList headRow = (ArrayList) mainList.get(0);
    float[] widths = new float[headRow.size()];
    for(int i=0;i<headRow.size();i++) {
    Chunk chunk = new Chunk((String) headRow.get(i));
    widths[i] = chunk.getWidthPoint();
    PdfPTable table=new PdfPTable(colCount);
    table.setWidthPercentage(100);
    table.setWidths(widths);
    As I said, this is not doing what I need, nor is any variation of this that I have tried. So how do I set the relative widths of the columns when I don't know how many columns I'm going to get back or how wide they need to be?
    Thanks

    It worked fine when I had a JTable associated to my table header.
    Any ideas as to why it no longer works or indeed, solutions?Not too sure if I understand the question or problem. Since when can you disassociate a tableheader from a table (or how can you create a tableheader without a table)?
    ;o)
    V.V.

  • Any way to know whether the column of matrix is active at run-time?

    Hi all,
    I have posted similar question earlier but it was for setting the column prefrences . In a system form, I am having some user defined columns to which I am copying some data. If they are not active, and if I try to do
    Matrix.Columns.Item("U_STNLineno").Editable = True,
    It gives me 'form item is not editable' error.
    I can fetch the active status from CPRF table, but it  updates the status only after SAP B1 is closed.
    If atleast, I know, at run time, tht the column is not active, I can prompt user a warning to make it active from form settings.
    But, How do I know whether the column is active or not?
    any clue?
    Thanks in advance..
    Binita

    Maybe is better solution, but I`m doing it that I`m trying in system objects to do
    Matrix.Columns.Item("U_STNLineno").Editable = True
    between try catch statement and if is there any error which contains "editable" sentence, I know that it is`nt allowed.
    it should be done as
    on error resume next
    Matrix.Columns.Item("U_STNLineno").Editable = True
    if Err.Description <> "" then
    -- cannot set
    end if
    on error goto 0
    Petr

Maybe you are looking for

  • Import Data From Excel Into PDF

    I have made a PDF in Acrobat 9 that has form fields in it, such as Last Name, First Name, Social Security Number, Address, Birth Date, Email, etc.  I want to import data from an Excel Spreadsheet into these form fields.  I have Excel 2010 and created

  • Access Connections - IP doesn't change when switching locations

    In my Access Connections setup, I have a mix of profiles; some using DHCP & some using static IPs. I am experiencing problem when manually switching between profiles, where the IP address is not always changing as expected. For example: (all profiles

  • Kml file on google map on labview

    Hello there! I'm planning to add a Google Map into LabVIEW but this time, with a KML file. I made a KML file and I would like to also load it with the Google Map in LabVIEW. How can I do it? Thank you very much!  I really wish to become an Electronic

  • Excute_query when new date selected from calender

    hi, i have a mater detail form. form is displaying current day values as default. i put a calendar to form for users can be select date. now, i want to excute_query when new date selected from calender. i writed below code to text_item(calendar) when

  • Takes half a minute to connect to wifi after sleep

    I close the lid and my macbook goes to sleep but it take 20 seconds to 30 secs to reconnect to my  wifi. Anything I can do?