本文整理汇总了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);
}
}