alpineguy Posted June 21, 2003 Posted June 21, 2003 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 Quote
hog Posted June 22, 2003 Posted June 22, 2003 can you not check the datasets recordcount property? Quote My website
JABE Posted June 24, 2003 Posted June 24, 2003 Or more specifically, check YourDataSet.Tables("YourDataTable").Rows.Count > 0. Quote
alpineguy Posted June 24, 2003 Author Posted June 24, 2003 *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. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.