Jan 29th, 2013, 12:46 PM
using a modified dataset for a Crystal report in vb.net 2005...
I do not have a lot of Crystal and vb.net development experience so I hope someone can help me out! Our application developer left and it has fallen in my lap to maintain the applications he built. I was recently asked to add a new field to one of our applications and also modify a report to include that new field. In order to do so, a new table had to be added to the database and another table modified, then I had to make changes to parts of the vb application to include this new field on the form etc... Now it's time to make changes to the report. From what I can see it's really messed up. The report uses a dataset called "Dataset1" but yet I cannot see any references to that dataset anywhere if I click on the Data Sources tab! That aside, when I drill down into that dataset, it is using an SQL Server view that when I look at the properties for it - actually points to another view (the properties show you the table name the view is using) and in this case the table name is showing as the new view he created to replace the old one - so the dataset is using "SQLview1" but it is pointing to table/view "SQLview2". To me that seems really messy and not a really good idea. it shoud have been modified to point to the new view period. What it looks like to me after looking through the mess is that the original SQL view ("SQLview1") changed so much over time due to tables being added, removed and modified, that he created a brand new view ("SQLview2") in which he replaces the old fields with the new fields that now exist but uses "alias" names for them where the alias field names would be what that field used to be called in the old view. This would mean that he would not have to make as many mods to reports that used those old field names I am guessing... Make sense?
Anyway, that aside, now I have a modified SQL Server view that now includes the new field that I want to add to this existing report. How do I get it added to the existing dataset so that I can drag it onto the report?? As a test I created a new report, then created a new dataset that points to the new modified view, added some fields including my new one and the preview works just fine... Not sure what I have to go through to have this new field added to an existing report with an existing dataset that needs to be modified to include new fields though... I did try using the database wizard and used the "update" procedure to replacing the old dataset that I can;t find any trace of called "dataset1" with my new dataset I created and that did show me the new field but after I have dragged my new field on the report and try to preview it, no data shows up in the preview... So not sure what I am doing wrong there...
I also don't want to rebuild this report because it appears to be very convoluted. I just want to add one field and the users are quite anxious to get this on there.
Any help would be much appreciated!
Click Here to Expand Forum to Full Width
Survey posted by VBForums.