Hello,
I am creating a report that pulls data from an SqlDataSource object. In the report's C# code-behind, I need to access the same data that the report uses to generate a string for an informational QR code on the report. Right now, I am pulling the data a second time from the same table through a data source for the project (DataSet object).
I'm wondering if there is a more efficient way to do this, as in a way to read the same data that the report has already selected. I've explored the SqlDataSource object's properties, but I'm pretty new to this and nothing seems to work there. Another solution could be to use an expression to pass all the values in a field from the report designer to a method in the code-behind, but I can't figure out how to do that either.
I'm not sure if this makes a difference, but in the report, the SqlDataSource is only used by a table and by the report parameters.
Let me know if more information is needed, and thanks in advance!