本文整理匯總了C#中fyiReporting.RDL.Report.RunGetData方法的典型用法代碼示例。如果您正苦於以下問題:C# Report.RunGetData方法的具體用法?C# Report.RunGetData怎麽用?C# Report.RunGetData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類fyiReporting.RDL.Report
的用法示例。
在下文中一共展示了Report.RunGetData方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: LoadReport
/// <summary>
/// Loads the report.
/// </summary>
/// <param name='filename'>
/// Filename.
/// </param>
/// <param name='parameters'>
/// Example: parameter1=someValue¶meter2=anotherValue
/// </param>
public void LoadReport(Uri filename, string parameters)
{
string source;
System.Collections.Specialized.ListDictionary ld;
this.parameters = parameters;
// Any parameters? e.g. file1.rdl?orderid=5
if (parameters.Trim() != "")
{
ld = this.GetParmeters(parameters);
}
else
{
ld = null;
}
// Obtain the source
source = System.IO.File.ReadAllText(filename.AbsolutePath);
// GetSource is omitted: all it does is read the file.
// Compile the report
report = this.GetReport(source);
// Obtain the data passing any parameters
report.RunGetData(ld);
// Render the report in each of the requested types
string tempFile = System.IO.Path.GetTempFileName();
ExportReport(report, tempFile, OutputPresentationType.PDF);
LoadPdf(new Uri(tempFile));
}
示例2: GetPages
private Pages GetPages(Report report)
{
Pages pgs = null;
ListDictionary ld = GetParameters(); // split parms into dictionary
try
{
report.RunGetData(ld);
pgs = report.BuildPages();
if (report.ErrorMaxSeverity > 0)
{
if (_errorMsgs == null)
{
_errorMsgs = report.ErrorItems; // keep a copy of the errors
}
else
{
foreach (string err in report.ErrorItems)
{
_errorMsgs.Add(err);
}
}
report.ErrorReset();
}
}
catch (Exception e)
{
string msg = e.Message;
}
return pgs;
}
示例3: Rebuild
public void Rebuild()
{
_report = this.GetReport(SourceRdl);
_report.RunGetData(Parameters);
pages = _report.BuildPages();
List<ReportArea> tempList = new List<ReportArea>();
foreach (ReportArea w in this.vboxPages.Children)
{
tempList.Add(w);
}
foreach (ReportArea w in tempList)
{
vboxPages.Remove(w);
}
for (int pageCount = 0; pageCount < pages.Count; pageCount++)
{
ReportArea area = new ReportArea(this.DefaultBackend);
area.SetReport(_report, pages[pageCount]);
vboxPages.PackStart(area, true, true);
}
this.Show();
if (_report.ErrorMaxSeverity > 0)
{
// TODO: add error messages back
//SetErrorMessages(report.ErrorItems);
}
}