Skip to Content
0
Former Member
Oct 19, 2010 at 05:53 PM

Simple Viewer question

27 Views

I have this simple application that we redistribute to enable customers to view Crystal Reports against their database. They can also develop/build their own reports and use our viewer to enable other users to view the reports.

We upgrade to Crystal 2008 mainly because off the issue with the missing native Oracle drivers in the run-time environment.

However after upgrading the reports (which run fine in CR2008) show strange behaviour. I tried every service pack and hot fix pack available but the strange behaviour stays. With strange I mean: a report with two parameters asks only for one (not a problem in CR2008 and/or in previous editions of the run-time). So I'm posting some code here to see if anyone can spot the mistake:

MainForm.cs

(the parameters get filled someplace else)

CRForm MyCRForm = new CRForm(Preport, Pserver, Pdatabase, Puser, Ppassword,splash);
 MyCRForm.ShowDialog();
 Environment.Exit(1);

CRForm.cs (which has a reportviewer and reportdocument component)

public CRForm(String rapport, String server, String schema, String user, String password,Splash splash)
    {            
      InitializeComponent();
      this.Text += ' '+Application.ProductVersion;
      
          try
          {
              Application.DoEvents();
              reportDocument1.Load(rapport);
              reportDocument1.SetDatabaseLogon(user, password, server, schema);
              ReportViewer.ReportSource = reportDocument1;
          }
          catch (Exception Ex)
          {
              MessageBox.Show(Ex.Message);
              Environment.Exit(1);
          }
      
    }

Anyone?

tia,

Martin

Edited by: BrekhofM on Oct 19, 2010 7:53 PM