Missing cells in the table of dynamic columns

Hello

I am creating a table using dynamic columns. Here's an example simplified data that I use:

< sales >
... < drive >
... Honda < brand > < / brand >
... < color > green < / color >
... < / car >
... < drive >
... Nissan < brand > < / brand >
... < color > blue < / color >
... < / car >
... < drive >
... Honda < brand > < / brand >
... < color > blue < / color >
... < / car >
< sales >

I am grouping the brands for the lines, and I want a number of colors as my dynamic column. I find myself with a table that looks like this:

----------------------------------------------------------------------------------
Brand | Blue | Green |
----------------------------------------------------------------------------------
Honda | 1. 1.
----------------------------------------------------------------------------------
Nissan | 1
--------------------------------------------------------

Since there is no green Nissan, a cell not created so I find myself with a hole in my table. Ideally, I would want a cell containing 0 to be in this space.
Is it possible, or to all the least have a cell in this space, so I did not have a table with gaps?

Thank you!

Hi cc22

If you have a look at these. http://winrichman.blogspot.com/search/label/cross%20tab
you will identify yourself,

its simple... If this is not the case, let me know.

Tags: Business Intelligence

Similar Questions

  • Access to the table of dynamic addresses via SNMP

    Hello

    I am trying to access the table of dynamic addresses via SNMP, with a PowerConnect 6248 switch. I tried to follow the instructions [1], as other parts of the BRIDGE-MIB are ok on this switch.

    When snmpwalk'ing BRIDGE - MIB:dot1dTpFdbEntry, I have nothing, while, on the switch web interface there are entries in the table.

    Any idea?

    [1] http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c9199.shtml


  • I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    11.1 and especially you have virtual column

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c generated always as (a+b) virtual
      6  );
    
    Table created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    

    Before that, a front insert - trigger

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c number
      6  );
    
    Table created.
    
    SQL> create or replace trigger t_default before insert on t for each row
      2  begin
      3    :new.c := :new.a+:new.b;
      4  end;
      5  /
    
    Trigger created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    
  • Not all cells in the table is formatted but just the first.

    var doc = app.activeDocument,

    _pages = doc.pages, i, j, k, l.

    _textframes, _tables _row, _cell, rownum;

    for (i = 0; i < _pages.length; i ++) {}

    _tables = _pages.item (i). Tables;

    for (j = 0; j < _tables.length; j ++) {}

    _Row = _tables.item (i) Rows;

    rowlen = _row.length;

    for (k = 0; k < _row.length; k ++) {}

    _cell = _row.item (i) .cells.

    for (l = 0; l < _cell.length; l ++) {}

    _cell. Item (i) .appliedCellStyle = "CellA ';

    _cell. Item (i).paragraphs.everyItem () .appliedParagraphStyle = 'ParA ';

    }

    }

    }

    }

    Hi, I'm stuck in this code. I want to format all the cells of the table, but using the code above only the first cell of the first row is updated with the format. The other problem is that, in all the lines, it is a cell unique couting. "CellA" and 'ParA' is the cell styles and paragraph styles I made in my pc. I'm relatively new to indesign scripting and try to learn something new.

    Hello

    1. There is no property, '.table' for 'page' pages.item (i) .tables returns error;

    2 Javascript is case sensitive so watch start a property with a small letter names ("Tables" are false);

    3. There is no need to browse the pages, tables, lines and cells - just use . everyItem().

    so

    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().appliedCellStyle = "CellA";
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().paragraphs.everyItem().appliedParagraphStyle = "ParA";
    

    should work.

    Jarek

  • How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

    Hi all

    Suppose I have table, whose structure changes frequently on a daily basis.

    For example. / / desc my_table gives you after the name of the column the day 1

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone


    Day 2, two other columns are added, viz, address and salary.

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone

    Address

    Salary


    Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

    For 1 day my XML file should be like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 1, EXCEL output RTF model should be like this.
    Name age phone

    Swapnill 23 12345

    For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 2, exit EXCEL model RTF should be like this.
    Name address telephone pay

    23 12345 Madrid 100000 Swapnill

    Now, I don't know below things.

    • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
    • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

    Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

    Kind regards

    Patricia K.

    Post edited by: SwapnilK

    Hi guys,.

    I was able to solve above the requirement.

    I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

    Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

    Kind regards

    Patricia K.

  • Right aligned and then centered in the cell of the table - indesign cs 5

    Hi all

    Does anyone know how can I get the numbers right aligned, so the zeros are all below the other. And then the center of the table cell.

    I use a paragraph style is aligned to the right. This is the paragraph defining the cell style.

    Any help would be appreciated.

    Thank you

    Mau

    InDesign CS5

    You can set the position of the tab within the paragraph style, so no, you do not need to edit each cell, but you do not have to use the text aligned to the left, and if you want that all the place line numbers correctly you need to use a font with tabular, rather than numbers proportional to make them all the same width (and for tables rather than oldstyle figures is probably also a better choice).

    When you look at the tabs formatting options that you have left, right, centered and aligned decimals (which can be any character of your choice, but you want the period). When you use the decimal tab aligned, everything you type will behave as if the tab is a tab that is aligned to the right - it will start at the position of the tab and move to the left with each additional character - until you type the character that you chose for the alignment. From there text will move to the right of the alignment. This aims to make things like the columns of numbers with decimals.

    In a table, the tab character is implied, so if the only thing in the cell is your setting of the tab in the style number is sufficient and it will work just as soon as you start typing. If there is other text before alignment numbers that must be the left hard, however, you will need to type, then manually insert a tab in the menu Insert special characters (or create a new shortcut key to insert tabs in tables) to force the text to the left margin and keep the numbers aligned on the decimal point. You can't just hit tab within a cell to add the tab - it reports ID to pass to the next cell.

  • How to pass the content with in the cell in the table of rules xml

    Hi all the Scripting Guys,.

    I created a table using rules xml with 3 numbers of the cells where first cell contains some data and so on, but following the cell first line may of does contain all the data so in that cell of second data line moved to the first cell and thired data line moved to the second cell that is very worried about me since the second cell in each row must be in the second cell only.

    For Instance -: Required to output

    Title NUMPAGE Topic
    Title46The subject
    50Another topic
    54Object
    Title60Another topic
    64The subject

    I get script - put it:

    Title NUMPAGE Topic
    Title46The subject
    50Another topic
    54Object
    Title60Another topic
    64The subject

    myRuleSet = new Array ( new ProcessSec,
               new ProcessPara,
               new ProcessSecHead,
               new ProcessArt,
               new ProcessPG,
               );
    with(myDocument){
        var elements = xmlElements;
         __processRuleSet(elements.item(0), myRuleSet);
          } 
    
    function ProcessSecHead(myXPath){
        this.name = "ProcessSecHead";
        this.xpath = myXPath; 
        this.apply = function(myElement, myRuleProcessor){
       with(myElement){
                __skipChildren(myRuleProcessor);
                  var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
         myElement.move(LocationOptions.atBeginning, myContainerElement.xmlElements.item(-1).xmlElements.item(-1));
         }
        return true;
        }  
    }
    function ProcessPara(){
        this.name = "ProcessPara";
        this.xpath = "//para"; 
        this.apply = function(myElement, myRuleProcessor){
                var myNewElement = myContainerElement.xmlElements.add(app.documents.item(0).xmlTags.item("Row"));
            return true;
        }  
    }
    
    function ProcessArt(){
        this.name = "ProcessArt";
        this.xpath = "//para/aug"; 
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                __processChildren(myRuleProcessor);
                var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
                myElement.move(LocationOptions.atBeginning, myNewElement);   
            }
            return true;
        }  
    }
    function ProcessPG(myXPath){
        this.name = "ProcessPG";
        this.xpath = myXPath; 
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                __skipChildren(myRuleProcessor);
                var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
                myElement.move(LocationOptions.atBeginning, myNewElement);
            }
            return true;
        }  
    }
    

    All would be greatly appreciated

    Mac

    Oops, I apologize. I misunderstood the requirement.

    And this example shows us why the rules XML in InDesign is not the most practical approach...

    Beforehand, for each , we went to the top parent and found a and copied in.

    But we did only want to do this for the first .

    But convert us all the , , and

    the knots in the table cells later, we therefore need to insert a space reserved for this place to avoid having a problem. (If not, we could hardcode the number of the column for and the
    lymph and prepopulate the nodes of the table...).

    So I'll offer several changes to the fragmentary manuscript, thus you can intergrate them and learn what is happening:

    First of all, let's change these helper functions to return a null value in the event that they do not find a child node, rather than return the node parent. This means that it is easier now to test their return values in case of not finding something, that is a case that we know today:

    // Handy subtree functions
    function firstChildTag(node, tag) {
        var i, e = node.xmlElements;
    
        for (i=0; i=0; i--) {
            if (e[i].markupTag === tag) {
                return e[i];
            }
        }
        return null;
    }
    

    Then, we must be able to copy nodes in particular places. Before we used it copied copyFromToChild() who always has nodes in the context node. But we need to be more general, copy the tags. We'll create a version that allows us to specify the destination:

    // Apply from() to the context node to get
    // a source node. Apply to() to the
    // context node to get a destination node.
    // Copy the source node in the specified
    // location (how) to the destination node.
    var copyFromTo = makeRule("copyFromTo",
    function (element, ruleProcessor, from, how, to) {
        var copy;
    
        // __processChildren(ruleProcessor);
        copy = from(element).duplicate();
        copy.move(how, to(element));
        __skipChildren(ruleProcessor);
        return XMLmm.stopProcessing;
    });
    

    It must also be able to add an empty tag in the other nodes in . Maybe in hindsight I should have just made a new node outside the subtree us work and then copied that every time with the function copyFromTo() above. But instead, I expanded addNode() (which is currently used to create rows in the table) to not take a fixed destination, but rather a function that returns a destination, so that the destination can then be compared to the context node:

    // Create a new node at parent. Doesn't do
    // anything with the XPath context node.
    var addNode = makeRule("addNode",
    function(element, ruleProcessor, where, tag) {
        var parent = where(element);
    
        if (parent) {
            parent.xmlElements.add(tag);
        }
        return XMLmm.continueProcessing;
    });
    

    Now, we can replace the first transformation rule (which allows to copy into all the s) article by another who works on each and copy to the beginning of the first brother according to . Note that the XPath specifier is "//section/section-head" rather than "/ / section" because we do not want to operate on the copy that we have inside the tree. Otherwise, we get double nodes.

    // For each , that it is a direct child of a 
    , // copy it inside the first child. // Next, move each
    node to the end of the , // placing it after the node. __processRuleSet(root, [ copyFromTo( "//section/section-head", function(n) { return n; }, LocationOptions.AT_BEGINNING, function(n) { return firstChildTag(n.parent,tags["para"]); }), moveFromTo( "//para", function(n) { return firstChildTag(n, tags.article); }, LocationOptions.AT_END, // This is more general than we need to be; we're moving // to "the end", but the end of WHAT? It need not be the // , it could be some other node. function(n) { return n; }) );

    Now, we need to deal with the other s that have no in them. I'm not proud of it, we could probably do better. And would certainly be easier without XML rules. Or if we had the position() XPath function:

    // This is kind of gross.
    // For each , if it does not contain a ,
    // add a  to it. This adds it to the *end*
    // of the 's chilld list.
    __processRuleSet(root, [
          addNode("//para", function(n) {
              if (!firstChildTag(n, tags["section-head"])) {
                 return n;
             } else {
                 return null;
             }
          }, tags["section-head"]),
          moveFromTo(
              "//para",
              function(n) { return firstChildTag(n, tags["section-head"]); },
              LocationOptions.AT_BEGINNING,
              function(n) { return n; })]);
    

    Oh, and finally, we have changed the way that worked addNode(), so adjust the another call to addNode for a function instead of an explicit node:

    So in the latest set of rules, change to:

    addNode("//para", function() { return table; }, tags.tr),
    

    It works for you?

  • Problems with the cell in the table borders

    I'm trying to get a solid pt 2 on the left side of the first green column.  Even though I have selected the entire table and chose to not not for shots of the border, when I apply the 2pt stroke left side, there are white lines at the intersection of each cell in the row.  I am attaching the file and a screenshot (if the screenshots are here - I'm obviously new).  Thank you!

    Application View.jpg

    There is a 1 pt stroke applied to the horizontal. I had terrible luck, myself, with the formatting of the tables, but if you select the cell, and then select only the horizontal lines in the formatting options, you can set them to 0 and they will go far.

  • «... "in the cell of the table?

    Pages 5.6.1 crashes when I type «...» "(without the quotes) in the cell of a table.  Data format of the cell is "text".

    I'm doing something wrong or is this a bug?

    Thank you!

    Bev in TX

    Can't reproduce this misadventure in v5.6.1 Pages on El Capitan 10.11.2. Typed three times and also option +; (US keyboard) to insert an elipsis - in a deliberate, formatted text cell. No reaction from Pages.

    Exit Pages and turn off your computer (not restart). See if it's reproducible for you.

  • Insert in the table in separate columns

    I did the vi in the attachments. This basically vi, calculate a value from the device, this is the channel dashboard. I need more so: when calculating terminate, I need to insert data into a table, but the problem is: the number of lines in the constant table is the number of columns, I need the Temp Org chart. And these values are variable. I need a method to do this automatically. Or, I need a vi to 'build' these columns according to the number of rows in the table of constants.

    If the table of constants (number of lines) and the channel table (number of items) to match the size, where the other constants come when the size has to increase?

    What intrigues me is your use of construction "array index... build array. It's the same as truncate the initial 3-element array, regardless of the number of items is originally in there.

    Here's a quick rewrite that eliminates some of the questionable things. As I mentioned in the first sentence, I don't know really what you want.

  • Unable to get the elements placed at the top and bottom of the cell of the table with vertical-align

    Hello

    I have a three-day educational courses in the list table. In each cell, I have the title of the presentation at the top with the name of the speaker below. Because some titles are longer than others, the line grows (rightly) as longer securities are covered in Word. So far so good. Now, I want all the titles to always start at the same distance from the surface of the cell (I use padding 2px) and names of speaker all be equidistant from the lower border, (i.e. 2px).

    I tried to place the title elements with < span style = "vertical-align: top" > </span > presentation title

    and the name of the speaker as < span style = "vertical-align: bottom" > name </span > Speaker

    and I tried the same method with < div > and < p > tags. Items don't move. Can someone tell me how to make the names of the speakers will be all aligned at the bottom of each cell?

    Here is an example of the code table I've tried:

    (Thanks!)

    < table style = "text-align: center;" do-family: Arial; background-color: #f7d49c; "border ="2"bordercolor =" #467E9F "cellpadding ="2 ".

    "cellspacing ="0"width ="900">"

    < tbody >

    < b >

    < td width = "300" > < span style = "" vertical-align: top; "> This is a short title </span > < br / >"

    < span style = "vertical-align: bottom" > name </span > < table > Speaker

    < td width = "300" > < div > is the title of another presentation, which is really long because some of the presentations have titles like that < / div > < br / >

    < div style = "vertical-align: bottom" > Speaker name < / div > < table >

    < td width = "300" > < span style = "vertical-align: top" > This is yet another presentation with a semi-long title </span > < br / >

    < span style = "vertical-align: bottom" > < table > </span > Speaker's name

    < /tr >

    < b >

    < td > < table >

    < td > < table >

    < td > < table >

    < /tr >

    < b >

    < td > < table >

    < td > < table >

    < td > < table >

    < /tr >

    < b >

    < td > < table >

    < td > < table >

    < td > < table >

    < /tr >

    < / tbody >

    < /table >

    By default, the content of the table cell is average aligned.  You need not do anything.

    If you want your cell vertically aligned up or down, you can specify it in your CSS.  These effects all the text inside the cell.   It's all or nothing.

    Some text that is aligned at the top Some bottom-aligned text

  • Using the name of dynamic column in datagrid selectedItems

    Hello

    I have a datagrid that is loaded with 2 columns. AllowMultiSelect is enabled.

    Based on the values selected at runtime, I get the correspondent selected the name of the column and its values and displays it on the screen of the HTML.

    GRP is datagrid

    dgrcl is a data grid column

    selflds is a table that has values 0,1,2,3

    selflds [0] = name, selflds [1] = age

    for (var l:int = 0; < grp.columnCount; l ++)

    {

    dgrcl = grp.columns [l];

    selflds [l] = dgrcl.dataField;

    }

    srhVals will have a single value selected in one point any

    get the corresponding name of the selected column and its value

    var srhVals:String;

    srhVals = String(grp.selectedItem[selflds[1]]);

    I'm trying to make the selection above instead in .selectedItems something like below. By doing that, I'll get all selected items, but not a single. If I try under syntax, I get error. Anyone have any ideas on how to make.

    srhVals = String(grp.selectedItems.selflds[1]);

    Hello

    I got my mistake, there should be no point after selectedItems operator;

    I found a solution - it goes like this:

    for (var g:int = 0; g<>

    {

    srhVals = srhVals + String(grp.selectedItems[g][selflds[1]]);

    }

    If the whole scenario is like this:

    DataGrid:

    Name age

    a               20

    b               30

    c               40

    d               50

    I select b, d in the user interface. At runtime, I get the selecteditem as 'Name' column name programmatically, loops through the selecteditems and store the value in srhVals b, d.

    b, d will finally be shown in the user interface.

  • find the missing number of the table

    I have the vendor with the next column, refvendor_id, the refvendor_id table is a primary key in the table. the client use to enter information to the supplier table by using an interface
    created in Java. My question is how can I query the numbers of refvendor_id that have been ignored by the customer when they enter the information in the vendor table.
    refvendor_id is a varchar data type.
    for example
    
    refvenodr_id
    1
    2
    3
    5
    6
    9
    
    I would like to capture in my sql the refvendor_id that is skipped here.
    4,7,8
    
    select refvendor_id
    from  vendor

    No test! Please define: min_number to your race number:

    select rownum -1 + :min_number  from dual connect by rownum -1 + :min_number <= (select max(to_number(refvendor_id)) from refvendor where regexp_like(refvendor_id,'^[0-9]+$')  and length(refvendor_id) = 5)
    minus
    select to_number(refvendor_id) from refvendor where regexp_like(refvendor_id,'^[0-9]+$')
    order by 1;
    
  • Alignment of the cells in the table

    How to view a table in a cell without any gap between the table border and the cell in which the table is inserted?

    Published by: user9210086 on November 22, 2010 12:19 AM

    Select the cell.
    Make a right click-> properties-> cell options Table-> uncheck 'Identical to the table' and set the margins of cell values of left and right to 0

  • Number of page of text in a table cell in the table that spans multiple pages.

    I have a very large catalog that I need to extract parts, price, and number of page numbers to.  The tables can be long from 1 to 35 pages.  I can locate text that I need to find in the table, but the page of the parent table is the table page begins.  Not the page the page the cell is in.  I need to find the page number of that particular cell.

    Hello

    I have attached the script to find the exact page of the object.

    Use it for your condition.


    Kind regards

    River. P

Maybe you are looking for