Band "header" on left edge, and "footer" on right edge

edited November 2014 in FastReport 4.0
I'm using FR 4 for the first time. I'd like my multi-column band to have something equivalent to a "header" on the left edge, and a "footer" on the right edge.

My report has a TfrxSubdetailData divided into 4 columns. This particular section should appear as a mini-table. That is, to the left of that band, there should be some "row labels" -- labels that apply to all four columns. And to the right, the there should be row suffixes -- effectively, additional row labels.

For example, this section should have a layout something like,
                  Northbound  Southbound  Eastbound  Westbound
Through Volume:       540         620        380        407     vehicles/hour
Left-turn Volume:      79          45         51         63     vehicles/hour
Right-turn Volume:     38          82         54         61     vehicles/hour

What is the best way to do this?

If it makes a difference, not all rows in this mini-table will have the same type of data. That is, a few rows will show the "volumes" measured in vehicles/hour (as shown in the above example), while other rows will show the number of lanes, the lane widths, etc.

Using a multi-column band has worked out very nicely for me for populating the contents of the mini-table, but I haven't figured out how to add row labels. I understand that FR supports cross-tab reports, and these would seem to be better suited for this purpose, but most of my report is not a table -- just this one subdetail data band (and one other that I'll create next).

Comments

  • edited 4:09PM
    Any way to adjust the horizontal position and width of a band? Each time I set the Left and/or Width of the band in the Designer, they soon get reverted to 0 and full width.

    For my purposes, it would suffice to simply put extra data bands to the left and to the right of my existing band.
  • edited 4:09PM
    <snip>...</snip>
                      Northbound  Southbound  Eastbound  Westbound
    Through Volume:       540         620        380        407     vehicles/hour
    Left-turn Volume:      79          45         51         63     vehicles/hour
    Right-turn Volume:     38          82         54         61     vehicles/hour
    
    <snip>...</snip>

    A workaround has given me acceptable results. I added two additional columns to my multi-column band, and for the Memo of the TfrxMemoView on each row, I coded a script to print a column-dependent value. So the first column prints a row label, the last column prints the units, and the interior columns print the data. A typical script looks something like
    [IIF(<ApproachDataSet."ApproachDirection"> = -1, 
        'Through Volume:',
        IIF(<ApproachDataSet."ApproachDirection"> > 3, 
            'veh/hr', 
            <ApproachDataSet."VolumeThrough">))]
    

    It's a shade more cumbersome than I'd hoped, and it doesn't allow different widths for the data columns compared to the "header" or "footer" columns, but the result generally satisfies my needs.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.