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!

Compare a left function with the next function 1

Status
Not open for further replies.

munchen

Technical User
Aug 24, 2004
306
GB
I am using crystal 8.5 and I am connecting using SQL server to a micrososft access database.

I need to do a running total on a field and reset the total when the first 10 characters from the left are <> to the next 10 characters.

When I edit the running total field, I need something like the following in the reset use a formula options:

Left ({Text},10)<> Next(Left ({Text},10))

Any ideas?
 
The formula you have should work fine, have you tried it ?



Gary Parker
MIS Data Analyst
Manchester, England
 
Gary,

Yes I've tried it but it says "A field is required here" and the cursor flashes after the Next( .

Left ({Text},10)<> Next(*CURSOR FLASHES HERE* Left ({Text},10))

Any ideas?
 
Just create a formula:

Left({YourField},10)

Then create a running total to reset on change of this fomula field.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Create a formula

//@Text10
Left({Text},10)

Then use this in the running total

{@Text10} <> Next({@Text10})

HTH



Gary Parker
MIS Data Analyst
Manchester, England
 
Even simpler dgillz, well spotted.



Gary Parker
MIS Data Analyst
Manchester, England
 
many thanks to both gjparker and dgillz. I used dgillz formula option and it worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top