How to use Word Template with Telerik Document Processing Library using ASP.NET Core

We get frequent requests from customers wanting to build a document using a template with header and footer and just including text in the Word document using ASP.NET Core.

We can achieve this using the Telerik WordsProcessing library. In this blog post, we will explore how.

You can do this by importing the document template with the DocxFormatProvider (if the template is a DOCX document or with any other of the supported by the WordsProcessing format providers) into a RadFlowDocument, edit its content using the RadFlowDocumentEditor and export it with the appropriate format provider. 

First, you need to to install Telerik.Documents.Flow NuGet package see below picture where I am using Trial version of Telerik.

Add Template.docx file in root directory with header and footer.

In Program.cs file

Step 1 : Add below mentioned namespaces :

using System.Diagnostics;
using Telerik.Windows.Documents.Flow.FormatProviders.Docx;
using Telerik.Windows.Documents.Flow.Model;
using Telerik.Windows.Documents.Flow.Model.Editing;

Step 2 : Create RadFlowDocument object.

RadFlowDocument document;

Step 3 : And add the DocxFormatProvider for importing the DOCX Template in RadFlowDocument object “document”.

DocxFormatProvider provider = new DocxFormatProvider();

string templatePath = "Template.docx";

  using (Stream input = File.OpenRead(templatePath))
   {
       document = provider.Import(input);
   }

Step 4 : Now add the RadFlowDocumentEditor for editing the RadFlowDocument with providing it’s object. and with the RadFlowDocumentEditor object “editor” we are inserting the text.

RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);
editor.InsertText("Telerik WordsProcessing Library");

Step 5 : Now Define the Output of Document path. and export the document using above mentioned RadFlowDocumentEditor object “provider”.



 string outputDocumentPath = "Output.docx";
     
 using (Stream output = File.OpenWrite(outputDocumentPath))
     {
          provider.Export(document, output);
     }

Step 6 : And I am opening the file after exporting using below line of code you can also remove that if you don’t want to open file.

 Process.Start(new ProcessStartInfo() { FileName = outputDocumentPath, UseShellExecute = true });

The whole program look likes below :

Now you can get the Word Document File with name of Output.docx.

And for more information about the RadFlowDocumentEditor you can find in the RadFlowDocumentEditor help article.

