Winforms Snap: Mail Merge, Parameters, and Sparklines (What’s New in 13.2)

DevExpress Data Blog
05 November 2013

It’s release season again! I am excited to start unveiling some of the great features we are pushing to release in 13.2. Today I thought I would mention Snap reporting. Reporting with Snap is primarily designed for those quick ad-hoc reports that we often need to prepare on a moments notice. By leveraging our built in knowledge of Word, the process of extracting and binding data is very straight-forward. Lets separate some of the new features in Snap into those categories.

Extracting Data

In our previous release we added a fantastic way for acquiring data directly from the database. In this release we are packing a bit more into this data acquisition process by including server side parameters and filtering.

Snap Query Builder

The query builder is inspired by our Dashboard component (same bits) and is another step along the way of having a seamless data acquisition process across all of our products. Adding parameters and filtering should also look familiar (think reports):

Parameters

Parameters

Filtering

Filtering

It is also worth mentioning that this type of filtering is server-side filtering. The server is precisely where these kinds of things (filtering, summarization, calculations, etc.) should happen. I am often amazed at how many people query a database for an entire table and then filter the resulting set on the client side. This is a recipe for sluggish applications. In the case of filtering we have done the heavy lifting on your behalf.

Binding Data

Snap provides a rich set of tools for automatically creating tabular reports in a sensible manner. You can drag any set of fields, drag it into the design surface, and have a completed tabular report. Previously a free flowing (non-tabular layout) required additional steps to achieve. Starting in 13.2 you can right click on the data source and change it to a mail-merge data source in order to do a free from report.

Mail Merge Setting

In order to give a visual indication of this important difference we’ve highlighted the fields in this manner:

Mail Merge Setting Indication

Once in Mail-Merge mode you can drag (or click) fields to add them to the current cursor position.

Merge Results

We have also added a toolbar to assist with Mail-Merge reports:

Mail Merge Toolbar

This should make a tremendous addition to our already powerful visualization and reporting tools.

In Summary

These two features are just a couple of things we’ve added to Snap. Included among these are the ability to add Sparklines, add new barcodes (DataBar and UPC ITF-14), a better API support for themes, and advanced binding to rtf/html fields.

As always, if there are any comments and/or questions, feel free to get a hold of me!

Seth Juarez
Email: sethj@devexpress.com
Twitter: @SethJuarez

10 comment(s)
Nate Laff
Nate Laff

Fantastic! But here are some unanswered questions.

1) Can you use mail merge fields and tabular stuff in the same document?

2) Can it be defaulted when the control is created to be in mail merge mode rather than tabular?

3) Can DocumentServer perform the mail merge/generate like it can with XtraRichEdit currently so we can generate these documents non-visually?

Thanks Seth!

5 November, 2013
Robert Fuchs
Robert Fuchs

Looks like a SQL thing.

What about XPO?

5 November, 2013
Alexander Krakhotko (Xafari team)
Alexander Krakhotko (Xafari team)

Snap disigner for XAF?

6 November, 2013
John01
John01

ditto for XAF support

6 November, 2013
Seth Juarez (DevExpress)
Seth Juarez (DevExpress)

Great questions!!

Nate:

1. Yes - since you can add two data sources and work with both in the same document you can imagine a scenario where one is set to mail merge and the other is the default

2. Not sure - will have to get back to you. Are you looking for a property on the control?

3. Absolutely!

Robert:

The funny thing is that it is actually an XPO thing. It is what we use to connect to the database and is the foundation of our data acquisition API. Because of that, you are free to bind to whatever you like (including simple object graphs - which is what XPO is anyway).

Alexander/John:

I would love to have it in XAF! I think I will go bug Dennis on it :)

-Seth

7 November, 2013
Nate Laff
Nate Laff

Thanks, Seth.

1) I don't want two data sources really, Imagine I have a person with a many to many of family members (also of type Person) or something.

So properties may include Person.Name, then a collection of Person.FamilyMembers.

I want to be able to generate a letter (mail merge) that can be formatted as

Hello <Person.Name>

Please verify you're related to the following people, sign and send this letter back to us:

<TABLE OF FAMILY MEMBERS STARTS HERE>

<Person.FamilyMember[0].Name>

<Person.FamilyMember[1].Name>

<END TABLE OF FAMILY MEMBERS>

Thanks,

Management

See what I'm trying to do? I think you've finally got this and just want to verify!

2) Yes, I'd like when my Snap designer is created to be defaulted into mail merge mode (i.e. composing letters) and intentionally switch it to insert tabular data when required.

3) Awesome!

7 November, 2013
Steven Rasmussen
Steven Rasmussen

I too am interested in Nate's question regarding mail merge and tabular data.

11 November, 2013
George (DevExpress)
George (DevExpress)

@Nate: Among the main advantages of the mail-merge implementation in Snap is its support for master-detail layouts. This should answer your first question, as you can create such layouts with ease. Afterwards, before publishing the document, you can select a range of master records ('Person.Name') to include in the document along with their detail data, and even choose the type of separator between each master section (such as a page break or paragraph).

The second scenario you asked about is also supported: when creating a Snap application, you can enable the mail-merge mode to be used by default.

When the new release becomes available, you are welcome to explore the new Snap demos installed with DXperience.

14 November, 2013
Nate Laff
Nate Laff

Thanks, George! Very excited about these changes!

14 November, 2013
Mark Harby
Mark Harby

This is indeed great news on the mail-merge front.

Any chance of putting together some tutorial videos please ?

16 November, 2013

Please login or register to post comments.