|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: |
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using BEC.Logger;
using BECScheduler.RS2005;
using BECScheduler.rsExecService;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Printing;
namespace ReportServerProject
{
public class MyReportRenderer
{
private BECScheduler.RS2005.ReportingService2005 rs;
private BECScheduler.rsExecService.ReportExecutionService rsExec;
public string renderTest(string rptname,string sDate,string eDate,string printerName)
{
rs = new ReportingService2005();
rsExec = new ReportExecutionService();
rs.Credentials = new System.Net.NetworkCredential("user","pass","domain");
rsExec.Credentials = new System.Net.NetworkCredential("user","pass","domain");
rs.Url = "http://server/ReportServer_mssql2008/ReportService2005.asmx";
rsExec.Url = "http://server/ReportServer_mssql2008/ReportExecution2005.asmx";
string historyID = null;
string deviceInfo = null;
string format = "CSV";
Byte[] results;
string encoding = String.Empty;
string mimeType = String.Empty;
string extension = String.Empty;
BECScheduler.rsExecService.Warning[] warnings = null;
string[] streamIDs = null;
// Default Path;
string fileName = @"c:\samplereport.csv";
string _reportName = rptname;//@"/Trend Log Reporting/TrendReport/";
string _historyID = null;
bool _forRendering = false;
BECScheduler.RS2005.ParameterValue[] _values = null;
BECScheduler.RS2005.DataSourceCredentials[] _credentials = null;
BECScheduler.RS2005.ReportParameter[] _parameters = null;
try
{
_parameters = rs.GetReportParameters(_reportName, _historyID, _forRendering, _values, _credentials);
BECScheduler.rsExecService.ExecutionInfo ei = rsExec.LoadReport(_reportName, historyID);
BECScheduler.rsExecService.ParameterValue[] parameters = new BECScheduler.rsExecService.ParameterValue[2];
if (_parameters.Length > 0)
{
parameters[0] = new BECScheduler.rsExecService.ParameterValue();
parameters[0].Label = "";
parameters[0].Name = "SDate";
parameters[0].Value = sDate;
parameters[1] = new BECScheduler.rsExecService.ParameterValue();
parameters[1].Label = "";
parameters[1].Name = "EDate";
parameters[1].Value = eDate;
}
rsExec.SetExecutionParameters(parameters, "en-GB");
results= rsExec.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);
using (FileStream stream = File.OpenWrite(fileName))
{
stream.Write(results, 0, results.Length);
}
}
catch (Exception ex)
{
new BEC.Logger.Logger().ErrorLog(ex.Message);
throw ex;
}
return (fileName);
}
}
}
|
Advertisement
| Hall of Fame |