Short version:
During Band.Rendering event in an application (not in the report), what is the bound DataRowView?
Long Version:
I've create a report with 2 bands. 1 band in master and the other is detail. They linked via a Relation.
At runtime, I used a DataSet to populate the data (via RegData).
All is well.
But now I decided to listen to the Band.Rendering event from my windows application (vb code).
For each execution of the Redering event, I want to do something based on the current data. I expect this current data to be a DataRow or DataRowView since I populated by report with a DataSet (with 2 DataTables) at runtime.
I tried myBand.DataSource.Position but it is useless because it resets to 0 on every loop of the master band.
Thanx in advance for your help.
I hope I explained well what I wanted to know.
Bound DataRowView
-
- Posts: 9
- Joined: Mon Sep 17, 2007 5:50 pm
Bound DataRowView
Hello,
I'm not understand. If you want populate data from your dataset you can use property Position of datasource. This property reset to 0 for detail band on each masterband rendering. That correct too.
p.s. You can get data from datasource via following code:
object obj = report.Dictionary.DataSources["MyDataSource"]["MyField"];
This code return objects from current position in datasource.
Thank you.
I'm not understand. If you want populate data from your dataset you can use property Position of datasource. This property reset to 0 for detail band on each masterband rendering. That correct too.
p.s. You can get data from datasource via following code:
object obj = report.Dictionary.DataSources["MyDataSource"]["MyField"];
This code return objects from current position in datasource.
Thank you.
-
- Posts: 9
- Joined: Mon Sep 17, 2007 5:50 pm
Bound DataRowView
Hello Vital,
Thanx for the very prompt reply.
You solved my problem.
object obj = report.Dictionary.DataSources["MyDataSource"]["MyField"];
or
object obj = report.myBand["MyField"];
Thanx for the very prompt reply.
You solved my problem.
object obj = report.Dictionary.DataSources["MyDataSource"]["MyField"];
or
object obj = report.myBand["MyField"];
Bound DataRowView
Hello,
Thank you.
This code is not correct.arvinboggs wrote: object obj = report.myBand["MyField"];
Thank you.