Using Crystal Report in MVC and creating generic report viewer

Download Project
This article describes how to show crystal report in MVC.
Here I will describe two different ways for showing crystal report in MVC.
1. Showing crystal report using web forms in MVC.
    A. In same window
    B. In different window
2. Showing crystal report from Controller/action (by generating PDF on fly).
    A. In same window
    B. In different window

Continue reading

Export to pdf ( Create pdf on fly ) using and C#

Consider following code for creating pdf document on fly using in C#.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

 Continue reading