Printing a Calendar or Diary from ASP.NET Application - asp.net

We have an ASP.NET application that uses the Infragistics WebSchedule control to display appointments etc in the same manner as Outlook. The problem we have is that the customer wants to be able to print the page as it appears on the screen - which the control itself does not appear to support directly.
We have developed a Crystal Report that does a fair job but it is pretty complicated and just a little bit flaky (it does not stretch to accommodate all of the appointments for a particular day so if there are too many then they spill over). Bascially we have bullied Crystal to doing something it is not really meant to do - render a graphical representation of a diary rather than list the data in a tabular manner.
Does anyone have a better alternative to this?
Thanks in advance

DayPilot Pro (our product) supports PNG export that allows easy calendar/schedule printing (almost a pixel-by-pixel copy of the HTML control).
It's working for both the Calendar (traditional Outlook-like day/week view):
http://www.daypilot.org/demo/Calendar/
and for the Scheduler (showing a time line for multiple resources):
http://www.daypilot.org/demo/Scheduler/
Try "Print/export" button below the controls.

Well in the end I decided to junk the Crystal Report in this instance. It's fine for tabular data and graph data but not really suitable for a graphical representation of a diary/scheduler.
I opted for an XML/XSLT solution which has turned out better than I expected - especially in terms of speed.
I was able to generate an XML stream and depending on the date range feed it to a suitable XSL template which produced a Weekly or Monthly view of the report. A colleague sprinkled some CSS over it and we're sorted.

Related

MS Word template with loops, tables and charts

For our SaaS (LAMP) product reporting we are currently using JasperReports. We find it too cumbersome to develop reports with and the output in Word unworkable. Moreover, a couple of customers request to be able to develop simple reports themselves (to be used as mail merge). We would therefore like to develop templates right in Word. The idea is to have an application/webservice that would receive the Word template and JSON data from the LAMP application and return the filled-in report. The report has to support:
Loops inside content (repeating a document section several times while filling in array data)
Filling in tables (populating rows from array)
Filling in chart data in pre-created charts (from array)
This is the functionality we are using in JasperReports right now. Are there existing solutions to this? I've found quite a lot that can substitute simple variables, but no info about the the above three points. Will it be a lot of effort to write one from scratch? I would prefer a Windows OpenXML-based solution rather than a Linux PHPOffice-based one as I presume the former would handle the text split by spell-checker and language tags (though I'm not sure).
Windward and Docmosis are both commercial products that support the features you've listed and they are intended to be added to your application to provide reporting capabilities. Neither is are not OpenXML based. They can use Word documents as templates and perform the data merge into different output formats. Please note I work for Docmosis.
Aspose Words is another tool and it can populate a template but most of the power is through code rather than controls/directives in the template. Given your OpenXML thoughts, perhaps this is more what you are looking for.
More tools are recommended here in StackExchange.
I hope that helps.
ReportBox is a Web based reporting solution that can be used by any software application to generate documents and reports in Microsoft Word/ Excel/ PowerPoint/ HTML(DocX/Xlsx/PPTx/HTML) using OpenXML.
The process starts by building a Microsoft Word/ Excel/ PowerPoint/ HTML document as a template and uploading to ReportBox portal. Your application either sends data to ReportBox or ReportBox can pull data from your application database, which is then merged with the template to produce the finished report. Please note that I work for GreenThoughts.

formatting html for printing with page numbers

Here’s the basic question…
I have a long HTML document (a contract with 100+ pages) that ultimately needs to be a PDF document with headers and footers (page numbers). What is the best tool/language for making this happen?
Here’s the back story…
I work at a satellite office for a low-tech construction company that issues contracts to subcontractors, and because I am the only one who is able to unjam the printer, I have become the defacto IT person in the company. In the past, to make a contract, someone has had to go through a MS Word document (the boiler plate contract) and type in the necessary information to produce a contract.
About a year ago, I got so frustrated with that methodology that I created a MS Access Database where a user could add information using Access forms and then a mail merge with MS Word to populate a contract. This has been a HUGE improvement plus we have been able to start tracking money a lot more easily using the other database features. The database is stored on a shared computer in the satellite office. However, this system only works IF the individual users have MS Access and MS Word installed on their individual machines and only if they are physically connected to our local network.
With the success of this system at the satellite office, I am now attempting to create a web-based version of this tool that everyone in the company can use that only relies on standard software on individual machines and can be accessible anywhere.
I have converted a computer into a server for development purposes using XAMPP, created a SQL database, created HTML forms, and am using PHP to run queries. Over the past few months, I have crash coursed my way through myriad languages including CSS, and have finally gotten everything to the point that the system will create an HTML version of the contract with everything populated. Now I just need to format it for printing (ideally to a virtual PDF printer) with headers and footers (page numbers). This should be the easiest part, right?
CSS with the #media: print tags would, on the surface, appear to be the best way to make this happen because CSS3 uses tags like “#top-left” and “content: counter(page)” to do everything that I want; however, after investing a lot of time setting everything up, it appears that only Foxfire kind of supports this and IE and Chrome absolutely do not.
Headers and footers overlap body content, and I can’t get the pagination to work at all. Apparently these are common frustrations.
In my hunting, I ran across a program called Prince that would seem to do what I want (and quite a bit more), but the price tag on that is way more than I am willing to pay.
I can’t believe that what I want to do is a new or unique thing. I suspect I am just not searching for the right keywords. Is there a better tool/technique out there for converting HTML to a printer-friendly format without spending a ton of money?
I feel your pain. But the only solution I've found that really works is to use a PDF library to write the formatted text to a PDF directly from PHP (or Python or another language, but you mentioned PHP and I've done that). I've used R&OS quite a bit:
http://pdf-php.sourceforge.net/
It may take a little while to get up to speed, but you can do pretty much anything with it, including easily create nicely formatted tables, flowing text and embedded images. The catch is that, with the exception of a few tags like <b></b> and <i></i> you don't get to use any HTML or CSS - essentially you write two output routines, one for HTML and one for PDF.

