Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Added new fields to an existing report, but they do not show.

Status
Not open for further replies.

cwadams1955

Programmer
Jan 21, 2008
52
CA
I'm new to CR, and dealing with an ASP.NET app that is reaching its end-of-life. There are a handful of reports using CR for Visual Studio .NET (VS 2003), and I have been requested to add an additional field from the database to one of those reports. The report uses an XDataSet as its source, and I have been able to figure out how to add a field from the SQL Server database into the dataset and refresh it so that the field appears in the list; I also need to use a formula to display a second text field on the report based on the data in the database field, and I have that created. At this point, it seems to me that I should be able to simply drop those two fields onto the report designer. However, neither the field from the dataset nor the formula field appear on the report when I run it in debug mode. The project builds with no errors. I'm obviously missing something, but no clue what it is. Any ideas?
 
Try to do (in Crystal Designer's menu) Database, Verify Database... to re-sync the report with the data set.

hth,
- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
We don't have CR as a stand-alone, just the integrated version that shipped with VS.NET 2003. I can right-click on the database, though, and select "verify database", and I've done that and get a msgbox that the database is up to date. I actually had to do that (along with jumping through a lot of other hoops...) just to get the extra fields from the database to show in the field list, and I've done it a couple of times since then, with no result.
 
If the fields show up in the field list, then what's stopping you from simply placing them on the report layout?

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Not a thing - that's exactly what I did: drag and drop them where I wanted them, set the font size and field size to match the other existing fields. They just don't show up when the report is run, it appears just as it did before I added them.
 
The report you are "running" is probably not the report you just re-designed. Place some static text on the report layout to test that notion.

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
You're right. I just changed one of the text headers and that change also doesn't appear when I run. That's great; now, I have to figure out which one of these reports is actually the one running, since the one I'm working on is the only one named anything close to "Time Sheet." Thanks.
 
Just in case this might help someone else, here's what I found:

The report I was modifying WAS the correct report, BUT:

At runtime, a new XDataSet was being dynamically created in the page code that calls the report, and the report's datasource was being set to use this XDataSet instead of the original. I went into the stored procedure that selected the fields from the underlying database table and added the new field reference, and the report works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top