Current Data Row Field Value

Stimulsoft Reports.NET discussion
Post Reply
admin@secsol.co.uk
Posts: 63
Joined: Wed Jun 01, 2022 8:26 am

Current Data Row Field Value

Post by admin@secsol.co.uk »

How do I get the current value of a DataRow field bound to a DataBand so I can pass that value to a custom function?
Lech Kulikowski
Posts: 7510
Joined: Tue Mar 20, 2018 5:34 am

Re: Current Data Row Field Value

Post by Lech Kulikowski »

Hello,

You can use DataSourceName.ColumnName in the expression on the databant to get the current value.

Thank you.
admin@secsol.co.uk
Posts: 63
Joined: Wed Jun 01, 2022 8:26 am

Re: Current Data Row Field Value

Post by admin@secsol.co.uk »

Thank you
admin@secsol.co.uk
Posts: 63
Joined: Wed Jun 01, 2022 8:26 am

Re: Current Data Row Field Value

Post by admin@secsol.co.uk »

I have a DataBand with a Data table as the source called StockTable.

In the Quantity filed on that data band in the BeforePrint event I call a function called "AdjustQuantity" passing in the current record data (or so I thought) using :

AdjustQuantity(StockTable.Quantity,StockTable.Pin);

But the values passed to the AdjustQuantity function always appear to be for the first record in the DataTable.
Lech Kulikowski
Posts: 7510
Joined: Tue Mar 20, 2018 5:34 am

Re: Current Data Row Field Value

Post by Lech Kulikowski »

Hello,

Do you set the DataSource property for this databand? If no, then it is correct, will always be the first record.

Thank you.
Post Reply