newbie crystal reports .net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
I've got a c# windows app with a crystal report .rpt file, its tied to the 'report source' of the crystal report viewer on a form.
When the form opens I get a prompt box to enter server/db/login. How do I tie the server db info into the code.
Also, when I create the crystal report, I selected an existing dataset used on separate form, (thats all I did) but is there a way to preview the data that comes back?

tia
Randy
 
Now I have the crystalreport viewer on the form. They share a sqldataadapter and the dataset/datagrid gets the data.
The crystalreport viewer - still no data. Here is the code.


public ReportDocument oRpt=null;
public Form1()
{

InitializeComponent();
sqlDataAdapter1.Fill(dataSet11);


oRpt = new ReportDocument();

crystalReportViewer1.ReportSource = oRpt;
oRpt.Load("C:\\Visual Studio Projects\\OpsPlanning\\CrystalReport2.rpt");

oRpt.SetDataSource(dataSet11);


Randy
 
Back
Top