Chat Icon

How to Integrate Predictive Forecasting in Paginated Reports [Webinar Show Notes]

Predictive Forecasting

How to Integrate Predictive Forecasting in Paginated Reports [Webinar Show Notes]

This blog provides show notes for our July 28, 2022, webinar, “How to Integrate Predictive Forecasting in Paginated Reports.” The webinar was presented by Syncfusion Software Developer Divakar Perumal. A recording of the webinar is on our YouTube channel and embedded here.

Introduction

Predictive analytics uses statistics and modeling techniques to forecast the path to your business goals, and both see and rectify obstacles.

Use predictive analytics for:

  • Analysis of historical and real-time data: Uses various statistical techniques from data mining, predictive modeling, and machine learning to analyze historical and real-time data.
  • Insight into future trends and business movements: Assists you in identifying potential concerns, making smarter decisions, and measuring the impact of those actions.​

Importance

Predictive analytics is being used by businesses to solve complex challenges and identify new opportunities.

  • Identify untapped opportunities: Marketers can identify untapped markets and clients likely to spend the most, resulting in the highest revenues for the company in the long run.
  • Predict and quantify risks: You can find trends and patterns in your data to identify potential risk areas and predict how these risks will influence your business.
  • Monitor business performance: To avoid risk and increase customer retention by spotting signs of dissatisfaction.
  • Improve product quality: Improve your product quality by focusing on the correct target audience, the right segments that are most important to their business.
  • Improve decision-making: By analyzing and predicting all aspects of consumer behavior, make better decisions and define the best way to communicate with your customers.

Types

There are a variety of predictive data models available to meet specific requirements. We examined some key models used by analytics professionals to generate useful insights.

  • Classification model: It predicts binary outcomes by classifying data into categories based on learning from historical data.
  • Forecast model: It deals with metric value prediction, estimating a numeric value for new data based on historical data.
  • Outlier model: It identifies anomalous or odd behaviors either by themselves or in conjunction with other numbers and categories.
  • Clustering model: It sorts data into separate, nested smart groups based on similar attributes.
  • Time series model: It collects a sequence of data points captured, using time as the input parameter. It utilizes the last year of data to develop a numerical metric and predicts the next three to six weeks of data using that metric.

Forecast model

The forecast model is one of the most popular types of predictive data analytics that uses historical data to forecast responses to numerical inquiries such as money and web traffic. Firms can use this method to estimate future events in their business, such as sales, revenue, and website maintenance, for better decision-making.

In Bold Reports, we use a forecast model to predict future data.

Forecast Model for Predictive Analytics | Report Tools Software
Forecast Model for Predictive Analytics

Our Bold Reports undergo a lifecycle to prepare, predict, and forecast the data. You will configure the numeric data column on the design surface’s x and y axes of a chart report item.

The data is retrieved from the data source and sent to the predictive analytics engine of Syncfusion’s Data Integration Platform. The data is processed and transformed by running exponential smoothing machine learning scripts.

Exponential smoothing is a broadly accurate principle for time series data forecasting using the exponential window function.

The resultant data is sent to our Bold Reports component and visualized using a chart inside the paginated report as forecasted data.

Configuration of the forecast extension in an ASP.NET Core application

Let’s see the steps to create a paginated report with a chart to showcase sales forecasting.

The ASP.NET Core Report Designer application is used here, and you can create a report by referring to our Bold Reports getting started help documentation.

To install the BoldReports.CRI.PredictiveAnalytics package, right-click on the solution and open the Manage NuGet Packages for Solution option.

Manage Nuget Packages for Solution option | Report Tools Software
Manage NuGet Packages for Solution option

Search for the package and install it in your application. This package contains the custom report item extension for the forecasting model.

BoldReports.CRI.PredictiveAnalytics Package Page | Report Tools Software
BoldReports.CRI.PredictiveAnalytics Package Page

Note: “BoldReports.CRI.PredictiveAnalytics” package is available from Bold Reports version 4.2.

Next, open Startup.cs to add the forecast extension to the Bold Report Designer. Add the following configuration codes in the Startup method.

List<string> extension = new List<string>();
extension.Add("BoldReports.CRI.PredictiveAnalytics");
ReportConfig.DefaultSettings = new ReportSettings() { }.RegisterExtensions(extension);
Startup.cs File Page | Report Tools Software
Startup.cs File Page

Now, the application is ready, and you can click Run to view the initial output. The application will launch automatically in the default browser.

Report Designer Page | Report Tools Software
Report Designer Page

Next, open the Monthly Sales forecast report. This data is from the AdventureWorks sample SQL data source.

Montly Sales Forecast Designer Page | Report Tools Software
Montly Sales Forecast Designer Page

