Using Crystal Report in ASP.net MVC and creating generic report viewer

A sample VS 2010 project which will show how to use crystal report from ASP.net MVC project. This also shows how to create a generic/ common report viewer for showing crystal report. Prerequisite: To build and run this sample, you must have VS 2010 SP1,MVC 3 and CR 13.

C# (2.6 MB)
 
 
 
 
 
(4)
16,033 times
Add to favorites
1/17/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • MVC 4
    2 Posts | Last post December 14, 2012
    • Do you have this soluction for MVC 4?
    • no; I don't have now. but it can be converted to ASP.net MVC4.
  • How do I programatically set the db login info on the MVC?
    2 Posts | Last post October 23, 2012
    • I was able to set/change the login on aspnetsimple.aspx.cs using rd.SetDatabaseLogon().  However, I tried to do the same on FromMvcController.cs using rptH.SetDatabaseLogon() and it didn't work.
      
      Also, I tried commenting out the code you mentioned earlier, but I am still not able to print from the webforms report.  Any suggestions?
    • can you share your sample so that i can check.
  • Using Crystal Report in ASP.net MVC and creating generic report viewer using aspx pages
    2 Posts | Last post March 29, 2012
    • hi 
      
      Hasibul Haque
               Reply pls      
                         HOW CAN WE DO WITH OUT ASPX PAGES( I MEAN WITH  WITH RAZOR PAGES) IF U HAVE ANY SAMPLE LET ME KNOW ........
      
      Thanks
      Kartheek N
    • Sorry for delay.
      As i know using Razor view you cannot directly show crystal report using Crystal Report Viewer But you can show crystal report as a pdf format which i have shown on my sample(FromMVCController.cs).
  • Using Crystal Report in ASP.net MVC and creating generic report viewer using aspx pages
    1 Posts | Last post March 28, 2012
    • Hi 
      
      Hasibul Haque
               HOW CAN WE DO WITH OUT ASPX PAGES( I MEAN WITH  WITH RAZOR PAGES) IF U HAVE ANY SAMPLE LET ME KNOW ........
      
      Thanks
      Kartheek N
  • Using Crystal Report in ASP.net MVC and creating generic report viewer using aspx pages
    2 Posts | Last post March 22, 2012
    • Hi 
      Hasibul Haque
         Your Example is Very Use ful But I want Crystal Reports Using Aspx Page in ASP.net mvc If u Have send That one also...
      
      Thanks 
      Kaerheek N
    • Thanks for downloading my sample.
      
      After running my sample you will able to find following tab
      1. Using Web Forms
      2. From Controller/Action
      
      Now consider (1) Using Web From
      Here I have used ASPX page to show crystal Report. 
  • Toolbar and Chart
    2 Posts | Last post January 12, 2012
    • Hello Hasibul,
      
      I downloaded your solution and i found two bugs.
      First print button and everything else from toolbar doesn't work.
      Second when i drag chart i your dynamic report, it shows me broken image on chart place.
      
      Please tell me if you know how to resolve this?
      
      Thanks
    • Thanks for downloading my project and detecting bug.
      
      Fix:
      ====
      I have done some mistake by making session = "". Thats why report is not loaded properly on postback.
      Please disable following line of code from aspnetgeneric.cs
      /*
      Session["ReportName"] = "";
      Session["rptFromDate"] = "";
      Session["rptToDate"] = "";
      Session["rptSource"] = "";
      */
      Hope this will solve print problem.
      
      I have to check with chart. Now i have no idea about chart. I am sorry for that.
      Consider following 
      "Second when i drag chart i your dynamic report, it shows me broken image on chart place."
      
      Here dynamic report means?