ReportingCloud Developer Blog

Last Conference in 2017: Meet Text Control at DDC .NET Developer Conference in Cologne, Germany

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Friday, November 17 2017

Text Control at DDC Cologne

The DDC .NET Developer Conference in Cologne, Germany is the last stop for our conference team for this year. This conference provides an interesting mix of trainings, workshops and sessions about .NET topics.

There are trainings and workshops about Team Foundation Server, the Entity Framework, WPF and ASP.NET Core. In the conference sessions, top speakers are talking about .NET Core, F#, Angular and Docker. Our Text Control MVP André Krämer (@codemurai) is doing a session about ASP.NET Security.

As a sponsor, we will be exhibiting in the expo area to demonstrate our latest (or final?) build of TX Text Control X15 (25.0) with new features including the editable regions.

If you are attending this great event, stop by our booth and say hello.

See you in Cologne!


Sneak Peek X15: MS Word Compatible Document Protection and Editable Regions

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Thursday, November 16 2017


Impressions from DevIntersection 2017 at the MGM Grand in Las Vegas

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Thursday, November 02 2017

This week, we exhibited at the DevIntersection conference at the MGM Grand in Las Vegas. This conference is one of the largest Microsoft-focused conferences and speakers from Microsoft and the related ecosystem talked about .NET, AI, .NET Core, JavaScript, Azure and many more topics.

We exhibited in the expo hall with our new booth reflecting our new, colorful branding. Traditionally, we present new features of the next version at the DevIntersection fall show. We unveiled new features of TX Text Control X15 including protected document sections, the new ribbon mini toolbar for the client versions of TX Text Control, thesaurus of TX Spell 7.0 and new features and payment plans for ReportingCloud. We will publish details about the new features very soon. We are very happy about the valuable feedback from users when we presented our new versions on our demo counters.

The big 3 cloud computing providers Microsoft Azure, Google and Amazon AWS had a presence at the conference which shows the significance of cloud computing in our industry today. Our research and development teams are working on many ideas and new products which shows our commitment to this technology. It is our goal to provide our users reliable and stable products for traditional platforms such as Windows Forms, WPF and ASP.NET, but at the same time alternatives for a smooth transition to cloud-based services.

We handed out our Text Control yo-yos, new stickers and raffled off the brand new XBox One X this year. Microsoft is going to release the new version of the successful gaming console on November 7th, so we live pre-ordered it for the lucky winner.

Find below some impressions of our booth area during the conference in the expo area:

See you next year in Orlando for DevIntersection spring!


Embedding TXTextControl.Web in non-.NET Framework applications like .NET Core and AngularJS

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Monday, October 23 2017

TX Text Control .NET Server for ASP.NET comes with a true WYSIWYG HTML5-based editor for ASP.NET MVC and Web Forms. But it can be embedded into other application types as well.

IFrame elements are designed to allow you to embed other web documents into your document. This is widely used to embed third party content into your website such as social media widgets. Using an IFrame, the ASP.NET-based editor can be easily embedded into any non-.NET based web applications such as .NET Core or AngularJS based web sites.

The following diagram shows this structure:

SendMessage Diagram

The sample demo consists of a hosting .NET Core web application and an ASP.NET MVC application that hosts the TX Text Control editor. The simple .NET Core website hosts an IFrame element that points to the ASP.NET MVC application:

Loading...

When the button is clicked, JavaScript is used to send a message to the source of the IFrame. The window.postMessage() method safely enables cross-origin communication. This method, when called, causes a MessageEvent to be dispatched at the target window.

The receiving JavaScript catches this message in order to process it:

Loading...

In this demo, an HTML string should be loaded into the TX Text Control editor. As it is only possible to send a message to the receiving IFrame, a protocol is required to structure the request. We use the following structure:

Loading...
Element Description
txtextcontrol Make sure that this message is for TX Text Control
method The name of the method
parameter The parameter to be used for the method

