2015-08-25 30 views
0

我目前正在使用因變量的報告,但我似乎無法使其正常工作。例如,我使用Northwind數據庫並在ASP.NET MVC應用程序中創建Business Objects,然後加載預先設計的.mrt文件並將BO提供給它。這是我迄今所做的:如何在Stimulsoft報表中正確配置Business Objects中的因變量?

public ActionResult GetDependentVariablesSnapshot() 
    { 
     string reportFile = Server.MapPath("~/bin/DependentVariables.mrt"); 
     StiReport report = new StiReport(); 
     report.Load(reportFile); 
     var reportBO = new DependentVariables(); 
     var BOs = new List<StiBusinessObjectData>(); 
     BOs.Add(new StiBusinessObjectData("", "DependentVariables", reportBO)); 
     report.RegBusinessObject(BOs); 
     report.Dictionary.SynchronizeBusinessObjects(); 
     return StiMvcViewer.GetReportSnapshotResult(report); 
    } 

下面是在設計應用程序我的字典面板: http://i.stack.imgur.com/zAEZE.png

而這裏的兩個變量的配置(類別及產品):http://i.stack.imgur.com/dbT7H.png

我測試它和Business Objects已正確映射,並顯示數據。但是,在報告頂部的參數表格中,雖然「類別」選擇已正確填充,但「產品」選項顯示所有產品,並且即使我更改「類別」選擇。 我想我可能會錯誤地配置一些東西,但我不確定是什麼。

回答

0

因變量功能不適用於Business Objects。

相關問題