Print Page | Close Window

.NET 2008 Blank Report

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4022
Printed Date: 06 May 2024 at 3:37am


Topic: .NET 2008 Blank Report
Posted By: Huntsecker
Subject: .NET 2008 Blank Report
Date Posted: 19 Aug 2008 at 1:07am

Hey,
not sure If I'm posting in correct forum but couldnt see one for .Net 2008, my issue is have recently bought the crystal reports .net programming book but its for 2005 so not sure if I'm missing a step..

I've created a dataset and to check this works I have a second form with DataGridView on it and have connected that to the dataset and without doing anything I have the data I need; now when I create a Crystal Report viewer, then select create report, make the report which uses the dataset, it shows random data ie down the left side is says monday to friday (no date fields in my report). when I then Run the report it just shows blank. what I've done above is basically part 1 of the book. any one able to point me in the right direction.
Cheers Smile



Replies:
Posted By: BrianBischof
Date Posted: 19 Aug 2008 at 1:12pm

Hi. Unfortunately, I'm working on the .NET 2008 book now. However, binding to a dataset works the same in both versions.

A couple things to consider: The dataset has to be a class within your application. It can't be an external DLL (if it is, I have a whole section in the new book detailing how to get that to work). Are you creating the XSD file using the current dataset structure? They have to match EXACTLY for CR to report from it. Also, make sure you specify a table name when creating the dataset and passing it to crystal Reports. Sometimes it helps to pass the DataTable object directly to CR via the SetDataSource() method.
 
I hope this helps.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: Huntsecker
Date Posted: 20 Aug 2008 at 1:29am

Tongue Cheers for the speedy reply, it put me on the right track Tongue the code that made it work was


 Me.DataTable1TableAdapter.Fill(Me.Report_data_set.DataTable1)
        CrystalReport11.SetDataSource(Me.Report_data_set)


much appreciated


Posted By: BrianBischof
Date Posted: 20 Aug 2008 at 2:11pm
Great. Can you show me the code you were using prior to this? It would be good to see the differences.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window