I am currently developing a site where I am showing some data in a table. For that, I am using
#mui/x-data-grid
https://mui.com/x/react-data-grid/
and I am experiencing the following issue:
Basically, it seems that the width for each column is being truncated, normally to 100px which is the minWidth default value. I don't usually know how big this field could be so, using minWidth does not accomplish the solution as it keeps shortening the data at some point.
Is there any way to avoid this?
For example, in the image above, if the reference Q-24 is something like Q-12345678901234567890, it may end up truncated to Q-1234567...
Thanks in advance.
I ended up building my own component as it doesn't seem there is a built-in solution to my requirements.
Related
I am trying to create a table in a PDF document with itext7. But, if the content before the table is too big, the table gets split up between current page and next page. I want to insert a -
document.Add(new AreaBreak())
if there is not enough space left in the current page for the table to be inserted completely. However, I have no idea on how to calculate the available space.
Any help or pointers will be highly appreciated.
From your requirement to avoid page-break inside the table, I assume Table#setKeepTogether(boolean) is exactly what you need.
This property ensures that, if it's possible, elements with this property are pushed to the next area if they are split between areas.
This is not exactly what you have asked, however it seems it's what you want to achieve. Manually checking for this use case might be tricky. You would need to have a look at renderers mechanism and inner processing of iText layout in order to get available space left and space needed for the table. You would also need to take care of the cases like if table is to big to be fit on single page. Also #setKeepTogether(boolean) works when elements are nested inside each other.
How can I make my Crystal Report look like the attached image? I have had no success creating it with a crosstab.
The short answer is that Crystal Reports isn't really equipped to handle the format you're dealing with. And here's why:
Let's assume for a moment you've already figured out how to interpret your query into something usable. Since we aren't using a Cross Table, the best you could hope for would be setting a Details section for each individual time slot and arranging a large number of formulas into a grid shape:
The problem is that every Formula would need to be unique; interpreting whether there is a Class at that Time and Date, and which Class it is. There would be up to 168 of those formulas and you'd have to manually go in and modify each one to check for their own unique combination of Date and Time. Which defeats the whole purpose of using a computer - to make repeated tasks easier.
Plus you'll have difficulty with the formatting: You'd need to program every "cell" to use a unique set of colors based on the displayed Class. That part is technically doable, but there's no way to "merge the cells" when classes last longer than a half hour. You'd end up with something like this:
So don't torture yourself trying to make this happen in Crystal. Even with all the time and effort it would take to formulate the grid, there's no good way to make it look like your screenshot.
That said, it looks as though you managed to put a schedule together in Excel. Is there any reason you can't use Excel instead? It's a much more powerful tool, and a cursory Google search suggests it can handle queries as well.
I have an OpenOffice Calc spread sheet that I'm using to track some data. I have three charts made from the data. I periodically add more data to the spreadsheet. My current way to propagate this to the chart is to alter the data ranges manually of each chart. I'd like to automate this, or at least not have to redundantly change each chart separately.
My current idea was to do something like $A$1:$A{$F$1} for the ranges where $F$1 holds the current last line. Unfortunately, OpenOffice doesn't recognize this, but I thought there might be a function or work around for it. I haven't been able to find one yet.
So, is there a way to execute my idea, or perhaps a better way to do it?
There is a very similar question to this, but the asker asked for many more features and the answer was to use something other than a spreadsheet. It was never answered whether this specific feature was possible.
Also:
First method is to extend the range of the graph way down, with lots of empty space.
Second method is to include only one extra line of data in the graph and when you add data, always insert it above that line.
I have 2 subreports, each report contains information for one column of what is going to be the result table. As some entries are quite lengthy I gave the rows of both subreports a same generic height size that worked fine enough for the hurry, but now it looks quite ugly so they want me to change it. So I was wondering if is there a way to coordinate both subreports, so that the one with the tallest cell of a given entry dictates the width of all the row and it sends that information to the other subreport to adjust the size of that same entry, just like it would happen on a regular table in just one subreport. If this is possible or do I have to use iText to make it happen?
Thanks in advance.
I've worked a lot with jasper reports and I've given this a lot of thought, but I can't come up with an answer for how to make the subreports communicate a section height. I had composed an answer about using a Java class to define a static height that you could set and get, but then realized that you can't specify anything other than a simple numeric value for the height, i.e. there would be nowhere to call the method to get the height.
So, I have two possible recommendations which may or may not work depending on the implementation details for your reports.
The first recommendation would be to use a single report if at all possible, or at least a single "bottom row" below the two subreports.
If that won't work, then you could try using a minimal height value for both subreport sections, but with a Stretch Type of "Relative to Tallest Object". Then, although they may not be the same height, at least they wouldn't be too big. Depending again on the details, this might accomplish what you need.
Let me know if this works or not, maybe I can think of something else.
It seems like a bug in icefaces. Most of the forums(in 2008/9, I could not find any recent answers in forums) says some solutions to over come this, but none of them give a solution which we can add columns widths as percentages. So what I like to know is, is there a way that we can over come this.
Description of the problem
When we add a scroll to a datatable, the headers widths become mess. And there's a solution that we can add fixed widths in pixel (columnWidths attribute). But it is not supported in percentage. So I am asking is there a better solution for this. Because I want the datatable widths to be changed from screens to screen(different sizes)
please help
You could create a profile of column widths to match the entities that you want to display in your backing bean.
As icefaces does not support the column widths yet.
http://www.icefaces.org/docs/v1_8_1/tld/index.html