Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


InfoView - Bad Date Format String Details: errorKind (?)

Posted on 2009-04-14
Medium Priority
Last Modified: 2012-05-06
Infoview Only - I'm running a report that builds a date field from a string and fails on the first line of the following formula.
StringVar YY;
StringVar MM;
StringVar DD;
StringVar DOLR;
MM:=Mid(ToText({CMHR.DATRPC}), 5,2);
DOLR:= DD & "/" & MM & "/" & YY;

When running the report through Crystal Reports XI; there are no issues.

Any ideas?
Question by:ansvarit
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 101

Expert Comment

ID: 24149308
If the date field is a string, why are you converting to a string?


Author Comment

ID: 24153300

I'm taking a field from our database that is a string date; 20090101
I'm breaking up the string; and then rebuilding to format in Australia date format.
Then the string is converted to a date variable for display only. CDate ()

Essentially; the error on Infoview is coming back before reading any data, and is even erroring on the commented field //DRPT
LVL 101

Expert Comment

ID: 24153872
Have you tried the formula like this

MM:=Mid({CMHR.DATRPC}, 5,2);

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!


Author Comment

ID: 24153898
Apologies; upon double checking. The original field is a NUMBER field not a string. Thus the transformation to a STRING via the TOTEXT function.

mlmcc - When changing I get an error 'A String Is Required Here'.
LVL 101

Accepted Solution

mlmcc earned 1000 total points
ID: 24159146
Then the field isn't a text/string but a number

Since the default for ToText is to add 2 decimals and commas try it this way
20090101 converts to this string  20,090,101.00
The commas and decimal places cause the trouble

MM:=Mid(ToText({CMHR.DATRPC},0,''), 5,2);


Author Closing Comment

ID: 31570282
mlmcc - You're a gem. Issue resolved.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question