Reporting platform for Asp.net - with excel/pdf/word export

I am looking for a reporting platform for our asp.net application, which will allow the report to be exported in excel (for tabular data), or PDF/Word (for document reports like Invoice prints).
Are there any standard options available?
I tried Rdlc, but it does not seem to help in the second case (at least I dint see a way, if you can please enlighten me :) ).
Currently we are using Interop for excel export (I know its not recommended for asp.net, we are planning to switch soon), use rtf templates for word reports (which also makes them somewhat customizable) and we dont have pdf export (planning to build it). But it seems like a waste of effort if standard controls are already available!
Cheaper the better! Free rocks!!
What's the issue with Rdlc? You can create any kind of format into it. For invoice prints etc you can use list data region. Its used for free flow kind of stuff. Its like ASP.NET repeater. In your case, you will have only one row of data.
Edit: even Crystal reports has equivalent functionality. As said, you will have only one row of data for invoices etc.
In both Crystal & RDLC, you can even supply multiple rows of data to your free flow report and generate multiple invoices in one go. Can be very helpful feature for users.

User defined reports with SSRS

I have an web application which serves SQL reporting services reports via the reportviewer control. Because of the complexity of some of the reports I use rdlc reports attached to business objects.
Now I would like to expand the system and allow some form of user-defined reports. Ideally I would like the users to connect their reports to the same business objects I use to create the rdlc reports.
Is there a control that allows users
to create/edit their own rdlc files?
Can rdl files be attached to
business objects?
Any hints/tips for writing my own
control to edit rdlc files? (I would
think this is a lot of work
and would only attempt if there is
no suitable answer to 1 or 2).
All my development has been done in VS 2005 with SQL 2005 but I could upgrade if new features in 2008 help with the solution.
This isn't much of an answer, but at my company I have put together our own Report Builder.
We have about 30 or so Reporting Service reports that our users can access through the web or desktop application. What we wanted to do was give our users the ability to take any given section within those reports and create their own.
If there is a report we have built for them but they don't want to see the graph, they can create the same report with out it. If they want to combine parts from 4 different reports to make one summary report they can drag those sections around on our custom builder and save it.
The report builder I had to put together pulls down all the different sub-reports they have chosen and reads through the XML adding them to a Report Builder Template XML file I have created. I then have to aggregate all the parameters so as to not ask for them more than once (parameter names do have to be unique across all reports if you don't want them aggregated). This new report XML is deployed to the server and the users can access them when ever they want.
I've also given them the ability to create their own cover pages, headers, and footers by dragging text boxes, images, global variables (date ran, created, ran by, page number, etc... anywhere on a blank canvas. I then convert all the items they've drug around and resized on this canvas in to another report XML file and deploy it as a sub-report that they can add to their custom reports.
Yes, this has taken quite a bit of work, but our users love it. We're in the process now of allowing them to create a report with special groupings so the report can be ran at different levels.
So it is possible, but there is no easy answer. =) I'd be glad to give advice to anyone who asks, but a direct copy of the code is a violation of my contract, but I'll do what I can outside of that.
I think SQL Reporting Services isn't meant for this kind of customization. You can hide and show controls and subreports, but stuff like interactive grouping etc isn't there.
You might look into a third-party reporting framework like Telerik's.

HTML Reporting Solution

What good components and packages are available for generating HTML reports based on report definitions? I have a truly horrific project where each report is a dedicated aspx page that builds one fantastically big HTML string, which it then assigns to a 'reportBody' Label control.
Standard grids are not a good solution as they provide no grouping capability, but I'm open to buying a grid that is friendly for grouping, printing, and exporting. FYI is one reporting engine option I'll be looking at. What else is there? SSRS may not be an option, as MSSQL may not even be an option.
BTW, this is an ASP.NET web site.
You can try ActiveReports.net
You can use i-net Clear Reports (used to be i-net Crystal-Clear). It has many different output formats like HTML, PDF, Postscript, etc. It can print and of course it supports grouping. It is platform-independent. You can it also use together with your ASP.NET. It support many different database like MS SQL, Oracle, MySQL, etc. But also other data sources are possible. The free and fully functional report designer is very easy to use.
Also, the pricing is far below other reporting tools such as Crystal Reports.
you can still use RDLC reports, and just build them in local mode (no SQL SERVER required). I routinely feed my RDLC reports data from the results of function calls rather than have them intimately tied to the database.
The DevExpress ASPxGridView has proven to be an excellent tool for this job.
Standard grids are not a good solution
as they provide no grouping capability
If you want to create your own, I can give you some advice. First, you could probably create the groups with ROLLUP or COMPUTE statements or similar in your SQL and use a grid.
I went the following route: reports are data-driven, so that I know which columns can be grouped and which ones need totals computed. I use a standard DataGrid, and in the ItemDataBound event, I keep a running total for any columns that require it, and then detect changes in the group column. When detected, I insert a group total, reset the running totals and insert out a new group header.
I did a quick prototype of this in a day. But by the time you work out all the little details to give the reports all the features they need, and make them look just right, you'll spend quite a bit of time and end up with a small mountain of code.

Resources