Setting up a TfrxDBCrossView using code

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