Skip to main content

Posts

Showing posts from December, 2015

Determine the safe sequence of Banker's algorithm

process      Allocation   Max   Available ---------    ------------   ------   ----------- p0             3                 6         2 p1            4                 8       p2            0                 1     p3            3                 5 p4    ...

How to show CrystalReport as and Download it in MVC

As there is no way till now to show crystal report in a view(MVC). You can simply convert the report document as pdf using following code:  public void ShowReport()         {             List<ToDos> lstTodos = new List<ToDos>();             lstTodos = db.ToDos.ToList();             ReportDocument rd = new ReportDocument();             rd.Load(Path.Combine(Server.MapPath("CrystalReport1.rpt")));             rd.SetDataSource(lstTodos);             Stream stream;             stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Portable...