If you are new to this library, I would suggest starting with the Getting Started help article and checking the WordsProcessing`s Cross-Platform Support topic.

How to Connect Samples of Telerik Reporting to MySQL

Some of our customers don’t use Microsoft SQL Server as their database. What is not well known is that Telerik Reporting supports MySQL database out of the box.

Below, I detail the steps that are required to design reports using Telerik Report Designer from MySQL database.

  • First, install MySQL Connecter from below link.

https://dev.mysql.com/downloads/connector/net/

  • Please download AdventureWorks database for MySQL from below link and import this to your MySQL.

https://sourceforge.net/projects/awmysql/

  • After installing MySQL Connector you can see the “MySQL Data Provider” in drop-down list please select this. 
  • Enter the connection string of Adventureworks database according to the below picture and click on the next button.
  • Change the Alias if you want and click on the next button.
  • Change query according to DB and click on the Next button.
  • Below the screen comes and click on the Execute Query button.
  • After clicking on the Execute Query button, If data appears on a Screen the task completed click on the Finish button or not check the query again.

Above, we have seen how to enable Telerik Reporting Designer to fetch data from MySQL using the MySQL ADO.NET connector. There is one additional step that you need to do to render the report.

This step is to add MySQL nuget package into the host application. The package to add is MySQL.Data . This adds the capability to connect with MySQL from Telerik Reporting Host application.

Now your report is able to render data from MySQL database.

Building Surveys and Portals using Rollbase Platform

Events are an important part of your marketing strategy. They provide a unique opportunity for potential buyers to interact with your product and service and get to know your organization. Events also give you the opportunity to align your brand with other organizations that share the same values or customer demographics.

Whether your event is a webinar, meetup, training session, user conference, tradeshow, surveys are an indispensable tool for assessing your attendee’s needs and measuring how well you are meeting them.

Event surveys can be used at all phases of your event to:

  • Explore your target audiences’ needs and expectations
  • Setup registration forms and collect payment
  • Collect logistical information to accommodate attendees
  • Engage attendees with interactive polls and quizzes and conduct mid-event evaluations on speakers and workshops
  • Increase leads/sales with lead generation forms
  • Measure the success of your event
  • Event Goal

UseCase: Recently, Progress Xchange, our premier annual event was conducted in Mumbai and post-event, marketing team wanted to conduct a survey to evaluate the event feedback.

So how do you approach a post-event evaluation? We are going to demonstrate creation of anonymous survey and hosting the survey on portal using Rollbase, low-code, RAD and adaptive platform. You can learn more about at www.rollbase.com and feel to give it a try.

Continue reading

Modulus (Platform as a Service)

Modulus: Commercial Docker Containers for running ASP.NET Core Applications

I have been working on .NET platform for last 15 years. I started with ASP and graduated to ASP.NET Web Forms during 2001 time frame. That’s the time when .NET 1.0 was out. ASP.NET Web Forms was super fancy web application development framework because you could do Drag & Drop development. It could run only on Windows Environment and IIS was the web server. Fast forward 15 years i.e. current time and i would have never believed in my dreams that we will be running ASP.NET on a non-windows environment. Well you read it right – you can now deploy & run a ASP.NET web application on Linux & OSX.  Continue reading

Tips to Improve Database Connectivity in .NET Applications

connection_string_iconWhen it comes to Data Access performance of .NET application, many people focus on the tuning and optimizing the Backend datasources. But there is lot to gain from just tuning your connectivity solutions for the need of your application.
This presentation focuses on how to tune your ADO.NET connectivity solution to get the best performance out of them.

 

Continue reading

Data Preparation Made Easy wit hEasyl

Resources for Webinar “Preparing Big Data for Analysis with Progress/Telerik Easyl”

IMPORTANT: Progress has since stopped active development on Easyl. 

 

We are back with one more webinar. On Jun 11 2015 we conducted a webinar titled “Preparing Big Data for Analysis with Progress/Telerik Easyl” at a new time. June & July month webinar will be held from 12PM to 1PM IST instead of 3PM IST. This blog post will provide you a recap of the webinar and you can catch up with the webinar in case you missed it live.

About Easyl:

HIGH-SPEED DATA PREPARATION YOU CAN DO YOURSELF – The slog of data preparation is over. What was slow and brutal, weighed down by days of Excel and email, is now fast and brilliant. For everyone. Business user, vendor, builder or partner — Progress Easyl puts you ahead of the pack. Modern, high-performance data preparation is now in your hands.

Data Preparation Made Easy wit hEasyl

Data Preparation Made Easy with Easyl

You can check out more information on Easyl here: Easyl

Slide Deck:

Here is the slide deck used in the webinar:

 

Q&A:

Q: What is Eloqua?
A: its a Marketing automation SaaS product from Oracle. Presenter is using that as one of the data source

Q: How Easyl help in Industry?
A: You can check out the features of Easyl here – https://www.progress.com/easyl/features. this will help you understand the capabilties of Easyl

Q: Hi Can we use this Easyl as DatASource for some other BI Tools Like Tableau?
Yes, tableau will be supported in the first GA release scheduled at the end of June-2015.

Q: How much amount of data space is provided by Easyl?
A: The data space depends on the plan your Easyl account is subscribed to. You can get information on Easyl plans at https://pacific.progress.com/cs-ui/service/plans after registering with Progress Pacific.

Q: Is it integrated with telerik test studio?
A: Progress Easyl is part of the Progress Pacific platform. It is not integrated with telerik test studio.

Q: Is SAP database supported in your tool ?
A: SAP is not currently supported.

Q: Is there any protection for data in Easyl?
A: Data generated in Easyl by a user can be accessed only by the owner and the sharees to whom the report is shared. All data is generated by the user is strictly bound to the particular user’s account.

Q: Can we secure data in Easyl?
A: Setting password for selected reports is not possible.

Q: One morething as you mentioned that it will be able to Map with Tableau so here Tableau will Be TableauAOnline Or in-premise Tableau Server?
A: Tableau Online.

Q: Will there be a DEC (from Telerik) data connector available?
A: DEC connector for easyl is currently not available currently.

Q: which cloud service is being used for storing data ?
A: Amazon EC2 instances.

Q: can you show the google analytics part in Easyl?
A: A tutorial of the google analytics integration will be available in the Easyl documentation after the GA release.

Q: Can we secure data in database with some passwords like MS Access?
A: Easyl user authentication is only available for the time being. Password protecting individual reports is not possible.

Q: How much amount of data space is provided by Easyl?
A: The data space depends on the plan your Easyl account is subscribed to. You can get information on Easyl plans in https://pacific.progress.com/cs-ui/service/plans after registering with Progress Pacific.

Q: Can Easyl be use as some sort of oData Server so that i can connect this with My TAbleau In Premise Server?
A: This is currently not possible. But you could generate your .tde files and work with your tableau desktop application.

Q: Is multi tenancy supported ?
A: Multitenancy is supported in the form of corporate accounts, where a bunch of account could be grouped and managed together using the Progress Pacific cloud services.

Q: Regarding Multi-tenancy ,  I am referring to data level multitenancy . For exampe,  If admin create a report and ihe would like to share the report with team for different location analyst but those user can see the data in report for the location  whch they have the access
A: Yes it is possible by using a corporate plan.

Q: Is this tool free?
A: It is available for a 30 day trial period, after which you’ll have to subscribe to a plan to resume working with full features.

Q: Can we attach easyl with developing softwares like Visual Studio?
A: No.

Q: How to open Easyl website?
A: You can register at https://pacific.progress.com/ . And select Easyl from the pacific from the console page.

Q: What is licensing cost ?
A: It depends on the plan your Easyl account is subscribed to. You can get information on Easyl plans at https://pacific.progress.com/cs-ui/service/plans after registering with Progress Pacific.

Q: How can I access Easyl
A: You can register at https://pacific.progress.com/ . And select Easyl from the pacific from the console page.

Q: Is there any support team for Easyl?
A: Yes. You could visit http://forms.progress.com/forms/ContactUs-v2 to contact our sales and service teams.

Q: Does Easyl offer some form of automatic removal of duplication of data, when say multiple datasources are used, say HubSpot and Google Analytics where journeys are obviously connected
A: Not currently.

Q: Can Easyl be installed & configured on any In-Premise Servers?
A: Easyl is available only as a cloud service. It cannot be installed as a standalone on-premise service.

Q: How can i beleive that my data is secure in easyl?
A: Data is secured in safe amazon instances which is closely monitored by an operations team.

Q: Can you show how to connect Easyl to SQL server
A: You just need to create a new datasource and enter the connection parameters in the SQL Server Datasource tab. Please refer documentation for details.

Q: In which fields, Easyl will be helpful?
A: Data Preparation for data analytics and business intelligence.

Q: does Easyl support RTL languages (Arabic) ?
A: Not currently.

Q: Is there any security for Easyl from virus attacks?
A: Data is secured in safe amazon instances which is closely monitored by an operations team to avoid any such attacks.

 

Hope you like the webinar & you will give Easyl a spin. Till next time – HappyCoding.

 

Webinar Resources: Drag And Drop Application Development using Progress Rollbase

aPaaS-300x291

aPaaS is a new set of technologies emerging for enterprise use. They ensure faster Go To Market and rapid application development.

We are pleased to share the resources from the webinar conducted on Progress/Telerik aPaas Technology called – Rollbase. This webinar covered Getting Started with Drag and Drop Application Development. The viewers will be able to appreciate the aPaaS paradigm and get started quickly by building a Rollbase application.

Slides:

Video:

Leverage Progress Technologies for Telerik Developers – Resources from the Webinar

Progress PacificTelerik Developers are Ninjas in their software development capabilities. Now, they have new tools/technologies to leverage in their quest for better solutions. These exciting enterprise grade technologies range from Business Rules Engine to Drag and Drop Application Development.
This session is an overview of the Progress tools.

The slides used at the presentation:

The video from the session is available here: