本文整理汇总了C#中IReportModel类的典型用法代码示例。如果您正苦于以下问题:C# IReportModel类的具体用法?C# IReportModel怎么用?C# IReportModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IReportModel类属于命名空间,在下文中一共展示了IReportModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculatePageBounds
public void CalculatePageBounds (IReportModel reportModel)
{
MeasureReportHeader(reportModel.ReportHeader);
MeasurePageHeader(reportModel.PageHeader);
MeasurePageFooter(reportModel.PageFooter);
MeasureReportFooter(reportModel.ReportFooter);
}
示例2: CreateDataManager
public static IDataManager CreateDataManager (IReportModel reportModel,ReportParameters reportParameters)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
IDataManager dataManager = null;
ConnectionObject connectionObject = null;
IDataAccessStrategy accesStrategy = null;
if (reportParameters != null) {
connectionObject = reportParameters.ConnectionObject;
}
// if (connectionObject != null) {
// accesStrategy = new SqlDataAccessStrategy(reportModel.ReportSettings,connectionObject);
// } else {
// accesStrategy = new SqlDataAccessStrategy(reportModel.ReportSettings,null);
//
// }
accesStrategy = new SqlDataAccessStrategy(reportModel.ReportSettings);
dataManager = DataManager.CreateInstance(reportModel.ReportSettings,accesStrategy);
if (dataManager == null) {
throw new MissingDataManagerException();
}
return dataManager;
}
示例3: CalculatePageBounds
public void CalculatePageBounds(IReportModel reportModel)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
sectionBounds.MeasureReportHeader(reportModel.ReportHeader);
//PageHeader
this.sectionBounds.MeasurePageHeader(reportModel.PageHeader);
//PageFooter
this.sectionBounds.MeasurePageFooter(reportModel.PageFooter);
//ReportFooter
this.sectionBounds.MeasureReportFooter(reportModel.ReportFooter);
this.sectionBounds.MeasureDetailArea();
this.sectionBounds.DetailSectionRectangle = new System.Drawing.Rectangle(reportModel.DetailSection.Location.X,sectionBounds.DetailStart.Y,
reportModel.DetailSection.Size.Width,
reportModel.DetailSection.Size.Height);
}
示例4: ToXmlInternal
static StringWriter ToXmlInternal(IReportModel model)
{
var writer = new StringWriterWithEncoding(System.Text.Encoding.UTF8);
var xml = XmlHelper.CreatePropperWriter(writer);
var reportDesignerWriter = new ReportDesignerWriter();
XmlHelper.CreatePropperDocument(xml);
reportDesignerWriter.Save(model.ReportSettings,xml);
xml.WriteEndElement();
xml.WriteStartElement("SectionCollection");
// we look only for Sections
foreach (var section in model.SectionCollection) {
reportDesignerWriter.Save(section,xml);
}
//SectionCollection
xml.WriteEndElement();
//Reportmodel
xml.WriteEndElement();
xml.WriteEndDocument();
xml.Close();
return writer;
}
示例5: CreateInstance
public static FormPageBuilder CreateInstance(IReportModel reportModel)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
FormPageBuilder instance = new FormPageBuilder(reportModel);
return instance;
}
示例6: BasePageBuilder
public BasePageBuilder(IReportModel reportModel)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
ReportModel = reportModel;
Pages = new Collection<IPage>();
graphics = CreateGraphics.FromSize(reportModel.ReportSettings.PageSize);
}
示例7: CalculatePageBounds
public void CalculatePageBounds(IReportModel reportModel)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
sectionBounds.CalculatePageBounds(reportModel);
this.sectionBounds.DetailSectionRectangle = new System.Drawing.Rectangle(reportModel.DetailSection.Location.X,sectionBounds.DetailArea.Top,
reportModel.DetailSection.Size.Width,
reportModel.DetailSection.Size.Height);
}
示例8: CreateInstance
public static IReportCreator CreateInstance(IReportModel reportModel, IDataManager dataManager)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
if (dataManager == null) {
throw new ArgumentNullException("dataManager");
}
DataPageBuilder instance = new DataPageBuilder(reportModel,dataManager);
return instance;
}
示例9: AbstractDataRenderer
public AbstractDataRenderer(IReportModel model,
IDataManager dataManager,
ReportDocument reportDocument,
ILayouter layout):base(model,reportDocument,layout)
{
if (dataManager == null) {
throw new ArgumentNullException("dataManager");
}
this.dataManager = dataManager;
}
示例10: BasePager
public BasePager(IReportModel reportModel)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
this.ReportModel = reportModel;
//this.Layouter = layouter;
this.Layouter = new Layouter();
this.Graphics = CreateGraphicObject.FromSize(this.ReportModel.ReportSettings.PageSize);
}
示例11: BasePager
public BasePager(IReportModel reportModel,ILayouter layouter)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
if (layouter == null) {
throw new ArgumentNullException ("layouter");
}
this.reportModel = reportModel;
this.layouter = layouter;
this.graphics = CreateGraphicObject.FromSize(this.reportModel.ReportSettings.PageSize);
}
示例12: CreateDataManager
public static IDataManager CreateDataManager (IReportModel reportModel,IList dataTable)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
if (dataTable == null) {
throw new ArgumentNullException("dataTable");
}
IDataManager dataManager = DataManager.CreateInstance(dataTable,reportModel.ReportSettings);
if (dataManager == null) {
throw new MissingDataManagerException();
}
return dataManager;
}
示例13: ToXml
public static StringWriter ToXml(IReportModel reportModel)
{
int locY = reportModel.ReportSettings.TopMargin;
foreach (var section in reportModel.SectionCollection)
{
section.Location = new Point(reportModel.ReportSettings.LeftMargin,locY);
section.Size = new Size(reportModel.ReportSettings.PrintableWidth(),GlobalValues.DefaultSectionHeight + 10);
locY = locY + section.Size.Height + DesignerGlobals.GabBetweenSection;
}
var xml = ToXmlInternal(reportModel);
return xml;
}
示例14: BasePager
public BasePager(IReportModel reportModel)
{
if (reportModel == null) {
throw new ArgumentNullException("reportModel");
}
this.ReportModel = reportModel;
if (!ServiceContainer.Contains(typeof(ILayouter))) {
ServiceContainer.AddService<ILayouter>(new Layouter());
}
this.Graphics = CreateGraphicObject.FromSize(this.ReportModel.ReportSettings.PageSize);
}
示例15: BaseConverter
public BaseConverter(IReportModel reportModel,IDataNavigator dataNavigator,ExporterPage singlePage)
{
if (dataNavigator == null) {
throw new ArgumentNullException("dataNavigator");
}
if (singlePage == null) {
throw new ArgumentNullException("singlePage");
}
this.ReportModel = reportModel;
this.SinglePage = singlePage;
this.DataNavigator = dataNavigator;
this.Layouter = (ILayouter)ServiceContainer.GetService(typeof(ILayouter));
this.Evaluator = EvaluationHelper.CreateEvaluator(this.SinglePage,this.DataNavigator);
}