Is there a way to customize the wicket DataTable layout?
I'd like to have a DataTable with a horizontal flow of data and multiple columns per row.
e.g.:
------------------------------
|prename| John| surname| Doe |
------------------------------
|city | NY | country| USA |
------------------------------
Unlike the normal use of the DataTable class this would be used for displaying just one object (respectively one dataset)
Don't use a DataTable for this.
For a simple case, just make a panel containing a Label for each data element and put the table layout in the corresponding html fragment.
To make it more dynamic, with parametrized size as noted in your comment, you might build your own structure using nested RepeatingView components, one for the rows and one for the columns, or perhaps use a DataGridView, which would do some of the layout work for you.
But DataTable is really meant for a table with meaningful columnar structure and includes alot of code for handling the column structure which won't make sense for your data and will get in your way.
Related
I have a table with two columns (more in real life)
| firmware_check_result | software_check_result |
| -------------------------|-----------------------|
| firmware checksum error | software outated |
| firmware outated | software slow |
| | software bug |
Results can be any text from a predefined list of reasons.
But results are different in both columns. And a row can have one or no firmware check result and one or no software check result.
I need to build one unique pie chart with all the data from both columns.
Is it possible ? and how to to it ?
I tried to add both columns like this:
Drop a Pie chart on canvas
in Properties:
in Legend: I added both columns
in Values: I added both columns
Result is strange as I have one pie chart
but legend is only the legend of the 1st column, not the second.
It there a way to do this ?
This shows a result with 3 results possibilities but legend has only two and colors are the same for 2 out of 3 results.
Here is one approach. For simplicity I will use only your example columns in my answer:
Create a new query using the same data as before
Keep only the firmware_check_result and software_check_result columns, as well as an index or unique identifier (UID) column of some kind (and any other information you think may be useful later)
I will refer to the UID column as [UID]
Select and unpivot your firmware_check_result and software_check_result columns in the new query
Close and apply the changes
Create a new relationship between your original table and your new unpivoted table based on [UID]
Create a new pie chart
For your values, use Count of [UID]
In the legend, from your new unpivoted query, place Attribute first, then Value underneath
You can switch between the two levels using Drill Up and Expand all down one level in hierarchy or Go to next level in hierarchy
I am creating a Dashboard in QlikView, allowing the user to extract data based on the filters and selected columns. Requirments are below.
“Data Extract” table MUST be empty (even no column names are showed)at first!
Clicking the blue button shows the list of data available.
A table will then show those selected columns.
Does someone know how to do these?
Screenshot:
You need to set a conditional expression on each of your dimension and measures.
A simple example would be to have an ID for each measure, here the measure "NetSales" can be referenced by MeasureID "a".
Measure | MeasureID
NetSales | a
In the conditional expression for NetSales you can have:
=if(IsNull(GetFieldSelections(Measure)),0,SubStringCount(Concat(MeasureID, '|'), 'a'))
This will check the possible MeasureIDs and return 1 if NetSales is selected.
You need to create a "floating" tables with the dimensions & expressions you need to use in the table object:
Here is an example I made : https://ufile.io/j20am (just reload the file If you use personal edition)
I am newbie to BIRT and unfortunately my first task is over complicated.
I want to create table like this
Birt Report Snap
the columns in this picture must be dynamic. the data for the column name is in database and I have to fetch it and create columns on the go. 2nd to put values against it.
kindly tell me if this thing is doable in birt. I am new to this so please don't give negative ratings
thanks.
I believe what you are looking for is called a Cross Tab Table.
Here is a tutorial video on it: BIRT - Cross Tab Table
In addition to SBurris answer, which is the way you should try first, I can assure you from my experience that what you want is in fact doable with BIRT, and even in two different ways.
However, some of the minor aspects might be a bit quite tricky for beginners, e.g. the merged cells in the column header, the different background colours and border widths for the columns. So, these style aspects shouldn't matter at first, you can tackle them later.
The first, by far easiest and standard way to achieve this kind of report layout is a cross tab, as SBurris said.
The second option is - depending on the database backend - to use a "normal" Table report item in they layout and to "create the cross tab" with SQL.
This is more powerful IMHO as the BIRT Cross Tab report item, but also more complicated.
For examples, see here:
Pivot / Crosstab Query in Oracle 10g (Dynamic column number)
Pivoting rows into columns dynamically in Oracle
How to do Pivoting in Oracle 10g
(you get the idea)
To use this with BIRT, you'll have to select the column title values in addition to the cell values.
You have to decide how many columns do/should fit on your page (if you're using PDF output).
You can use the maximum aggregate function in the visibility expression of the columns to hide empty columns.
If the number of logical columns exceeds the number of columns for a single page, you can extend the idea further by dividing the cross tab into several, each with at most N columns.
However, note that this approach will need an experienced BIRT developer...
Is it possible to have data in a Handsontable sorted by a field which is not displayed? I have a grid of data which I would like to display that contains a column called "sortOrder", but I don't want to display this.
The sorting needs to be done client side because events are coming in over web sockets and need to be reflected in the table.
If you're not showing the column then I assume you're not expecting the user to be able to manually sort by this hidden column. Therefore, why don't you simply sort your data array with native JS? At any point during execution you could have a function which sorts by this hidden column and then just don't render this in your Handson definition.
So yes, the answer is it is possible. The not showing of a column is as simple as defining the columns option and not including a column for this hidden value.
I have a Tableau dashboard with various visualizations created from 3 data sources (i.e. A,B, C).
Each data source has a relationship (join) with the same secondary data source (i.e. D), and the secondary data sources provides information to create a filter for each data source. In other words, there is the following relationship for my data sources:
A - D
B - D
C - D
I would like to create a global filter on a dashboard I have created. I would like one filter card from "D" to show up and be applied to "A," "B," and "C" at once rather than having a separate filter card show up for each data source.
I tried to create a global filter via a parameter and calculated field, but the parameter requires layers of connections because data sources "A,B, and C" only have "D" in common.
Thoughts?
Its not completely clear from your question, but it sounds like you are using Tableau data blending on your worksheets to include data from multiple data sources, rather than a join to create a data source based on multiple tables. If all your tables are on the same database server or spreadsheet, then traditional joins are usually more efficient than data blending.
The following approach often works well.
Instead of using Tableau's quick filter feature, create a worksheet based solely on D that shows the values you wish to use for filtering. It can be a simple list of names, or a bubble chart or anything you like. Use that worksheet as your filter by creating actions where it is the source and all the other worksheets on your dashboard are the target. Typically, you would want to specify the field names explicitly.
Data blending is useful but can be complex. Depending on details, you may need to make D the primary data source on your other worksheets. Experiment.
The parameter and calculated field you mentioned can be even simpler and faster than using actions, but users are restricted to selecting a single value for a parameter unlike the filter action approach. (Of course, one parameter value can represent multiple values in your target data source field depending entirely on how your calculated field interprets the parameter).
I can't tell why that didn't work for you or what you mean by "layers of connections". You might consider clarifying that part of your question.