Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I've gotten my report to do its thing with an ADO.NET DataSet, however...

 

I have a stored procedure that may or may not come back with data to fill the DataSet. If it doesn't come back with data, it breaks the schema and the report won't run. Is there any way to dynamically see if there's data coming back and just fill in a blank element? Or, maybe I should ask if there's an elegant way.

 

Any help is appreciated.

 

/cc

Posted

*sigh* It wasn't the blank data at all. In the Crystal Reports tutorial on ADO.NET, they never put the table names in the DataAdapters. This is problematic if you are only giving one DataSet to the report with multiple tables:

 

DataAdapter summaryDA = new DataAdapter( "exec blah.dbo 1", myConnection );

DataAdapter xutilDA = new DataAdapter( "exec blahxutil.dbo 1", myConnection );

DataSet myDataSet = new DataSet();

// Then you fill, but REMEMBER TO SPECIFY TABLE NAME

 

summaryDA.Fill( myDataSet, "MCSSummary" );

xutilDA.Fill( myDataSet, "MCSSummaryXUtil" );

 

Then all is well. :)

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...