How to make a report

0
0
Hello everyone! I'm interested to know if WiseJ has any way to create a report and then print that report, or if I have to use a tool
the part. The tool I have at the moment is called ActiveReports. Is there a tutorial on how to work with ActiveReports on WiseJ? 

Thank you all.
  • You must to post comments
0
0

You could use Stilmulsoft’s report designer.

/// <summary>
/// Provides a Visual WebGui callable wrapper for Stimulsoft.Report.Web.StiWebDesigner.
/// </summary>
[System.ComponentModel.ToolboxItem(true)]
public partial class WebReportDesigner : AspNetWrapper<StiWebDesigner>
{
bool IsLoaded = false;
public WebReportDesigner()
{
InitializeComponent();

Stimulsoft.Base.StiLicense.Key = “xxxxxxxx”;
}
protected /*override*/ bool IsFixedSize
{
get
{
return true;
}
}
public override bool AutoScroll
{
get
{
return false;
}
set
{
base.AutoScroll = value;
}
}

StiCacheHelper _CacheHelper;
StiServerCacheMode _CacheMode = StiServerCacheMode.ObjectSession;
StiReportUnitType _DefaultUnit = StiReportUnitType.Centimeters;
string _GlobalizationFile = string.Empty;
string _ImagePath = string.Empty;
StiInterfaceType _InterfaceType = StiInterfaceType.Auto;
StiDesignerPermissions _PermissionBusinessObjects = StiDesignerPermissions.All;
StiDesignerPermissions _PermissionDataColumns = StiDesignerPermissions.All;
StiDesignerPermissions _PermissionDataConnections = StiDesignerPermissions.All;
StiDesignerPermissions _PermissionDataRelations = StiDesignerPermissions.All;
StiDesignerPermissions _PermissionDataSources = StiDesignerPermissions.All;
StiDesignerPermissions _PermissionVariables = StiDesignerPermissions.All;
int _PropertiesGridLabelWidth = 160;
int _PropertiesGridWidth = 370;
StiReport _Report;
string _ReportGuid = string.Empty;
TimeSpan _ServerTimeout = DateTime.UtcNow.AddSeconds(30).Subtract(DateTime.UtcNow);
StiDesignerTheme _Theme = StiDesignerTheme.Office2013LightGrayBlue;
//StiWebImageHost _WebImageHost;

public StiCacheHelper CacheHelper { get { return _CacheHelper; } set { _CacheHelper = value; } }
[DefaultValue(StiServerCacheMode.None)]
public StiServerCacheMode CacheMode { get { return _CacheMode; } set { _CacheMode = value; } }
[DefaultValue(StiReportUnitType.Centimeters)]
public StiReportUnitType DefaultUnit { get { return _DefaultUnit; } set { _DefaultUnit = value; } }
[DefaultValue(“”)]
public string GlobalizationFile { get { return _GlobalizationFile; } set { _GlobalizationFile = value; } }
[DefaultValue(“”)]
public string ImagePath { get { return _ImagePath; } set { _ImagePath = value; } }
[DefaultValue(StiInterfaceType.Auto)]
public StiInterfaceType InterfaceType { get { return _InterfaceType; } set { _InterfaceType = value; } }

[DefaultValue(StiDesignerPermissions.All)]
public StiDesignerPermissions PermissionBusinessObjects { get { return _PermissionBusinessObjects; } set { _PermissionBusinessObjects = value; } }

[DefaultValue(StiDesignerPermissions.All)]

public StiDesignerPermissions PermissionDataColumns { get { return _PermissionDataColumns; } set { _PermissionDataColumns = value; } }
[DefaultValue(StiDesignerPermissions.All)]
public StiDesignerPermissions PermissionDataConnections { get { return _PermissionDataConnections; } set { _PermissionDataConnections = value; } }
[DefaultValue(StiDesignerPermissions.All)]
public StiDesignerPermissions PermissionDataRelations { get { return _PermissionDataRelations; } set { _PermissionDataRelations = value; } }
[DefaultValue(StiDesignerPermissions.All)]
public StiDesignerPermissions PermissionDataSources { get { return _PermissionDataSources; } set { _PermissionDataSources = value; } }
[DefaultValue(StiDesignerPermissions.All)]
public StiDesignerPermissions PermissionVariables { get { return _PermissionVariables; } set { _PermissionVariables = value; } }
[DefaultValue(160)]
public int PropertiesGridLabelWidth { get { return _PropertiesGridLabelWidth; } set { _PropertiesGridLabelWidth = value; } }
[DefaultValue(370)]
public int PropertiesGridWidth { get { return _PropertiesGridWidth; } set { _PropertiesGridWidth = value; } }
[Browsable(false)]
public StiReport Report { get { return _Report == null ? new StiReport() : _Report; } set { _Report = value; } }
[Browsable(false)]
public string ReportGuid { get { return _ReportGuid; } set { _ReportGuid = value; } }
[DefaultValue(false)]
public TimeSpan ServerTimeout { get { return _ServerTimeout; } set { _ServerTimeout = value; } }
[DefaultValue(StiDesignerTheme.Office2013LightGrayBlue)]
public StiDesignerTheme Theme { get { return _Theme; } set { _Theme = value; } }

protected override void OnInit(EventArgs e)
{
var viewer = this.WrappedControl;
viewer.CacheMode = CacheMode;
viewer.DefaultUnit = DefaultUnit;
viewer.InterfaceType = InterfaceType;
viewer.PermissionBusinessObjects = PermissionBusinessObjects;
viewer.PermissionDataColumns = PermissionDataColumns;
viewer.PermissionDataConnections = PermissionDataConnections;
viewer.PermissionDataRelations = PermissionDataRelations;
viewer.PermissionDataSources = PermissionDataSources;
viewer.PermissionVariables = PermissionVariables;
viewer.PropertiesGridLabelWidth = PropertiesGridLabelWidth;
viewer.PropertiesGridWidth = PropertiesGridWidth;
viewer.Report = Report;
viewer.Theme = Theme;

// attach the handled events to fire the event on the wrapper.
if (this.CreateReport != null)
viewer.CreateReport += viewer_CreateReport;
if (this.Exit != null)
viewer.Exit += viewer_Exit;
if (this.GetReport != null)
viewer.GetReport += viewer_GetReport;
if (this.PreviewReport != null)
viewer.PreviewReport += viewer_PreviewReport;
if (this.SaveReport != null)
viewer.SaveReport += viewer_SaveReport;
base.OnInit(e);
}

private void Viewer_PreviewReport(object sender, StiReportDataEventArgs e)
{
throw new NotImplementedException();
}

void viewer_CreateReport(object sender, StiReportDataEventArgs e)
{
Application.Update(this, () =>
{
CreateReport(sender, e);
});
}

void viewer_Exit(object sender, StiReportDataEventArgs e)
{
Application.Update(this, () =>
{
Exit(sender, e);
});
}

void viewer_GetReport(object sender, StiReportDataEventArgs e)
{
Application.Update(this, () =>
{
GetReport(sender, e);
});
}

void viewer_PreviewReport(object sender, StiReportDataEventArgs e)
{
Application.Update(this, () =>
{
PreviewReport(sender, e);
});
}

void viewer_SaveReport(object sender, StiSaveReportEventArgs e)
{
Application.Update(this, () =>
{
SaveReport(sender, e);
});
}

void viewer_LoadReport(object sender, StiReportDataEventArgs e)
{
Application.Update(this, () =>
{
LoadReport(sender, e);
});
}

public event StiReportDataEventHandler CreateReport;
public event StiReportDataEventHandler Exit;
public event StiReportDataEventHandler GetReport;
public event StiReportDataEventHandler PreviewReport;
public event StiSaveReportEventHandler SaveReport;
public event StiReportDataEventHandler LoadReport;
}

  • You must to post comments
0
0

The easiest way is to use ActiveReports as you would normally and render the report to a pdf file or stream and assign the stream to pdfViewer.PdfStream. We use it in several large projects with crystal reports, stimulsoft, list & label, reporting services, and others. As a pdf viewer select the Mozilla one (which can also be hosted locally) setting pdfViewer.ViewerType.

 

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.