我和我的团队正在尝试创建订阅并以 CSV 格式导出报告,但我们需要将字段分隔符从“,”(这是默认值)更改。我们如何以编程方式 (C#) 将设备信息传递给 SSRS (2008) 订阅?
我们有一个对 ReportingServices2005 的 Web 参考。这是我们的代码示例:
string report = "Insert report here";
string desc = "A description";
string eventType = "TimedSubscription";
string matchData = "<ScheduleDefinition>...</ScheduleDefinition>";
string RenderFormat = "CSV";
ParameterValue[] reportParameters = GetReportParameters();
var extensionParams = new List<ParameterValue>();
extensionParams.Add(new ParameterValue
{
Name = Constants.EXTENSIONPARAMRENDER_FORMAT,
Value = RenderFormat
});
extensionParams.Add(new ParameterValue
{
Name = Constants.EXTENSIONPARAMFILENAME,
Value = FileName
});
// Insert more params here...
ExtensionSettings extSettings = new ExtensionSettings();
extSettings.ParameterValues = extensionParams.ToArray();
extSettings.Extension = Constants.EXTENSIONREPORTSERVERFILESHARE;
try
{
ReportingService2005 rs = new ReportingService2005();
rs.CreateSubscription(
report, extSettings, desc, eventType, matchData, reportParameters);
}
catch (SoapException e)
{
// Handle the exception
}
我们找不到传递设备信息的方法,这可能吗?