In the receiving JavaScript, a switch statement is used to process various methods. In this demo, only one method is processed which is supposed to load a formatted HTML string using the TX Text Control Javascript: TXTextControl.loadSelection method.

You can test this on your own by cloning the sample GitHub project.

GitHub

Download and Fork This Sample on GitHub

We proudly host our sample code on github.com/TextControl.

Please fork and contribute.

Requirements for This Sample

  • Visual Studio 2017 or better
  • TX Text Control .NET Server for ASP.NET (trial sufficient)

Tutorial: Merging your First Template using the ReportingCloud .NET Core Wrapper in Visual Studio Code

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Saturday, October 21 2017


X15 Sneak Peek: Upcoming JavaScript API Improvements in the HTML5-based Editor for ASP.NET MVC and Web Forms

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Friday, October 20 2017

JavaScript interface

We are working on many improvements of the JavaScript API to manipulate documents client-side using the HTML5-based editor for ASP.NET MVC and Web Forms.

Clipboard

In version X15 of TX Text Control, it will be possible to switch between the two different clipboards using a toggle button or the JavaScript API. In case, the local clipboard is activated, an HTML form element is simulated and content can be pasted into the control and copied from the control to the local clipboard.

Property Value Type Description
TXTextControl.clipboardMode integer Gets or sets the clipboard mode (client or server). The clipboard mode determines if the key combinations Ctrl+C, Ctrl+V and Ctrl+X copy to and from the client clipboard or if content is copied to and from the server clipboard. Possible values for this property are defined in class TXTextControl.ClipboardMode.
Event Value Type Description
clipboardModeChanged ClipboardModeChangedEventArgs Is fired when the clipboard mode has changed.
clipboardDataTransferStart clipboardDataTransferStartEventArgs Is fired when a clipboard data transfer starts.
clipboardDataTransferProgress clipboardDataTransferProgressEventArgs Is fired for each transfered clipboard data packet.
clipboardDataTransferComplete clipboardDataTransferCompleteEventArgs Is fired when a clipboard data transfer is completed.
clipboardDataTransferAborted clipboardDataTransferAbortedEventArgs Is fired when an ongoing clipboard data transfer is aborted.

Read more about the typical applications for these features in this article:

Sneak Peek X15: Copy to Local Clipboard Support in ASP.NET Version

Text Fields

TX Text Control X15 will provide a general interface to add, remove and modify all text field types including MS Word merge fields (TXTextControl.DocumentServer.Fields.FieldAdapter), form fields and TX Text Control text fields.

Class Description
TXTextControl.DateField Represents an MS Word specific DATEFIELD field.
TXTextControl.FieldType Determines the possible MS Word specific merge field types supported by the TX Text Control JavaScript API.
TXTextControl.IfField Represents an MS Word specific IFFIELD field.
TXTextControl.IncludeTextField Represents an MS Word specific INCLUDETEXT field.
TXTextControl.MergeField Represents an MS Word specific MERGEFIELD field.
TXTextControl.MergeFieldTextFormat Determines the possible text formats for merge fields containing text.
TXTextControl.NextField Represents an MS Word specific NEXT field.
TXTextControl.NextIfField Represents an MS Word specific NEXTIF field.
TXTextControl.TextField Represents a Text Control TextField.
TXTextControl.ApplicationField Represents a Text Control ApplciationField.
Method Description
TXTextControl.addMergeField Inserts a merge field at the current input position.
TXTextControl.addTextField Inserts a new ApplicationField or TextField at the current input position.
TXTextControl.getTextFields Requests a collection of either all text fields the current text part contains or only the text field containing the input position from the server and returns the collection by calling a callback function which has to be provided as a parameter to the function.
TXTextControl.removeTextField The removeTextField method removes a text field from the document.
TXTextControl.showMergeFieldDialog Opens a field dialog either for changing properties of an existing merge field or for creating a new merge field.
TXTextControl.TextPart.addTextField Inserts a new ApplicationField or TextField into the TextPart at the current input position.
TXTextControl.TextPart.getTextFields Requests a collection of either all text fields in the text part or only the text field containing the input position from the server and returns the collection by calling a callback function which has to be provided as a parameter to the function.

