Hello,
I´m trying to get a value from column by index, but it is not working.
public void txt_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
e.Value = ToString(sender, Data.Columns.ToString(), true);
}
If I call this, only column name will appear in databand, I also tried this:
public void txt_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
e.Value = ToString(sender, Data.Rows[0].ToString(), true);
}
But this time the rows in databand are the same (containing the same value).
If I call this:
public void txt_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
e.Value = ToString(sender, Data.Col1, true);
}
It is working, but I need to specify the column index, because columns are added dynamically.
Could youe help me?
Thank you. Filip
Column value from index
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Column value from index
Hello,
Please check the following expression:
{DataSourceName.DataTable.Rows[RowIndex][ColumnIndex]}
or
{DataSourceName.DataTable.Rows[RowIndex]["ColumnName"]}
Thank you.
Please check the following expression:
{DataSourceName.DataTable.Rows[RowIndex][ColumnIndex]}
or
{DataSourceName.DataTable.Rows[RowIndex]["ColumnName"]}
Thank you.
Re: Column value from index
Hello,
It did not work. In databand it is showing same value in all rows.
I had to use system variable Line and Column. Then increment the Column variable.
Thank you!
It did not work. In databand it is showing same value in all rows.
I had to use system variable Line and Column. Then increment the Column variable.
Code: Select all
public void txt_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
e.Value = ToString(sender, Data.DataTable.Rows[Line-1][Column-1], true);
Column ++;
}
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Column value from index
Hello,
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Re: Column value from index
Hello,
I have another question. I would like to get a total sum of all dynamically added columns. Is it possible to use Text_Sum.CalcItem(Data.Column) with column index? I mean something like: Text_Sum.Calcitem(Data.Column[1]).
Thank you.
I have another question. I would like to get a total sum of all dynamically added columns. Is it possible to use Text_Sum.CalcItem(Data.Column) with column index? I mean something like: Text_Sum.Calcitem(Data.Column[1]).
Thank you.
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Column value from index
Hello,
It is difficult to say something without a sample report.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
It is difficult to say something without a sample report.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.