'Crystal Reports is not showing values for database fields in text objects
I have a text object and in it I dropped some fields from the database explorer and I put also some text in that text object. My problem is that the values for the database fields in the text objects are not shown. When I created the text object, I did it in the designer, and when previewed it worked. When I export the report to a rpt file, those fields are not shown. My text object is in the report header.
I use Crystal reports 2008 and a database command for returning my records.
Please help !
Solution 1:[1]
Hmmm. I can't duplicate that behavior here. The database field in the text box fills for me when I test it. I'm curious, if you put the same database field in the Report Header outside of a text box, does it have a value when you export the report? What if you move the text box down to the Page Header? To the Detail block? Do any of these things affect whether the database field fills or not? If it never fills, it suggests that whatever conditions produce that value, i.e in the database, or at the report level via parameters, doesn't hold when you open the new .rpt. Unfortunately, since a Crystal Report is such a visual medium, i.e. it's not just a block of code, I can't really "see" what the issues might be to be of much more help.
Solution 2:[2]
what happens if you move the field from the report-header section to the detail section? it is possible that the first record in your result set is blank/null for that field. if you move it (the textobject) to the details section, you can test my assertion.
Solution 3:[3]
It seems that when translating the text objects something is lost. If I lose the translation, it works. Strange.
Solution 4:[4]
why you use text object my friend?? you can use formula field exchange of text object and i am sure it can help you. but if you use code to create your objects, you can use field object exchange of text object. you know text of text objects are constant,there for you cant add data base field in it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Henry |
| Solution 2 | craig |
| Solution 3 | Alex |
| Solution 4 | Hamidreza |
