DBCrossView and interactive report
Hello,
I want to make interactive report with DBCrossView object. I want to make something in my app after user have clicked in the crossview cell on the report preview. I have found DblClickOnPreview event but I don't know how in this event to get information which cell was clicked. Is it possible?
--
best regards
Adam Siwon
I want to make interactive report with DBCrossView object. I want to make something in my app after user have clicked in the crossview cell on the report preview. I have found DblClickOnPreview event but I don't know how in this event to get information which cell was clicked. Is it possible?
--
best regards
Adam Siwon
Comments
Yes it works, but I have another problem. Now I know what is number of the column or row of DBCrossView. How I can get field value from particular columns or rows? Is it a simple way or I should to store these values in the OnPrintColumnHeader event?
--
best regards
Adam Siwoń
Mick
I have tried to set TagStr using DataSet.FieldByName('column_id').AsString in OnPrintCell event, but for every cell I have the same value of the field. I think the only way is save to string lists the values of columns and rows in OnPrintColumnHeader event and OnPrintRowHeader event and then prepare Memo.TagStr for every cell. I will try to do this tomorrow. Thank you for your help.
--
best regards
Adam Siwon
But you can use offical methods to work with data that DBCross passes to each cell in OnPrintCell event.
Pay attention how to get data value passed to this event - I mean Value parameter.
OnPrintColumnHeader is not fired for each cell, so you won't be able to use it for gathering data you need.
Mick
Yes I saw this when I made test. I can't get values from the dataset also in the OnPrintColumnHeader event.
The main problem is, that I don't need to have value from the cell which was clicked. The most valuable information is database identities of row and column for clicked cell.
Today I solved this problem. In the OnPrintCell event I'm reading column and row header values in the following way:
And then in the DBCross1Cell0OnPreviewDblClick I can read from these values from TagStr property and find appropriate identity value for row and column in the source DataSet.
Thank you very much for help.
--
best regards
Adam
Can you give me any suggestion on that?
Mick