How to split a table by two columns in FastReport? - fastreport

I have a typical FastReport report with a table inside of a MasterData band. The table is pretty lengthy and narrow, so I'm thinking about splitting it in half and placing the lower half next to the upper half like so:
A A D
B B E
C -> C F
D
E
F
There's a catch - rows on the table are 1-3 lines tall.
I have tried using MasterData.Columns property. Two problems with it are: it splits the table by-row, making it AB CD EF, which is not acceptable, also it does not account for row heights, so if for example row A is taller than others, then there's unwanted gap after D on the second column (despite the StretchMode = smMaxHeight).
My FastReport version is 4.7.

FastReport has two ways to make a column report.
You already discovered one of them "band columns" - this method prints band from left to right and then down.
The second way is a page columns.
With Page column FR prints band till the end of the page and then moves to next column. I think this method exactly what you are looking for.
To make a page columns just double click on the page in the report designer, select other options tab and set the number of columns you want to print.

Related

Starting grid column from half of the column

I am trying to start grid column from half of the very first column.
I tried grid-start-column with different values but it's not working. Basically, it should be like following:
grid-column: 0.5/7
I know this is not the valid code, but just for explanation I write that.
Is it possible to start a column from the half of the column?
Is it possible to start a column from the half of the column?
No. It is not.
Let's say you have a grid container with five columns and want to start spanning from halfway inside the first column (grid-column: 1.5 / 5 ). This won't work because you're not starting at a column line. More technically, the grid-row-* and grid-column-* properties accept only integers as values.
However, there is a simple workaround:
Instead of five columns use 10 columns.
Then start spanning at the third column (grid-column: 3 / 10).
This creates an equivalent layout, which looks the same visually, but with more precise control of the columns.
More details here: Changing div heights using CSS grid

How to create descending left hand row numbers in a table (tr) with CSS

I use the method shown hear;
https://kryogenix.org/code/browser/sorttable/#lefthandheader
to add numbers to the left hand side of my table. And it works great by putting 1 at the top on the first row, 2 on the second and so on. However my table is time sensitive, and descending in order so the top row is actually the most current thing that occurred. I would like the left column to reflect that by having the highest number on top and descending to the bottom where the first event occurred.
Is there a simple way to modify the CSS to do this?
My table in question is built using PHP/MYSql. It turns out that the quoted solution to number the left hand column has at least on option, you can add an option to the CSS like this.
table.sortable tbody {
counter-reset: sortabletablescope 48;
}
Then reference it as demonstrated here: https://jsbin.com/yanihid/edit
The result is exactly as I needed it. Counting the rows starting at the highest number. All you have to do is know the count, an easy deal with PHP/MYSQL.

How to increase a column's height in a css grid without increasing the parent row's height or sibling column's heights

I am using semantic-ui's grid, which is a sixteen column grid system. Initially, I am displaying multiple rows containing two eight-wide columns each. All of the columns are initially an equal height.
When initially rendering all of the columns, the user will see something that looks like this -- where each line is a row, and each column is a letter:
a b
c d
e f
g h
There is a user interaction that increases the height of a selected column. So if increasing the height of 'a', for example, the current behavior after increasing height will render something that looks like this:
a b
a .
a .
a .
c d
e f
g h
The increased height of 'a' will increase its row height so that the bottom of 'b' is above the bottom of 'a'. The columns in the bottom (last) row will always be aligned (unless increasing the height of 'g' or 'h', which are the bottom).
The desired behavior that I would like after increasing height of column 'a':
a b
a d
a f
a h
c
e
g
In other words, from a user's perspective for this case I'd like to push everything in the first column down but leave everything in the second column the same.
As I said, I am using semantic-ui so answers in relation to that would be great, but I am not sure how I would do this with bootstrap or other grid systems.
I am not interested in using jQuery Masonry. Perhaps thinking in terms of a grid layout for this is not correct, but I am curious if anyone has solved this problem in any simple ways that aren't coming to mind.
Here is a demo on jsfiddle:
https://jsfiddle.net/ne64wkmm/1/

bootstrap, re-arranging divs under the mobile view.

I have run into an interesting situation in which I have two columns, and two divs within each column. The problem that I am having is that when I need to scale down the window to the mobile view, I need two divs from the second and third column to be interchanged.
Example (I'm using haml)
col-sm-8
%h1 "A"
%h1 "B"
col-sm-4
%h1 "C"
%h1 "D"
So basically this would look like this
AA C
BB D
But when I want to condense it, It looks like
A
B
C
D
And here is the thing, when I want this condensed, I want the columns to appear like:
A
C
B
D
Does anybody have any ideas on how to go about with this one?
You can accomplish this by faking it with pulling and pushing certain columns at different sizes. See http://getbootstrap.com/css/#grid-column-ordering. Basically, you will pull or push the columns at larger sizes but for mobile devices have no pushing or pulling and have the columns in the order that you want them to appear.
So the html page should be ordered such as A, C, B, D; then use pushing and pulling for sm or md and larger to arrange them as you please on larger screens. I am unaware if pushing and pulling more than 2 columns will work. If it does not, you could always make nested columns, such that A and C will be in their own new column and container and B and D will do the same but on the left side of the screen.

Bootstrap 3.1 - How to have list item text line up on the left, AND centered in column

Not sure how to describe this exactly but here goes:
I have a 3 column design, and there is a list of items in each of the columns.
I need to have:
1) Each column's list items must aligned so that the left side of each word lines up
2) Each list itself must be centered within its column. (This of course means that list items on their own won't necessarily be dead center inside their respective column)
I would prefer a CSS solution without javascript/jQuery.
I have an example of bootstrap code that I am working on here to help explain what doesn't work for me:
http://bootply.com/112003
The first row is what happens when the text is centered within each column. Condition 2 passes, condition 1 fails.
The second row is what happens when I divide up each of the three colums into 3 subcolumns. Condition 1 passes, but condition 2 fails. This is subtle. While each list item is in the center subcolumn, overall the list isn't in the dead center of that column. (Imagine the list is one item if that helps think about the problem.)
Thanks to anyone who can try to help me out. This one is driving me a little bit crazy :)

Resources