Hello,
I implement reports and use IReportSourceResolver. When report viewer asks for a report, the method is called 3x. I need to load data into the report using objectDataSource. But the problem is that the parameters from currentParameterValues are loaded only in the first call (OperationOrigin.ResolveReportParameters). In the other two, the variable is already empty. Can you please help me?
Thank you
public ReportSource Resolve(string uri, OperationOrigin operationOrigin, IDictionary<string, object> currentParameterValues){
var reportPackager = new ReportPackager();
var report = Construct.CommonManager.Report.GetModelFromUri(uri);
if (report == null)
{
throw new FileNotFoundException();
}
MemoryStream stream = new(report.Data);
Telerik.Reporting.Report report1 = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(stream);
var instanceReportSource = new InstanceReportSource
{
ReportDocument = report1
};
if (operationOrigin == OperationOrigin.ResolveReportParameters)
{
}
else if (operationOrigin == OperationOrigin.CreateReportInstance)
{
}
else if (operationOrigin == OperationOrigin.GenerateReportDocument)
{
}
return instanceReportSource;
}