Quantcast
Channel: TX Text Control Community
Viewing all 1022 articles
Browse latest View live

MVC: Loading files from the backstage menu

$
0
0
Happy New Year, everybody! In the last blog entry, we showed how to replace the file menu with an MS Word-style backstage menu. This project shows how to load documents from a partial view in the backstage menu. The partial backstage view Open.cshtml uses a very simple model to describe a document: In the partial view, a list item is created...

More...

Updating your TXTextControl.Web ASP.NET Web Forms project from version X12 to X13 (23

$
0
0
In order to update an ASP.NET Web Forms project from TX Text Control X12 to X13, the following steps are required: In the Solution Explorer, find the reference TXTextControl.Web, select it and remove it by clicking Remove from the Edit main menu. Choose Add Reference... from the Project main menu. In the opened dialog, search for...

More...

Windows Forms: Preview mail merge results with the BindingNavigator and a BindingSour

$
0
0
It has been a while since I have been written about the Windows Forms version of TX Text Control. And that is not because we give the Windows Forms version less priority - it is just my current dedication towards reporting, ASP.NET and web development. The client versions including Windows Forms and WPF have a very high priority for us. Sure,...

More...

[OPEN] Format error: The specified format is invalid - when creating a table inside another

$
0
0
I'm inserting a table programatically as follows (condensed):

Table tbl = CreateTable(3, 3, 9, txt);
tbl.Columns.GetItem(1).Width = 3500;
tbl.Columns.GetItem(2).Width = 2750;
tbl.Columns.GetItem(3).Width = 3500;

It normally works well. However, if the user was inside a table when this code is exceuted, and the outside table is not as wide as the inside table, an exception occurs (with code 01-241D) when the document is saved.

How can I prevent this? Is there a way for me to determine the width of the cell (if there is one) at the insertion point?

I'm using TxTextControl for WinForms, version 22.


Here is the stack trace...

Source: at TXTextControl.SaveSettings.?(Byte[]& , BinaryStreamType , TextControlCore , ? )
at TXTextControl.TextControl.Save(Byte[]& binaryData, BinaryStreamType binaryStreamType, SaveSettings saveSettings)
at VMIS2_Win.Forms.DocEditorForm.SaveVmisDocument()
at VMIS2_Win.Forms.DocEditorForm.mFile_Save_Click(Obj ect sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Obje ct key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(Eve ntArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(Eve ntArgs e)
at System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(Event Args e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.PerformClick()
at VMIS2_Win.Forms.DocEditorForm.tsStandard_Save_Clic k(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Obje ct key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(Event Args e)
at System.Windows.Forms.ToolStripItem.HandleClick(Eve ntArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(M ouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(Event Args e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEven tArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Description: (Exception) Format error: The specified format is invalid.
(01-241D)

[OPEN] Help with Spelling related exception

$
0
0
I frequently see the following exception in our error log. I can't reproduce it and need some ideas on how to debug it. The only thing I've noticed that looks suspicious is that most of the exceptions occur on a Citrix host. I wonder if there is some contention for the dictionary files. Does anybody have any suggestions?

Joel

Source: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeIn ternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at ?.?.?(String , Int32 , CultureInfo )
at ?.?.?()
at ?.?.?(TextControlCore , ? , Int32 )
at TXTextControl.TextContextMenuEventArgs.?(ContextMe nuLocation )
at TXTextControl.TextContextMenuEventArgs.get_TextCon textMenu()
at TXTextControl.TextControl.OnTextContextMenuOpening (TextContextMenuEventArgs e)
at TXTextControl.TextControl.?(Message& )
at TXTextControl.TextControl.WndProc(Message& message)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Inner Exception: Object reference not set to an instance of an object.
at TXTextControl.Proofing.TXSpell.CreateSuggestions(S tring incorrectWord, Int32 max, CultureInfo language)
at TXTextControl.Proofing.TXSpellChecker.CreateSugges tions(String incorrectWord, Int32 max, CultureInfo language)

Description: (TargetInvocationException) Exception has been thrown by the target of an invocation.

[OPEN] TXControl and VB6 Rich Text Box comptibility

$
0
0
For several reasons I have to be able to copy the contents of a TXTextControl into a VB6 RTB. The TX has text and image (inserted as BMP)

I tried copy/Paste directly and via clipboard, and saving to temp file and loading it, in all cases the image is not transferred.

However if I first load the saved file file created by the TX control into Word then save it as rtf, this file will will load into the RTB and the image is not lost.

I notice that the Word version is much bigger, does the TX save the image in the same way? do you have any suggestions as to how I can do this?

Impressions from NDC London 2016

$
0
0
We had a blast at the NDC London 2016 conference last week. As a partner, we exhibited in the expo area and presented our reporting components for .NET. It was a lot of fun to meet existing users and a lot of new faces at this major conference in the UK. We gave many demos, gave out hundreds of frisbees and raffled off an XBOX One at the end of...

More...

See Text Control in Fort Lauderdale-Davie at South Florida Code Camp 2016

$
0
0
Next month, we will be exhibiting at the South Florida Code Camp 2016 in Fort Lauderdale-Davie. Speakers will be talking about the most requested topics such as Windows 10, Windows Phone 8, ASP.NET, Javascript, jQuery, Visual Studio 2015, MVC Framework, Sharepoint 2013, SQL Server 2016, Xamarin, cross platform development and Azure. A quick...

More...

MVC: Merging templates in an controller HttpPost method

$
0
0
The reporting engine MailMerge is used to merge templates with data. In combination with the HTML5 based MVC editor Web.TextControl, the created template can be merged in the MVC controller and loaded back into the view. The following HttpPost method Merge accepts the model DocumentViewModel which contains the template encoded as a Base64...

More...

MVC: Merging templates in a controller HttpPost method

$
0
0
The reporting engine MailMerge is used to merge templates with data. In combination with the HTML5 based MVC editor Web.TextControl, the created template can be merged in the MVC controller and loaded back into the view. The following HttpPost method Merge accepts the model DocumentViewModel which contains the template encoded as a Base64...

More...

MVC: Loading a DataSet from the ViewBag

$
0
0
The HTML5 based editor and template designer is typically used to create mail merge templates in web applications. The data source for the Reports ribbon tab can be pre-loaded in the view using the LoadDataSet method. Using this data source, the available merge field and merge block drop-down lists are populated. The following code shows how to...

More...

Windows Forms: Removing the next word right to the input position on CTRL + DEL

$
0
0
MS Word provides a functionality to remove the next word at the current input position by pressing the key combination CTRL + DEL. TX Text Control implements many pre-defined key combinations and mouse selections with the Smart Selection Interface. But thanks to the flexible API and the complete event set, additional combinations can be easily...

More...

[OPEN] Error in text filter: Illegal token (1-1d02) in version 18

$
0
0
Hi,

I got error message of Error in text filter: Illegal token (1-1d02) in version 18. But it works without problem in version 12 before we update to 18.0. I install 18.0 ps1 & ps2, the problem still exist. Error pop will execute line below


TXTextControl1.RTFSelText = ”{\rtf1{\fonttbl;{\f1\fnil Arial;}}{\colortbl;\red224\green228\blue222;\red8\ green0\blue0;\red255\green255\blue255;\red174\gree n205\blue217;}\trowd\clcbpat1 \cellx1385 \intbl \b \fs20 \f1 \cf2 Fixed Assets \cell \trowd\clcbpat1 \cellx1385 \intbl \cell \row \trowd\clcbpat4 \cellx1385 \intbl \cf2 Lookup Code \cell \trowd\clcbpat1 \cellx1385 \intbl \cell \row \trowd\clcbpat4 \cellx1385 \intbl \b0 \cf2 \cell \trowd\clcbpat3 \cellx1385 \intbl \cell \row \trowd\clcbpat4 \cellx1385 \intbl \b \cf2 Total \cell \trowd\clcbpat4 \cellx1385 \intbl \cellx1430 \clcbpat3 \cellx2800 \intbl \cell \row}”

It works in version 12.0 but not in 18.0

TX Text Control .NET Server for ASP.NET: MVC article collection

$
0
0
The ASP.NET product received an MVC version of the HTML5-based, WYSIWYG rich text document editor and reporting template designer. This version allows ASP.NET developers to integrate a fully featured, MS Word compatible word processing interface into their cross-browser web applications without any plug-ins or client-side footprint. The...

More...

MVC: Loading a data source from a view model

$
0
0
The most typical application for the Web.TextControl is the creation of templates for the Text Control Reporting engine DocumentServer.MailMerge. The ribbon tab Reports is designed to insert merge fields and merge blocks compatible to the reporting classes of TX Text Control. The drop-down buttons Select Master Table, Merge Field and Merge...

More...

Where to see Text Control in 2016?

$
0
0
The conference season started very early this year with the fantastic NDC London at the ExCeL London. We already planned most of the first 6 months of 2016, but there is room for more. One of our company mission goals is to build a thriving developer community. We do that as user input drives our development and we would like to listen to these...

More...

Easy-to-use sample templates with sample XML data files

$
0
0
We published a new set of sample templates with easy to understand XML files as data sources without any relations and sub-tables to keep it very simple. You can load these templates into the designer TX Text Control Words and remap the fields matching your data source. Or you can use this project to remap the fields visually: Dialog project:...

More...

[OPEN] Problems with Right-To-Left text in ApplicationFields

$
0
0
When I set the Text property of an ApplicationField to a mixed RTL/LTR text, the order gets mixed-up.

Code:

Private Sub TestRTLToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TestRTLToolStripMenuItem.Click
    Dim f1 = New ApplicationField(ApplicationFieldFormat.MSWord, "DOCVARIABLE", String.Empty, {})
    f1.ID = 1
    f1.ShowActivated = True
    _textControl.ApplicationFields.Add(f1)

    Dim s1 = "123-٠١٢٣٤٥٦٧٨٩-456-جڞڀۍ-x789"
    f1.Text = s1
End Sub

The text is set correctly, i.e. the Text property shows the text just fine in Visual Studio, and you can copy it to the clipboard or assign it to a variable.

However, the field shows the text in a mixed-up order, see screenshot:


If you select the field and copy the text to the clipboard and paste it to e.g. notepad++ the order is as you would expect it.

Bonus: Try deleting the "x" in the string in any Unicode-aware application (like VS, notepad++ etc.). Can anyone explain that behavior to me? Is it possible without mixing up the order?

[OPEN] Fixed Position Images are not Considered Page Content

$
0
0
Greetings,

We have a solution where we are adding Images to be used as placeholders in a document. We offer the user the ability to insert the image with various insertion modes but are having an issue in particular with (ImageInsertionMode.AboveTheText | ImageInsertionMode.FixedOnPage).

This is the same as formatting an image added to the document as Fixed Position on Page I believe.

What we are experiencing is that these images are not considered page content.

Consider the following:
1. I have a document with 2 pages of text.
2. I delete all of the text content from page 2, TXTextControl removes the 2nd page and only shows me 1 as being currently available.

1. I have a document with 2 pages of text.
2. I add an image that is anchored or moving with text that is on page 2.
3. I delete the text content on page 2. The image remains on page 2 but anchored to text on page 1.

1. I have a document with 2 pages of text.
2. I add an image that is fixed position on page 2. Not anchored.
3. I delete the text content on page 2. TXTextControl does not believe there is any content on page 2 and shrinks the page count to 1 and only shows me page 1.

The image still exists in the document on page 2, if I add content back to page 2 the image shows up again.

Is there a reason why if I added a fixed position image on page 2 with no text content that TXTextControl does not believe there is a page 2?

I can code around this and remove images from our solution when the user saves the document, if there is only 1 page and there are images on page 2 remove them, but we believe that if there is an image on page 2 that the document is actually at least 2 pages.

Thank you

MailMerge: Removing empty blocks

$
0
0
In version X13, a new property has been introduced that specifies whether the content of empty merge blocks should be removed from the template or not: RemoveEmptyBlocks. This can be very helpful for dynamic templates where under specific circumstances, a complete block should be rendered or not. Consider the following sample class structure...

More...
Viewing all 1022 articles
Browse latest View live