Read more about the typical applications for these features in this article:

Sneak Peek X15: Custom Field Overlays in HTML5-based Text Control

SubTextParts

The JavaScript API allows manipulations of TXTextControl.SubTextPart objects. A SubTextPart object represents a user-defined part of a TX Text Control document.

Class Description
TXTextControl.SubTextPart The callback function argument for the getSubTextParts function.
Method Description
TXTextControl.getSubTextParts Requests a collection of either all SubTextParts the current text part contains or only the SubTextPart containing the input position from the server and returns the collection by calling a callback function which has to be provided as a parameter to the function.
TXTextControl.TextPart.getSubTextParts Requests a collection of either all SubTextParts the current text part contains or only the SubTextPart containing the input position from the server and returns the collection by calling a callback function which has to be provided as a parameter to the function.

Spell checking

A JavaScript object has been introduced to act as a namespace for all proofing and spell checking methods and properties. Now it is possible to load, remove and save user dictionaries and add and remove custom words to these dictionaries. These user dictionaries can be added per user session as the list of words is given as a string array.

Class Description
TXTextControl.UserDictionaryInfo This class contains read only information about a user dictionary.
TXTextControl.Proofing A JavaScript object which was introduced to act as a namespace for all proofing and spell checking methods and properties.

Different Ways to Create Documents using Text Control Products

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Tuesday, October 17 2017

Creating documents with TX Text Control

Text Control products can be used to create documents programmatically from scratch, pre-designed templates can be used to populate merge fields using the TXTextControl.DocumentServer.MailMerge class and documents can be edited using true WYSIWYG rich text controls for Windows Forms, WPF and ASP.NET.

Creating Documents from Scratch

TX Text Control provides a powerful and complete API to create and manipulate documents programmatically. This API can be used in any .NET application such as Windows applications, Windows Service applications or web services.

The following code creates a new instance of a TXTextControl.ServerTextControl which is the non-visual Text Control. The API is compatible to the visual controls such as the Windows Forms TXTextControl.TextControl and the WPF TXTextControl.WPF.TextControl component.

The code inserts a paragraph, a table and exports the document as an Adobe PDF document:

Loading...

Merging Templates using MailMerge

After a template has been successfully designed in one of the visual rich text controls of TX Text Control or in MS Word, the reporting engine TXTextControl.DocumentServer.MailMerge is merging data into the template. For each data row of the master table in the data source, a document is created. Merge fields are populated with column values and repeating blocks are merged with data rows of related child tables in the data source.

A data source can be any IEnumerable object (business objects), JSON objects, DataSet and DataTable objects. Text Control Reporting follows the concept of pre-shaped data where data queries are executed before data is passed to the merge process.

The following code creates an instance of the reporting engine MailMerge to merge the template that is loaded into a ServerTextControl with an IEnumaerable object. Finally, the document is exported as a PDF document:

Loading...

Editing Documents using MS Word-Compatible Editors

The TXTextControl.WPF.RibbonReportingTab class represents a ribbon tab to integrate mail merge and reporting functionality directly into your TX Text Control based application. Together with all other ribbon tabs known from typical word processors, creating MS Word compatible template designers and word processors is a very easy task.

Not being dependent on an additional third-party tool such as MS Word to create templates is a very important key aspect when implementing word processing functionality into business applications. The MS Word compatible editor has the look and feel of MS Word, but can be customized and adapted to user requirements. MS Word templates can be reused and edited in TX Text Control.

Templates can be stored in industry standard(ized) formats such as DOCX, DOC and RTF and are always compatible with other word processors such as MS Word.

The following screenshot shows the Windows Forms version of TX Text Control. The visual controls can be automated in the same way like the non-visual class ServerTextControl using the same, compatible API.

Creating documents with TX Text Control

Creating Documents in the Cloud

