TX Text Control Blog

New ASP.NET MVC DocumentViewer rolled out to the ReportingCloud portal

Björn Meyer

Blogged by Björn Meyer on April 22, 2017 and tagged with reporting, html5, documentviewer, mvc, reportingcloud.


We just rolled out a new ASP.NET MVC DocumentViewer to the ReportingCloud portal to preview templates in the template storage. The following screenshot shows the viewer inside the ReportingCloud portal:

New DocumentViewer rolled out to the ReportingCloud portal

The viewer loads the document pages asynchronously to provide a very satisfying user experience when displaying a document. The sidebar shows thumbnails of all available pages and can be used for a fast navigation. The viewer renders the pages in a scrollable panel, so that the user is able to scroll through the document like in our editor or any other typical word processor such as MS Word.

The Bootstrap compatible DocumentViewer can be docked to all containers and is fully responsive. It also provides a dock option to fill the complete browser window for full screen viewing.

Text lines can be selected on the currently active page to copy text to the client clipboard:

New DocumentViewer rolled out to the ReportingCloud portal

The toolbar provides additional functionality such as a find method to search for strings in the document. The results are highlighted and the toolbar can be used to navigate through the search results:

New DocumentViewer rolled out to the ReportingCloud portal

Test this on your own by creating a ReportingCloud account.

Stay tuned for more details about the ASP.NET MVC DocumentViewer that will be part of TX Text Control .NET Server for ASP.NET.

MailMerge: Using smart business objects to calculate batch totals and subtotals

Björn Meyer

Blogged by Björn Meyer on April 21, 2017 and tagged with reporting, business objects, merge blocks.


Text Control's MailMerge class supports IEnumerable objects, DataSets, DataTables and Json as data sources for mail merge processes. A smart advantage of business objects is that a specific logic can be implemented into these classes. Consider the following business object:

MailMerge: Using smart business objects to calculate batch totals and subtotals

Order is the main object or Master Table for the mail merge process. It consists of Customer information, a Total and a collection of ProductBlocks. The ProductBlock class contains the sum of prices of all contained Products.

If a new list of products is added to the ProductBlock object, the BlockSum field is calculated automatically. Therefore, the total sum of a ProductBlock object is always accurate and must not be set manually.

The main object Order implements the INotifyPropertyChanged interface which is used to update the ObservableCollection of ProductBlocks. Each time, a new ProductBlock is added, the Total is calculated.

The following screenshot shows a sample template with a nested merge block. The outer block is ProductBlocks that contains a child block called Products. As Products is a list member of the object ProductBlock, it can be repeated in a separate nested block.

Template

The following code shows the creation of a data object and how to call the MergeObject method to start the merge process:

After merging the template, the ProductBlocks are repeated and the block sum is rendered at the end of each block. At the very end, the total sum is shown which has been calculated automatically inside the business object.

Merge results

Updated MVC sample: Loading files from the backstage menu

Björn Meyer

Blogged by Björn Meyer on April 20, 2017 and tagged with reporting, mvc, html5, github.


We just updated the very popular sample Loading files from the backstage menu to TX Text Control version X14 (24.0) on GitHub.

This sample shows how to replace the file menu with an MS Word-style backstage menu including a list of documents to choose from. The backstage menu itself is completely customizable and can be used for application settings, file options or any other application related entries.

We updated the sample to TX Text Control X14, updated all Nuget packages to the latest stable versions and tested the compatibility.

MVC: Loading files from the backstage menu

Download the sample from GitHub and test it on your own.

Download and fork this sample on GitHub

We proudly host our sample code on github.com/textcontrol. Feel free to fork and contribute!

Download ZIP

Open repository on GitHub

Open in Visual Studio

Requirements for this sample

  • at least Visual Studio 2015
  • At least a trial version of TX Text Control .NET Server for ASP.NET X14 (24.0)

See Text Control at DevIntersection in Orlando, FL

Björn Meyer

Blogged by Björn Meyer on April 4, 2017 and tagged with reportingcloud, conference.


See Text Control at DevIntersection in Orlando, FL

DevIntersection is coming back to Orlando to the Walt Disney World Swan hotel and conference center. From May 21 - 24, 2017, top speakers from our industry are talking about Visual Studio, ASP.NET, Azure, SQL, IT transformation, SharePoint and Office365. The co-located <anglebrackets/> brings together open source collaborators on Angular, HTML5, ASP.NET, bootstrap and Node.js.

As every year, we are exhibiting at the conference and again, we use this conference as the kick-off presentation of the roadmap for our next versions, products and technologies. And we have a lot to show this year.

If you are attending this great conference, stop by our booth and say hello - we would love to get your feedback on our new features.

See you in Orlando!

New ReportingCloud endpoint: List available fonts

Björn Meyer

Blogged by Björn Meyer on March 29, 2017 and tagged with reportingcloud, reporting, rest, web api.


We just rolled out a new Web API endpoint which returns available font names that can be used to create and merge templates for merge processes with ReportingCloud.

GET https://api.reporting.cloud/v1/fonts/list

The cross-browser HTML5-based template editor provides fonts that can be used to design merge templates. But ReportingCloud also provides a functionality to upload MS Word documents in standard formats such as RTF, DOC, and DOCX. In order to ensure that only supported fonts are used, this new endpoint can be used to retrieve this list.

The following curl call shows the usage of this endpoint:

On success, it returns an array of available font names:

The .NET wrapper for ReportingCloud has been extended with the ListFonts method:

Test this on your own and create a trial account today.

Happy coding!

Older blog entries

 
 
Call us: +1 704-544-7445 (United States)
 
 

Products

Support

Downloads

Corporate

Buy Now

About Text Control

Founded in 1991, Text Control is an award-winning Visual Studio Industry Partner and leading vendor of word processing and reporting components for Microsoft development technologies. The products help thousands of developers add comprehensive word processing functionality to their applications. Text Control is 100% self-owned and independent of all investor decisions. Customers benefit from these years of experience, large user-base, and at the same time, appreciate developing with a mature, reliable product.

SD Times 100SD Times 100SD Times 100SD Times 100SD Times 100SD Times 100Visual Studio 2015 Launch PartnerVisual Studio 2013 Launch PartnerVisual Studio 2012 Launch PartnerVisual Studio Partner