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

@formula

Status
Not open for further replies.

CF2201

MIS
Nov 8, 2001
12
0
0
AU
I am still using CR v4 that came with VB5. It accepts
{@fieldName} as a formula for all the fields in my dbf files i.e. without the need to insert the file name i.e. If I use the FILE "ABC" that has a field called "CLIENT" I can, with CR4, create a field formula by just calling it {@FieldName}and later use the formula in the report.
I am trying to switch to CR v5, but this latter will not accept the {@FieldName} formula i.e, I am forced to include the file name preceeding the field name e.g. {ABC.Client}.

I have a number of dbf files with the same fields and would like to use ONE report only for each of my files...whenever required - without the need to re-write the same report again & again.

Could someone please help - Tks

Claude
 
I am pretty sure that they work the same way in this regard. You may have created formulas that contain the true field name in the report, and then passed the approprirate field name from VB to the formula? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Many thans for replying Ken. I will try again....and again
if need be.
I don't seem to be able to manage. Could it be because I may have a DLL file missing or something similar.

So simple yet so hard for me + it's frustrating.

Cheers

Claude

 
I am not clear on where your problem is occuring. Explain exactly where you are and what happens when:

"I am trying to switch to CR v5, but this latter will not accept the {@FieldName} " Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Dear Ken,

I have numerous dbf files, one of which is called "ABC". The file "ABC" has some 41 fields (similar in field names & LEN to my other files).
If have created a number of reports (effortlessly) with CR4 and they work like a dream. The updates in the latter ver of CR prompted me to try V5 - short of cash I cannot afford the latest V8 or 8.5.
I used the same reports created with V4 to find that V5 does not accept the field formula, say "{@Client}" within a set of formulated lines or as a field-name formula.

Simply put - I start a new standard report - select data file - when prompted to add fields there's also a tab for field formula. Amongst others, I pick the field "Client" (just highlight/point)and select the formula tab & name the formula "Client" - then the formula edit box appears where the formula for the field "client" is entered, this being {@Client}. Whilst in V4 this field name formula is accepted the same cannot be said for V5. When I try this with V5 it says that there's an error in the formula. However V5 accepts {Abc.Client} as the formula field-name.

Sorry for being a pain, but I do need help as I would like to use the extras within V5.

Kind Regards

Claude.

 
You can use a formula field within another formula, but it sounds like you are you trying to put the formula field name into itself. That isn't accepted in any version of CR.

However if you put the database field into the formula (or even a literal value in quotes), you can replace the value with a new value or field from your application. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Ken, I'm afraid that I made a Bozo of myself. I explained myself very badly earlier....to recap I have amended the text below.

......where the formula for the field "client" is entered, this being {Client} and NOT AS I MENTIONED EARLIER {@Client}. CR5 will not accept the formula {Client} as a field name.

My apologies.

Kind regards.

Claude
 
I didn't work that much with V4, so I didn't know that it allowed you to not include the table alias. Just tested it, and yes this isn't allowed in later versions.

But in your app you should be able to change the location of a table, and CR will use the fields from that table. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Hello Ken!

It worked via changing the table location.

Thank you for your interest and advice.

Kind regards.

Claude

PS: I may invest in the later ver

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top