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.
Related
For some time I've wondered if/when this module could get some introspection abilities, beyond just hacking on the object.
For example:
Once a sheet has been written, how can I know query the sheet object to know things like how many rows and columns it has?
What I want to do is write a number of sheets, then go back to each and write more rows to them. I could keep track of last row/column on my own, but before I do that I'm wondering if I can get that data from the already-written objects, before the final workbook->close.
I think I could count the number of keys in a sheet object's _table hash, but that may be too close to the metal to be "official." I remember John saying not to do that somewhere in the CPAN docs.
I could keep track of last row/column on my own, but before I do that I'm wondering if I can get that data from the already-written objects, before the final workbook->close.
No. That isn't possible. Excel::Writer::XLSX doesn't provide any tools for introspecting the data once it crosses the APIs. This is a deliberate design decision. You should treat an Excel::Writer::XLSX object as a black box and not some sort of database.
The best way to do what you want is to track the range data in your program.
The usecase
We got multiple changelogs stored in the database, and want to create a histogram monitoring the duration between changes.
The problem
There doesn't seem to be a way to set the start time of a Historgram.Timer, e.g we want to set it to lastUpdated given the current changelog.
Avenues of approach
1 Subclassing Histogram
Should work. However the java-lib use protected/package-private extensively, thus making it hard without copying large portions of the library.
2 Using reflection
After a Histogram.Timer is created it should be possible to use reflection to set the start field. The field is marked as private final, and thus a SecurityManager could stop us in some environments.
Ideas?
Neither of the solutions seems like the correct way to go, and I suspect that I'm overlooking a simpler solution (but could find anything at SO or google). We're using grafana to visualize our metrics, if thats at all helpful in this scenario.
You don't need to subclass Histogram, as you don't need to use Histogram.Timer only because your histogram is measuring times.
Simply call myHistogram.observe(System.now() - lastUpdated) every time you record a new change in the database.
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 a large spreadsheet: 700+ rows, each having references to the previous row. I use reference functions: ROW(), COLUMN() and INDIRECT(), ADDRESS(). (Yes, I have considered fixing values every 50-100 rows to reduce calculation trail.)
Until recently I used OpenOffice.org and it worked fine. LibreOffice, however, when the file is opened, seems to give up after some rows and further calculations become Error 522. Sometimes a change makes it re-calculate it all and errors disappear and doesn't reappear when I undo the change. I have also found out about Ctrl-Shift-F9 (must be re-calculate), which also makes errors disappear.
Even though the file has been saved and re-saved by LibreOffice several times it still reports false Error 522 when I open the file, so it doesn't seem to be compatibility problem.
Is the problem that a very long branched out calculation trail makes the software think it will never get to the initial values and therefore it must be circular? (Which my idea of fixing values would solve.) Or could there be something else I may have missed?
UPDATE
I don't see how INDEX() would help. I want to refer to a cell immediately above or a cell from a row immediately above. Cell d46 could point to d45 or b45 or $a45, and that would work when copying a row, but not when inserting or deleting a row: If you insert a row just above, the references pointing 1 row above would start pointing 2 rows above, so each time I would have to edit the formulae. The row (each row) contains several references to the row just above, so I thought the easiest way would be INDIRECT(ADDRESS(ROW()-1,COLUMN())) for the same column or INDIRECT(ADDRESS(ROW()-1,1)) for column A... Any better solutions?
I do not know the specifics of the problem, but it sounds like it would help to simplify the formulas, as you suggested.
Another possibility is to write macros to handle some of the calculation work. Besides Basic, macros can be written in Java, which you seem to be familiar with. Macros can be called from a spreadsheet function, or called when the document is loaded.
It may also help to use a more powerful tool such as LibreOffice Base with MySQL. Often spreadsheets that need a lot of INDIRECT() and ADDRESS() are really using database-type logic.
I'd like to draw a line chart based on two columns - let's call the regarded fields cats and dogs. I know I could create a third field called animals and populate it but that seems to me as an ugly workaround.
I'm pretty sure there's no way to achieve that via the GUI so I'm hoping that editing the produced XML will open that possibility. As far I could understand this discussion, it's not possible but since it's old, I'm hoping that it's become possible since then.
Any luck on this one?
It's a bit unclear exactly what you are going for with this question. This is an excellent blog on how to modify your chart's fetchxml to extend the crm chart capabilities (and it may or may not answer your question depending on exactly what you mean by "draw a line based on two columns"): https://crmchartguy.wordpress.com/2015/06/21/compare-this-year-to-last-year-with-a-dynamics-crm-chart/