Dodo
Dodo

Reputation:

Populating reports/letters by using Word instead of Crystal Reports in a C# application?

I'll preface by saying that these reports are generated through a C# application;

I have customers who send me a template (Word-document) for a letter or report which they wish to populate with data (text, images, etc) from their database (which is used by their CRM system). Usually I will have to re-design these in Crystal Reports and add all necessary tags and fields. Which is a time-consuming job, and not really what I should be focusing on.

So what I'm wondering about is, can I use the Word-document directly to setup a report which can be filled with data? (Possibly in a C# service/application?)

Considering that at any given time there are many users trying to generate letters and reports, is this an efficient method of generating reports?

And finally, if this isn't a practical option, are there any other good alternatives to Crystal Reports?

Upvotes: 0

Views: 3479

Answers (3)

phinetune
phinetune

Reputation: 101

I know this question is old now, but I couldn't help but notice the similarity to another question which I answered earlier: Crystal Reports to Word Template. So I am mentioning that solution here too in case it helps searchers from the future who stumble by.

Your problem is very similar to one that we (an Education Dept.) had. The business analysts have many Word documents that they use as reports. In the "old days" they would hand edit them and insert data themselves, but now it has to all come from a central database etc. In other projects we had used iReport and Jasper which gave good results provided you had to the time to tinker with the formatting and layout of the output. In the end, though, it sort of fell down when the BAs wanted layout or formatting changes to the output (not data). Then the developers would have to be hauled off their current project to dive back into the report definition and tweak it for the new look. T E D I O U S.

In our latest project we use Docmosis which is a service based report generator that takes actual Word documents with named fields where the data needs to go. It takes your data and regenerates the document with your data in place and passes it back to you as Word, PDF or HTML. Because the input is just Word the BAs can edit and maintain the original templates themselves.

We run our own Docmosis process on an internal server, but they have a cloud based version of it now which should be easier to use without as much configuration. Of course, it goes out to the web for that, but that might be what you want if you can't host your own server or you are accessing from a mobile platform.

We have multiple users accessing it and at some times of the year it gets a bit of a hammering and so far so good. Not free, but for the money and the time is saves us devs it pays for itself.

Upvotes: 0

D3vtr0n
D3vtr0n

Reputation: 2909

I have done this before. I maintained a repository of Word documents for a state agency that an ASP.NET application would write to.

What you need is bookmarks in your MS Word document. You can populate the bookmarks programmatically.

You may not be using ASP.NET, but here is an example that can show you some C# and MS Word document bookmark interaction.

Hopefully that can give you an idea of wether or not this would be worthwhile.

Your other option is to use Sharepoint. If it is not installed currently, I do not recommend this route!!

Upvotes: 1

Dusty
Dusty

Reputation: 4697

I do not know of a way to use a Word document as a template for a Crystal Report.

The best option that I can think of on this is to use the Mail Merge functionality within Word which allows you to set up fields that are populated dynamically from a database.

This probably isn't the best solution if you are looking to provide a easy way for the end user to run these reports, but it's the best answer you've gotten so far. haha :)

Upvotes: 0

Related Questions