Solved

Changed to strongly typed dataset not reflected in Crystal Reports

Posted on 2004-08-03
13
918 Views
Last Modified: 2008-01-09
I use Visual Studio .NET 2003 (C#) with embedded Crystal Reports.

I added a report to my solution which I based on a strongly typed dataset in the same solution.  After some initial work on the report, I added a field to the dataset.  However, I can not get Crystal Reports to refresh the field list - I have used the Verify Database option and this simply indicates that the database is up to date.  I have also switched on the "Discard data..." option.

The report works fine when passed the new dataset but I can not access the additional fields in the designer.  I have previously had this problem in another project and it resolved itself at some stage.
0
Comment
Question by:gpretorius
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
You need to re - "Generate the Dataset"
   -open your xsd
   -be sure that "generate dataset" is checked under the schema menu
  -You may need to save at this point



You need to re - "Set the location"
   -Open your report
   -right-click anywhere outside the report (in the grey zone)
   -Select database
   -select Set Location
   -In the "Replace with" list, open the "Project Data" node and the the "ADO.Net Datasets" node and find your schema there click on it and click the Replace button
   -now you can "Verify the database"

0
 
LVL 1

Author Comment

by:gpretorius
Comment Utility
I have tried your suggestion above already.  The dataset is set to generate.

I have tried replacing the data source as you indicate and it makes no difference.  
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
You sometimes need close the project, re-open it, re-build it and only then you are able to set the location.
0
 
LVL 1

Author Comment

by:gpretorius
Comment Utility
I have tried:
Re-building everything
Closing everything down
Restarting my machine

0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
Are you sure that your xsd file is modified?
0
 
LVL 1

Author Comment

by:gpretorius
Comment Utility
Yes.  I have viewed the xsd file and it has the changes in it.  The additional fields are being populated and passed to the report at runtime.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
I had hard time with that in the past (more when I was using VS.Net 2002). I have ever been able to finally have my fields and some times after using the "Set Location" feature many time!

Sorry, I can't do much without having your problem on my PC!
0
 
LVL 20

Expert Comment

by:TheAvenger
Comment Utility
You need to refresh the database. Open the crystal reports editor and check the menus. Search for an option Verify database or something like this. You can try to right click outside the report, select Database->Verify database

Sorry for the inaccurate explanations but I have no installation in front of me. However I am sure this works (at least in most cases, don't forget it's Crystal....)
0
 
LVL 1

Author Comment

by:gpretorius
Comment Utility
>  select Database->Verify database
I have tried that already and it doesn't work
0
 
LVL 5

Accepted Solution

by:
pjapikse earned 500 total points
Comment Utility
Delete the .cs generated by the data set generator, THEN regenerate the dataset from the schema.
0
 
LVL 5

Expert Comment

by:pjapikse
Comment Utility
btw, you will have to toggle the "view all files" setting to see the .cs file.
0
 
LVL 1

Author Comment

by:gpretorius
Comment Utility
When I logged in today and did a Verify Database I was suddenly told that the database has been updated.

I then made a further change to the dataset which was not picked up, but deleting the .cs file, shutting down VS and on restart doing a Verify Database seems to have done the trick.
0
 

Expert Comment

by:jrogovsky
Comment Utility
This is one of the most frustrating issues in Crystal .Net. So much of Crystal just doesn't work properly or as expected.

The real solution is to "Log Off" the dataset using the "Database->Log On/Off Server..." dialog, then run the database verify.

No need to delete code behind files, run the custom tools, relaunch VS, or reboot.

It seems that Crystal caches the dataset schema and the verify tool only verifies against the cache, not the actual database. The Log Off feature ensures that the cache is cleared before a verify attempt, forcing the verify against the actual dataset.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now