This is the first I am trying to handle something unusuel in the ondrawcommand event. Please could you help me, to know how to access the record clicked, while displaying a report. Thanks for your help Regards Ben
What exactly would you like to accomplish? Once all drawcommands have been generated, the dataset has been fully traversed so when you click on the drawcommand, it has no concept of the record that was traversed when it was created.
It should be possible to keep track of the record traversed in the OnDrawCommandClick event for use later when it is clicked.
Hi Nico, Thank you for your quick answer. Here is what I want to achieve: The report I am designing is a general ledger for an accounting system. When an end user click a line in the preview, an ondrawcommand event is fired, and I want to get the record for the line clicked, and show another report, which gives all transactions related to the transaction the user has clicked. I noticed that in the ondraw event that the information are all related to the first record. I don't know if this is at all possible, as I want to work at the record level. Regards Ben
Take a look at demo 153 (dm0153.pas) located in the \Demos\1. Reports\... directory. This demo shows how to spawn a new report for each record clicked in the main report. Although the example spawns a new report as a new tab, the same concepts would apply if you want to create a complete new report.
Comments
What exactly would you like to accomplish? Once all drawcommands have been
generated, the dataset has been fully traversed so when you click on the
drawcommand, it has no concept of the record that was traversed when it was
created.
It should be possible to keep track of the record traversed in the
OnDrawCommandClick event for use later when it is clicked.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you for your quick answer.
Here is what I want to achieve:
The report I am designing is a general ledger for an accounting system. When
an end user click a line in the preview, an ondrawcommand event is fired,
and I want to get the record for the line clicked, and show another report,
which gives all transactions related to the transaction the user has
clicked. I noticed that in the ondraw event that the information are all
related to the first record. I don't know if this is at all possible, as I
want to work at the record level.
Regards
Ben
Take a look at demo 153 (dm0153.pas) located in the \Demos\1. Reports\...
directory. This demo shows how to spawn a new report for each record
clicked in the main report. Although the example spawns a new report as a
new tab, the same concepts would apply if you want to create a complete new
report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Regards
Ben