Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Changed to strongly typed dataset not reflected in Crystal Reports

Posted on 2004-08-03
13
Medium Priority
?
927 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 70

Expert Comment

by:Éric Moreau
ID: 11702340
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
ID: 11702386
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 70

Expert Comment

by:Éric Moreau
ID: 11702410
You sometimes need close the project, re-open it, re-build it and only then you are able to set the location.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:gpretorius
ID: 11702441
I have tried:
Re-building everything
Closing everything down
Restarting my machine

0
 
LVL 70

Expert Comment

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

Author Comment

by:gpretorius
ID: 11703256
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
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11703349
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
ID: 11703847
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
ID: 11704479
>  select Database->Verify database
I have tried that already and it doesn't work
0
 
LVL 5

Accepted Solution

by:
pjapikse earned 2000 total points
ID: 11709702
Delete the .cs generated by the data set generator, THEN regenerate the dataset from the schema.
0
 
LVL 5

Expert Comment

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

Author Comment

by:gpretorius
ID: 11714528
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
ID: 13940619
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

926 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