The ReportingCloud Web API can be used to merge MS Word compatible templates with JSON data from all clients such as .NET, .NET Core, Javascript, PHP, Node.JS, jQuery, Python, Android, Java, iOS and many more.

ReportingCloud provides a RESTful Web API to manage templates and to merge templates with hierarchical data from JSON strings.

The following code uses ReportingCloud and the ReportingCloud .NET Wrapper to merge data into a template:

Loading...

Conclusion

Text Control provides the most powerful tools and controls to integrate document creation processes into any kind of business applications.


ReportingCloud: Setting the Culture for Date and Currency Fields

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Friday, October 13 2017

ReportingCloud provides fields that are localized automatically based on a culture that can be specified. We just introduced a new property in the MergeSettings object to specify the culture for the merge process.

The endpoint document/merge accepts a MergeBody object in the request body data. This object contains a MergeSettings object to adjust several settings for the merge process. The new property culture accepts a string that specifies the culture for the merge process for date and currency values. It must be the Language Culture Name that can be found in this list:

Table of Language Culture Names

For example: For French use "fr-FR", for German "de-DE". Default is English "en-US".

https://api.reporting.cloud/v1/document/merge

MergeSettings

Key Value Type Value description
culture String Optional. Specifies the culture for the merge process for date and currency values.

Consider a merge field in an invoice that shows the price of a product.

Field properties

This field should be formatted as a currency field which is done by setting a C to the Numeric Format option:

Field properties

When merging this field with culture set to "de-DE", you will get a € currency symbol. If set to "en-US", you will get a $ currency symbol. The same is valid for the language of long date field formats:

Date fields

Happy coding!


Meet Text Control at DevIntersection in Las Vegas

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Tuesday, October 10 2017

Meet Text Control at DevIntersection

Halloween is right around the corner and that means traditionally it is DevIntersection time. That is not scary at all, but very exciting. This event, now in its fourth year, brings well known Microsoft leaders, engineers and industry experts together to educate, network and share their expertise with 1200+ enthusiastic attendees in Las Vegas, NV.

From October 31 - November 2, 2017, this conference is coming to the MGM Grand in Las Vegas. Join us at booth #311 and learn more about reporting and word processing in Windows, web and cloud (.NET Core!) applications. We will be giving away our Text Control yo-yos and traditionally, we will raffle off an XBox. This time the brand new XBox One X. Microsoft is going to release it after the conference, but we will live pre-order it for our winner at our booth.

We will have our latest beta versions of TX Text Control X15, TX Spell .NET 7.0 and ReportingCloud available for testing at our demo counters. Stop by our booth and ask for a demo.

See you in Vegas!


Sharing Documents with ReportingCloud

Blogged by no-reply@textcontrol.com (Bjoern Meyer at Text Control, LLC) on Thursday, October 05 2017

We just published a new beta feature of ReportingCloud that enables developers to embed the ReportingCloud DocumentViewer using a light-weight widget into any website.

This way, you can show your created documents on your website using a fully-featured, HTML/JavaScript-based and responsive DocumentViewer. The following sample document is delivered directly from ReportingCloud through the DocumentViewer widget:

Technically, all you need to do is to include the widget code into your website:

Loading...

The new endpoint document/share returns the encrypted document share path that needs to be added to the data-document attribute.

https://api.reporting.cloud/v1/document/share

Query Parameter Value Type Value
templateName String Specifies the template name in the template storage.

Consider the following workflow: In an online store, a customer is buying products and receives an invoice for the purchased products. The invoice template is created in advance using the ReportingCloud template designer. After the transaction, the template is merged with the transaction data to create an invoice. This invoice can be delivered to the buyer via e-mail or it can be linked to be downloaded. Additionally, the ReportingCloud DocumentViewer widget can be used to share the document immediately on the website.

Document workflow

The document is stored in the private ReportingCloud template storage and delivered directly through ReportingCloud. The document share location is encrypted in the hash value that is returned by the endpoint document/share.

Just another great idea to provide a fully-featured document workflow directly delivered through the cloud.

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

Happy coding!


Read older blog entries