Bound DataRowView

Stimulsoft Reports.NET discussion
Post Reply
Arvin Boggs
Posts: 9
Joined: Mon Sep 17, 2007 5:50 pm

Bound DataRowView

Post by Arvin Boggs »

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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Bound DataRowView

Post by Vital »

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.
Arvin Boggs
Posts: 9
Joined: Mon Sep 17, 2007 5:50 pm

Bound DataRowView

Post by Arvin Boggs »

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"];
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Bound DataRowView

Post by Vital »

Hello,
arvinboggs wrote: object obj = report.myBand["MyField"];
This code is not correct.

Thank you.
Post Reply