How to make group headers work?
How can I get the group header text printed down the side of the master data (preferably rotated by 90 degrees as well)?
ie.
ie.
GroupHeader (GROUP BY Day Number)
----------------------------
| master data about day 1
D | master data about day 1
A | master data about day 1
Y | master data about day 1
| master data about day 1
1 | master data about day 1
| master data about day 1
----------------------------
Group Footer
----------------------------
| master data about day 2
D | master data about day 2
A | master data about day 2
Y | master data about day 2
| master data about day 2
2 | master data about day 2
| master data about day 2
----------------------------
Group Footer
I've tried playing with vertical bands can cannot see how to make them work and searching for 'vertical band' in all the manuals produces almost no hits.
Comments
in the obp event of the retreive the engine's cury and store in a variable
in the oap event of the memo set the engine cury to the variables value
Sorry Gordk there seems to be some words missing in your reply and I cannot really understand what you mean.
Which object's obp do I use to retrieve the engine's curY. Do you mean the memo in the group header?
And how to I retrieve the engine's curY?
I tried writing these two procedures in the obp and oap events of the memo in the group header but got an unidentified error message on frxreport1 (which is the correct name of the report)
However my data comes from a clientdataset (as the original database is SQLite) . This is linked to my report via a TfrxDBDataset so I don't think I can use ADOQueries on the data page as you do.
In my cased I cannot really see how I can make the query for the subreport use the value of the grouping field in its where clause.
@ Gordk
Ok I've managed to make the code work using just CurrentY := engine.curY; and engine.curY:=CurrentY;
However the height of the memo in the group header seems fixed at whatever I design it as.
Is there a way to make its height the same as the the space taken up by the master data band (which is not known beforehand)
Maybe gpi's subreport is the way to go?
@gpi
I've worked out how to translate your ADO queries into the ones I need for SQLite.
I have then loaded in your template (complete with all the stretched/stretch mode values and wordwrap set to true as you had them) and simply changed the fields displayed to those from my data. However the vertical text still does not adjust to fit the sub report (see screenshot)
OK I've narrowed down the problem and it looks like it may be a bug in FR.
I've put a memo in a master data band. On the right hand side of it there is a sub repport.
I've set the stretch mode of the memo to smMaxHieght and set the data band's stretched to true.
The memo's word wrap is set to true.
That report works OK with the memo stretching to fit the size of the sub report (see screenshot 1).