The following query retrieves the sales data of our company within the selected date range from our database and executes the query.

Query Designer Page | Report Tools Software not uploaded
Query Designer Page

Enter the start and end dates like in the following image and click OK. Then click Finish.

Parameter Page for Date Range | Report Tools Software
Parameter Page for Date Range

Let’s see the report’s output by clicking on the Preview button. It displays the sales data in the table for the selected date ranges.

Monthly Sales Forecast Preview Page | Report Tools Software
Monthly Sales Forecast Preview Page

Let’s change the dates in the parameters and see the output for a different date range. You can see the changes in the table according to the parameter values.

Date Range Modified for Monthly Sales Forecast | Report Tools Software
Date Range Modified for Monthly Sales Forecast

We can go back to the design to add some charts.  Let’s see how to enable forecasting.

Enable forecasting

Drag the Smooth Line Chart report item onto the design surface and change the title to Monthly Sales Forecast.

Monthly Sales Forecast for Smooth Line Chart | Report Tools Software
Monthly Sales Forecast for Smooth Line Chart

Now, switch to the Data panel. As we discussed earlier, the forecast model works with numeric data. So the forecast option has some requirements: we should have only one numeric data column added to the x-axis and y-axis.

Now, drag the OrderDate field to the Column section and the Sales field to the Y Value(s) section.

In this case, we are visualizing monthly sales, and the chart is going to forecast sales for future months based on the data. If the chart has multiple columns or non-numeric columns used, then the forecast won’t work.

The database contains daily sales data. So, we need to group the data into months for the monthly sales forecast.

Data Panel for Smooth Line Chart | Report Tools Software
Data Panel for Smooth Line Chart

Click the setting icon in the Column section, choose the group option, edit the group expression to Month, and click OK.

Expression Dialog Box | Report Tools Software
Expression Dialog Box

In the Label Format under the Category Axis, change the Type to Date and choose the date format. Then click OK and change the Label Rotation to -60.

Category Axis Property | Report Tools Software
Category Axis Property

Under the Value Axis, change the Label Format to C0.

Value Axis Property | Report Tools Software
Value Axis Property

Let’s see a preview of the report without enabling the forecasting property.

Preview for Monthly Sales Forecast without forecasting | Report Tools Software
Preview for Monthly Sales Forecast without forecasting

A new option called Forecast Settings is available in the chart report item. Expand the forecast properties and enable the forecast. It comes with different settings options to customize the forecast data.

Now, you can see the additional forecast upper and lower bound series in the designer UI. You can customize the color of the forecast series.

Forecast Length can define the number of forecast data points to be included. The default length will be 10. Set it to 4 to see the next four months’ forecast data.

Confidence can define the range for the upper and lower bound values. By default, the confidence interval will be set to 95. You can increase it up to 100 percent and take it down to 50. Here, set it to 98. You can also customize the color of the confidence.

You can change the line style of the forecast Confidence Band Style to fill for a better look.

Seasonality will be predicted automatically based on seasonal input data. This option can be used if you want to set any seasonality points explicitly for your seasonal input data. We have set it to 6.

Forecast Settings property | Report Tools Software
Forecast Settings property

The changes in the chart design area can be seen based on the selected settings. Let’s click Preview to see the actual forecast output for our data.

Preview for Monthly Sales Forecast with forecasting | Report Tools Software
Preview for Monthly Sales Forecast with forecasting

The resultant chart generates the future prediction data as per the confidence settings given in the design.

Let’s change the dates and see the forecast result for the different date ranges.

Date Range Modified for Smooth Line Chart | Report Tools Software
Date Range Modified for Smooth Line Chart

The forecast results changed as per the date input.

Supported functionalities

  • Line chart type: Forecasting is enabled for only the line chart types.
  • Numeric data: The axis value must be a numeric and whole number that increases uniformly.
  • Single category and value axis: You should add one x-axis and one y-axis to the chart; multiple axes are not allowed.
  • Exponential smoothing: Currently, the exponential smoothing method is used in the forecasting model, and we already have plans to add other models and types in our upcoming releases.

Conclusion

I hope this blog provided a clear idea of integrating predictive forecasting into paginated reports. I hope you enjoyed this webinar and that you’ll keep an eye out for future Bold Reports webinars.

Look at our demo samples and documentation site to learn more. If you have any questions, please post them in the comments section. You can also contact us through our contact page or, if you already have an account, you can log in to ask your support question.

Bold Reports offers a 15-day free trial that does not require a credit card. We invite you to sign up and experience Bold Reports for yourself. Give it a try and let us know what you think!

Leave a Reply

Your email address will not be published. Required fields are marked *