Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Open Vision for NET
»
NOV Text Editor for .NET
»
merge data from multiple tables of dataset using...
merge data from multiple tables of dataset using NRichTextViewWithCommandBars
Post Reply
merge data from multiple tables of dataset using...
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Mike Willis
Mike Willis
posted 8 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 18,
Visits: 109
I am using Nevron Open Vision for .NET Enterprise 2017.1
I have a requirement to merge data from multiple tables in a dataset (c# DataSet class).
Additionally to merge all rows from a table in the dataset.
Does RichTextView support this type of merging/
If not can i write a custom mailmerge class derived from NMailMerge and NDataSource?
Or
Can i override or add custom types to the Insert Field dialog , and process these fields myself?
Thanks in advance
Mike Willis
Tags
Insert Field Dialog
MailMerge
NRichTextView
Reply
Like
0
Replies
Nevron Support
Nevron Support
posted 8 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.3K
Hi,
The NOV rich text view uses the data rows from a single data table for mail merge. If you want to merge data rows from multiple data tables it is best to merge them into a single data table first and then pass this merged data table as data source for mail merge to the NOV rich text view. You can do this by creating a class that inherits
NMailMergeDataSource
, overriding its
GetDataTable
method to return your merged data table and assigning an instance of this class to the
DataSource
property of the rich text document block's mail merge object like shown below:
richTextView.Content.MailMerge.DataSource = dataSource;
Please note that Nevron Open Vision uses its own data API (i.e. custom implementation of data sets and data tables), which is the only way to make the data layer of your application truly cross-platform. For more information about the data tables in NOV (
NDataTable
) check out the
Data Tables documentation topic
.
Best Regards,
Nevron Support Team
Reply
Like
0
Mike Willis
Mike Willis
posted 8 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 18,
Visits: 109
Thanks! When deriving from NMailMergeDataSource
The compiler requires the implementation of Wwr() and Xwr().
When those are implemented the compiler then complains "No suitable method to override"
I don't find the methods Wwr() and Xwr() in the inheritance chain either.
Code below. Any suggestions?
public class DocumentMergeDataSource:NMailMergeDataSource
{
public override NDataTable GetDataTable()
{
DocumentDataSet ds = new DocumentDataSet();
return ds.DocumentToNDataTable();
}
internal override string Wwr()
{
throw new NotImplementedException();
}
internal override string Xwr()
{
throw new NotImplementedException();
}
}
Reply
Like
0
Mike Willis
Mike Willis
posted 8 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 18,
Visits: 109
Changed inheritance to NMemoryMailMergeDataSource
Reply
Like
0
Mike Willis
Mike Willis
posted 8 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 18,
Visits: 109
After changing the base class to NMemoryMailMergeDataSource, i receive object not set to instance of object error.
Event this simple class gives an error.
public class TestMergeDataSource:NMemoryMailMergeDataSource
{
}"
need more assistance!
Mike
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
merge data from multiple tables of dataset using...
Mike Willis
-
8 Years Ago
Was also looking at this as a solution? When needed you can easily...
Mike Willis
-
8 Years Ago
Hi, The NOV rich text view uses the data rows from a single data...
Nevron Support
-
8 Years Ago
Thanks! When deriving from NMailMergeDataSource The compiler requires...
Mike Willis
-
8 Years Ago
Changed inheritance toNMemoryMailMergeDataSource
Mike Willis
-
8 Years Ago
After changing the base class to NMemoryMailMergeDataSource, i receive...
Mike Willis
-
8 Years Ago
Hey, Attempting to do as you suggest "by creating a class that...
Mike Willis
-
8 Years Ago
You can use the NMemoryMailMergeDataSource directly without creating...
Nevron Support
-
8 Years Ago
Had to add the following to my class public static readonly NSchema...
Mike Willis
-
8 Years Ago
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search