2 Maxtrix Questions

pinbotpinbot Texas
edited 4:40AM in FastReport .NET
2 Questions about Matrices.

1. Can you change the order of the columns? Right now it alphabetical by the displayed data. I'd like to sort by another field in the data set.

2. Can you highlight a column based on a field value (not the displayed value). i.e. I'd like the entire column in one color based on the value of a field. When I put it in the highlight collection for the column header, it works ok, but in the cell data, it highlights all the cells in the matrix (the highlight condition is true) even though only 1 column should be highlighted.

Bryan

Comments

  • pinbotpinbot Texas
    edited 4:40AM
    oops, forgot the picture of what I want!

  • edited 4:40AM
    1) You may turn off the sort and fill the matrix in code (using ManualBuild event, see user's manual "Report creation/Matrix-type reports/Examples/Example 9"). In this case the sort will be in a natural order. You may sort the data as you need, then fill the matrix.
    2) you can highlight the cell based on its value, or on the values in a row/column header. You cannot use other values (such as value of another column in a datasource).
  • pinbotpinbot Texas
    edited 4:40AM

    Actually, I found a way to make FR order it the way I want.

    Two other fields in the data set determine the order I want (a Master [1char]/Second sort[3char]). I simply created my label as the contatenation of these integer fields converted to string + the label text. I'll do a beforePrint to strip off the sorting fields and only display the label:

    [AmenityI.PropType].ToString()+[AmenityI.CompType].ToString("000")+"/"+[AmenityI.PropertyName]

    Now that my highlighted column is in column 1 always, I can do a highlight condition on ColumnIndex:

    Matrix.ColumnIndex==0

    Voila!

    Thanks for your help!

  • edited 4:40AM
    Well, good solution >

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.