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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field not printing in Crystal 8.5/9

Status
Not open for further replies.

barefoottraveler

Programmer
Dec 13, 2006
10
US
I am using CR v8.5 Dev and v9 Pro. I have created a letter using information from Oracle 10g datasource in letter header. I run a print procedure that creates one letter per record in the data. In order to run the procedure I have to set a record selector with one of the fields in the table.

I created a Basic Syntax formula:
@HCID-- formula = " "
and in the record selector I set @HCID = tblnm.HCID

Without the record selection criteria I preview the report and all the records show and all associated header fields. Once I place the above formula in the record selector I only see one letter and one particular field does not print. The culprit is a string value with 1 character. The data in the field is (1,2,4,9 or C). I have discussed this with my IT and no one seems to know why this field will not print.
It makes no logical sense to me. Any insight would be much appreciated.
 
Hi,
It appears that you are asking for only those records that have
" " ( a blank space)

In the tblnm.HCID field..Is that what you want?




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
It shows up blank on preview unless I place a 'live' HCID in the formula. However, the field that does not show up actually populates. This is good and bad. Good because I can see the field in preview. Bad because it populates that same value for every record when it actually prints.

The HCID is a unique value that allows the print procedure to pull one record at a time. The value that does not print is called BILL_FREQ.
 
I think that Turk's point is that you might use this instead:

formula = ""

Once you set the ID, you should get what you want.

It sounds like you want all rows if you DON'T set it, if so, code accordingly (Crystal syntax, not Basic here):

(
if @HCID <> "" then
{table.hcid}= @HCID
else
if formula = "" then
true
)

Notealso that you say @HCID = tblnm.HCID, where the reverse is actually what you want. It'll probably work, but it's more readable in the proper order.

-k

-k
 
Thank you for the response. As I am new to coding I can use all the insight into programming tips that I get. Nonetheless, the retrieval of rows is not really my problem right now. There is one field in the row of data that is not populating and I have no idea why.
If I retrieve all rows into Crystal the field populates. It only does not populate when I retrieve one row at a time. I don't know why it makes a difference. The record selection formula in place right now works but I tried to use the formula you sent(Crystal syntax) in the Record Selector:

(
if {@HCID} <> "" then
{tblnm.HCID}= {@HCID}
else
if formula = "" then
true
)

but the word 'formula' produces an error in Crystal syntax.
 
Hi,
are you sure there is data in that field for the individual row(s) you retreive?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Yes, all the rows imported to the table have data in them and each row has a value in the BILL_FREQ column.
 
Sorry:

(
if {@HCID} <> "" then
{tblnm.HCID}= {@HCID}
else
if {@HCID} = "" then
true
)

-k
 
Hi,
Try removing that formula ( for now) and create a parameter (called maybe,
ThisOne )
then use this
as a record selection formula:

{tblnm.HCID}= {?ThisOne}

Supply a known good value for the HCID of a record when prompted and see if BILL_FREQ is displayed..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Well, when I place a 'live' HCID in the @HCID (formula = "276A73984"), BILL_FREQ displays. If I leave the 'live' HCID in place and run the procedure to create the letters all data changes in the header information EXCEPT the BILL_FREQ. In other words, BILL_FREQ is hard-coded to the value existing for the 'live' HCID record.
Weird, huh??
 
Hi,
By what method are you calling the procedure that actually generates the letters? How is the report's data passed to it?

It seems that the problem field is somehow not getting each record's data, so it may be a poisitional issue ( for instance, a field in the Header of a page with multiple details may only have the first records data - if any)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I placed your formula in the Record Selector and it worked....did not fix the issue but I think it is much better than what I had.

Well, I found out that HCID was not unique in the table so I changed the Record Selector to pull from FILENAME and IMPORT_LINE_NO, which will always be a unique combination.

Still did not resolve the issue as I thought it might.

I'll try to place the field in another section of the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top