报表工具Stimulsoft 激活集合,涵盖大部分控件激活方式(上)

购买订阅/许可证后,您可以通过从个人/公司帐户下载来获取许可证密钥。要登录您的帐户,请使用在购买产品订阅期间提供的用户名和密码。在“订阅”部分中,您会发现“如何激活”按钮。单击此按钮,您将进入下一页,您可以在其中复制字符串格式的激活密钥或下载包含激活密钥的许可证文件。使用密钥激活的组件可以部署在任何项目中,没有互联网连接也可以激活。

对于 JS 组件,可以生成链接到特定域名的许可证密钥。该许可证密钥不会激活任何其他域名上的 Stimulsoft 组件。

在今天的文章中,我们将讨论利用仪表板中的 SumIf() 和 CountIf() 函数进行数据分析的功能。这些函数用于对数据字段值求和或根据特定条件对值的出现次数进行计数。在本文中,我们的重点将是这些函数在 Table 元素中的应用。但得注意的是,它们同样适用于执行数据分析的其他仪表板元素。在进行全面回顾之前,让我们花点时间回顾一下如何在仪表板中处理数据字段值。

有哪些激活方法可用?

完整的激活方法取决于组件及其运行的框架。在大多数情况下,您可以使用文件或字符串中的密钥激活组件。然而,对于某些报告组件,激活选项还包括字节数组、流或程序集的利用。

WinForms 的报告和仪表板工具(Windows Forms)

需要订阅:

请在初始化组件之前使用表单方法激活许可证。

Form1.cs

public partial class Form1 : Form
{
public Form1()
{
//Activation with using license code
Stimulsoft.Base.StiLicense.Key = "Your activation code...";

//Activation with using license file
Stimulsoft.Base.StiLicense.LoadFromFile("license.key");

//Activation from byte array
Stimulsoft.Base.StiLicense.LoadFromBytes(bytes);

//Activation from stream
Stimulsoft.Base.StiLicense.LoadFromStream(stream);

//Activation from assembly
Stimulsoft.Base.StiLicense.LoadFromEntryAssembly(assembly, "stimulsoft-license.key");

InitializeComponent();
}
}
适用于 (WPF) 的报告和仪表板工具

需要订阅:

在初始化组件之前,在 MainWindow 方法中激活许可证。

MainWindows.xaml.cs

public partial class MainWindow : Window
{
public MainWindow()
{
//Activation with using license code
Stimulsoft.Base.StiLicense.Key = "Your activation code...";

//Activation with using license file
Stimulsoft.Base.StiLicense.LoadFromFile("license.key");

//Activation from byte array
Stimulsoft.Base.StiLicense.LoadFromBytes(bytes);

//Activation from stream
Stimulsoft.Base.StiLicense.LoadFromStream(stream);

//Activation from assembly
Stimulsoft.Base.StiLicense.LoadFromEntryAssembly(assembly, "stimulsoft-license.key");

InitializeComponent();
}
}
用于 ASP.NET WebForms 的报告和仪表板工具

需要订阅:

在类的静态构造函数中激活许可证。

Default.aspx.cs

public partial class _Default : Page
{
static _Default()
{
//Activation with using license code
Stimulsoft.Base.StiLicense.Key = "Your activation code...";

//Activation with using license file
var path = HttpContext.Current.Server.MapPath("license.key");
Stimulsoft.Base.StiLicense.LoadFromFile(path);
}
}
适用于 ASP.NET MVC 的报告和仪表板工具

需要订阅:

在控制器的静态构造函数中激活许可证。

HomeController.cs

public class HomeController : Controller
{
static HomeController()
{
//Activation using license code
Stimulsoft.Base.StiLicense.Key = "Your activation code...";

//Activation using license file
var path = System.Web.HttpContext.Current.Server.MapPath("~/Content/license.key");
Stimulsoft.Base.StiLicense.LoadFromFile(path);
}
}
适用于 ASP.NET Core MVC 的报告和仪表板工具

需要订阅:

在控制器的静态构造函数中激活许可证。

HomeController.cs

//Activation using license code
public class HomeController : Controller
{
static HomeController()
{
Stimulsoft.Base.StiLicense.Key = "Your activation code...";
}
}

//Activation using license file
public class HomeController : Controller
{
public HomeController(IHostingEnvironment hostEnvironment)
{
var path = Path.Combine(hostEnvironment.ContentRootPath, "Content\\license.key");
Stimulsoft.Base.StiLicense.LoadFromFile(path);
}
}
适用于 ASP.NET Core Razor 的报告和仪表板工具

需要订阅:

在页面的静态构造函数中激活许可证。

Index.cshtml.cs

//Activation using license code
public class IndexModel : PageModel
{
static IndexModel()
{
Stimulsoft.Base.StiLicense.Key = "Your activation code...";
}
}

//Activation using license file
public class IndexModel : PageModel
{
public IndexModel(IWebHostEnvironment webHostEnvironment)
{
var path = Path.Combine(webHostEnvironment.ContentRootPath, "Content\\license.key");
Stimulsoft.Base.StiLicense.LoadFromFile(path);
}
}

Blazor Server 的报告和仪表板工具

需要订阅:

在页面初始化事件中激活许可证。

Index.razor

@using Stimulsoft.Report
@using Stimulsoft.Report.Blazor
@using Stimulsoft.Report.Web
<StiBlazorViewer />
@code
{
protected override void OnInitialized()
{
//Activation using license code
Stimulsoft.Base.StiLicense.Key = "Your activation code...";
//Activation using license file
Stimulsoft.Base.StiLicense.LoadFromFile("Content/license.key");
base.OnInitialized();
}
}

继续浏览《报表工具Stimulsoft 激活集合,涵盖大部分控件激活方式(下)》

猜你喜欢

转载自blog.csdn.net/m0_67129275/article/details/132872036
今日推荐