Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Trying to get Crystal Reports to work with Windows forms with a dataset. Here's my form_load event:

 

sqlDataAdapter1.Fill(dataSet11);

 

//Pass the dataset to the report

rpt11.Database.Tables[0].SetDataSource(dataSet11.Tables[0]);

crvMain.ReportSource = rpt11;

 

//Confirm that I have some data...

MessageBox.Show(dataSet11.Tables[0].Rows[0][1].ToString());

 

...I get a report with headings, but no data.

 

Anybody???

Posted

I dont do it the way you have?

 

But this works for me:

 


Dim myReport As ReportClass

myReport = New repWhatEverReport()

myReport.SetDataSource(m_WhatEverDataSet)

Me.CrystalReportViewer1.ReportSource =myReport

My website
Posted

Actually both methodologies work. The problem was in my report - I had changed datasources and the detail line has disappeared.

 

But thanks - now I have an alternative!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...