Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2020
:
Technical Questions
Topic: Prewiew CR error
Oldest Post First
Newest Post First
Author
Message
nalfein
Groupie
Joined: 07 Jul 2008
Online Status: Offline
Posts: 47
Topic: Prewiew CR error
Posted: 08 Jul 2008 at 11:43pm
Hi all i have a field in the report that have this formula:
numbervar start := instr({@articolo}, {@Form1}) + len({@Form1});
numbervar stop := instr({@articolo},{@Form3}) +2;
Mid ({@articolo}, start,stop - start - 2)
And all works good if records are a certain size (example: me.you.them.all)
If some record is short (example: me.you) the prewiev and following print cannot be done and CR report this problem
"String lenght is less than 0 or not an integer"
Can i put some formula to skip this problem so if start or stop are less than 0 (i think that is the problem) they come back positive?
I've tried with this formula:
numbervar start := instr({@myfield}, {@Form1}) + len({@Form1});
numbervar stop := instr({myfield},{@Form3}) +2;
if start <0 or stop <0 then
{@myfield}
else
Mid ({@myfield}, start,stop - start - 2)
But the messsage is the same
Any idea?
Thnx for help in advance
IP Logged
rahulwalawalkar
Senior Member
Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Posted: 09 Jul 2008 at 2:01am
Hi
Did you try <= 0
Can you post the data for @articolo and @Form1,@Form3,@myfield
cheers
Rahul
Edited by rahulwalawalkar - 09 Jul 2008 at 2:01am
IP Logged
nalfein
Groupie
Joined: 07 Jul 2008
Online Status: Offline
Posts: 47
Posted: 09 Jul 2008 at 5:03am
@articolo and @myfield are the same sorry
Data on those fields are on this format:
xxx.xxxxx.xxx.xx.xx
or similar lenght
@form1 is:
left({@myfield},instr({@myfield},'.')-1)
@form3 is:
Right({@myfield},instr({@myfield},'.')-2)
the problem is when the data on @myfield are similar to this kind of format:
x.xxx.xxx.xx
or
x.xxx.xx
So when they're short
I've tried with <=0 but the same error appear
Thnx in advance for help
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
This page was generated in 0.031 seconds.
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
CLICK PLAYS
|
COACH FORUMS
|
TROPICAL FISH
© 2004-2024 Brian Bischof. All Rights Reserved.