SeanKilleen
SeanKilleen

Reputation: 8977

Crystal Reports 2008: field shows as blank even when data is returned from the database?

Issue

Attempted Resolutions

Question

Where in the process could I be going wrong? It shows when I run the view directly from the database, and every other field shows perfectly in Crystal the first time.

Upvotes: 2

Views: 9667

Answers (3)

Mark
Mark

Reputation: 1

I had the same issue on a new report I'd created and finally found that the issue was in one of the parameters I used in my command SQL - it had double }} at the end. Eliminating one of the }s allowed the query to return data.

That said, go over the SQL in your database expert with a fine toothed comb, and you'll likely find the issue!

Upvotes: 0

Brandon Moore
Brandon Moore

Reputation: 8780

I would assume you did 'Verify Database' but if not that's the first thing I would have tried.

And just a piece of advice... always, always, always run your reports off of a command you write yourself instead of using Crystal's GUI to let you select tables/views/procs. This allows you to make pretty much any kind of change to the query you want and even completely change the source from where your data is coming without wiping all your report controls away. If the modified query has the same field names it will always work seemlessly and if not it will give you a chance to redirect which fields are supposed to come from where. Otherwise... you will have to recreate everything as you just experienced.

Upvotes: 1

SeanKilleen
SeanKilleen

Reputation: 8977

There may be a more correct answer, but in a pinch, removing the view from my report (thus removing all fields), adding the view again, and redoing all fields caused the field to display correctly. Not sure how or why.

A further explanation would be appreciated, but for now, that's all I've got.

Upvotes: 0

Related Questions