Accessing other data source from data band
Accessing other data source from data band
Hi,
For each row of data printed in a data band (for data source X), I need to look up a row in data source Y. My question is, is it possible to add a function to the BeforePrintEvent of the data band (X) which will return data from Y? To do this, I will need to filter Y by a key value from X - can I access rows / filter an STI data source using ADO.NET type methods?
Thanks,
Colin
For each row of data printed in a data band (for data source X), I need to look up a row in data source Y. My question is, is it possible to add a function to the BeforePrintEvent of the data band (X) which will return data from Y? To do this, I will need to filter Y by a key value from X - can I access rows / filter an STI data source using ADO.NET type methods?
Thanks,
Colin
Accessing other data source from data band
Hello, Colin.
If it is possible you can create a relation between datasources (if they are from different datasources then you have to set Report.CacheAllData property in true).
Work on the ADO.Net level is also possible. Each DataSource has DataTable property which represents ADO.Net standard DataTable object and this DataTable contains all the data of that DataSource.
Thank you.
If it is possible you can create a relation between datasources (if they are from different datasources then you have to set Report.CacheAllData property in true).
Work on the ADO.Net level is also possible. Each DataSource has DataTable property which represents ADO.Net standard DataTable object and this DataTable contains all the data of that DataSource.
Thank you.
Accessing other data source from data band
Thank you Edward, I will give this a try.
Colin
Colin
Accessing other data source from data band
Hi,
In the code for the mrt I have the following:
Dim dtLevel As Data.DataTable
Dim drRows() As Data.DataRow
dtLevel = Level.DataTable
drRows = dtLevel.Select("levelName = 'XXX'")
The business object data source is 'Level'. The assignment to dtLevel works ok, however, the mrt is falling over on the final dtLevel.Select line. The column name is definately correct. Could you tell me where I am going wrong here please?
Thanks,
Colin
In the code for the mrt I have the following:
Dim dtLevel As Data.DataTable
Dim drRows() As Data.DataRow
dtLevel = Level.DataTable
drRows = dtLevel.Select("levelName = 'XXX'")
The business object data source is 'Level'. The assignment to dtLevel works ok, however, the mrt is falling over on the final dtLevel.Select line. The column name is definately correct. Could you tell me where I am going wrong here please?
Thanks,
Colin
Accessing other data source from data band
Hi, Colin.
Your steps are absolutely correct. If you have no idea what is wrong, feel free to submit your application and data for it to support[at]stimulsoft.com.
Thank you.
Your steps are absolutely correct. If you have no idea what is wrong, feel free to submit your application and data for it to support[at]stimulsoft.com.
Thank you.
Accessing other data source from data band
Hi Edward,
I stored the exception message in a variable which I then displayed in a text box in the report, and the problem was that the column name could not be found. The column name is definately correct, so I set the text box to display the column names from the 'Level' datatable. Much to my surprise, the 'Level' datatable contains column names for a completely different data source, the 'Vendors' business object data source.
How is it possible for the datatable for data source X to contain column names for data source Y, and how can I correct this?
Many thanks,
Colin
I stored the exception message in a variable which I then displayed in a text box in the report, and the problem was that the column name could not be found. The column name is definately correct, so I set the text box to display the column names from the 'Level' datatable. Much to my surprise, the 'Level' datatable contains column names for a completely different data source, the 'Vendors' business object data source.
How is it possible for the datatable for data source X to contain column names for data source Y, and how can I correct this?
Many thanks,
Colin
Accessing other data source from data band
Hello, Colin.
Could you please send this report to support[at]stimulsoft.com for analysis.
Thank you.
Could you please send this report to support[at]stimulsoft.com for analysis.
Thank you.
Accessing other data source from data band
OK, will do.
Thanks,
Colin
Thanks,
Colin