Setting up a TfrxDBCrossView using code

edited 10:30PM in FastReport 3.0
Hi,

Hope anyone can help me with this one. I'm having some trouble with the TfrxDBCrossView component.

I'm dynamically creating an sql query for a CrossObject from a class model. It currently returns a dataset with three fields RowDataField, ColDataField and CellDataField. From code I add the dataset to a report and set up the crossview.

Up until now everything went well with what i have but now i'm running into trouble with the following.

I need to generate a report containing a cross view showing the number of 'calls' per 'category' against 'priority'. I need to show all 'categories' and all 'priorities' available even if they are not referred by any 'call'. Secondly all the 'categories' should be shown in a known order because it is a tree structure. In the tree it is possible that there are multiple elements with the same name so i need to fetch the data where RowDatafield is the ID but the name of the element should be displayed in the cross view.

How do I build such a cross view from code? Can i still do it with a TfrxDBCrossView or must i revert to another way on doing it ?

Any tips or pointers would be most welcome.

Greetings,

Daniel Hooymans
Welcome CCS

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.