Question

I want to show MIN(), AVG(), MAX() for 5 measurements.

Given my screen real-estate, it woudl be much better to display my DG grid vertically than horizntally.

I would like to have a DB grid with 2 columns and 15 rows, rather than vice-versa.

But how would I get the text into the first coumn (e.g "Measurement 1 MIN()")? I would much prefer to use a DB grid, rather than a table of 1 x 15 with 15 TLabels to the left of it, but I don't want to store the "column (actually row) titles" in my database.

I hope that I described this clearly - please ask for clarification if not - and that someone can help.

Was it helpful?

Solution

A DBGrid displays the data from a data source. If you want the output to change, change the data - this means you have to do the pivot in your query instead. (I gave you a search term with the bold text, BTW; you want to pivot the data. I can't provide any more info, because a) you didn't say what database you're using, and b) that would be a separate question not related to Delphi.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top