Solved

how do i add a crystal report to a form and allow a user to review it vb .net 2008 sql 2005

Posted on 2011-02-18
3
316 Views
Last Modified: 2012-05-11
I have added a crystal report to a form. But all it does is display and then go away all in 1 or 2 seconds
I need to allow an user to review the report.
I have visual studio 2008
sql 2005
Crystal reports   ver 11


Here is the code I have so far.
code
Private Sub btnCrystalReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCrystalReport.Click
        Dim cryRpt As New ReportDocument
           cryRpt.Load("C:\johnm_work\CentreTrak2008\CrystalReport1.rpt")
        CrystalReportViewer1.ReportSource = cryRpt
           CrystalReportViewer1.Refresh()
/code
0
Comment
Question by:john M
  • 2
3 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 34931379
Try deleting the REFRESH line

mlmcc
0
 
LVL 3

Author Comment

by:john M
ID: 34943771
mimcc
Thanks that did work. Just one follow up question.
Do you have the code of a project that uses it or can you give me some suggestions on how to make the report stand out better?  
I added a file with the view of the form. The report looks  pretty sad.
What I show is only a dummy report. Can i put it on its own form and make it look more like microsoft word docuemnt? larger? i give you the points  I  was only wanting  some suggestions
zzz.doc.docx
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34944031
You can put the report viewer in its own form.  It can be sized to fill the screen,

mlmcc
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question