Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Part Description too long - need function/formula? Post Reply Post New Topic
Author Message
aeromonte
Newbie
Newbie


Joined: 25 Feb 2008
Location: United States
Online Status: Offline
Posts: 18
Quote aeromonte Replybullet Topic: Part Description too long - need function/formula?
    Posted: 16 Feb 2010 at 7:38am

Hi,

We are using an ERP system (Epicor Vantage) and Crystal Reports 11.  A few of our reports, that include parts and part descriptions in them, "bomb" if the part description is too long (over so many characters).  Most of the time, we can find the part/s with the long description/s and shorten the description/s to fix the issue.  However, this time, we can’t.

I am looking for a simple Crystal report with a formula/function to include part.partnum and some type of function for part.partdescription to count or show which decriptions are the longest (just the Part table would be needed).   I could then sort decending by the count number and find the culprit part descriptions.

I tried LEFT and LEN/LENGTH and the report still bombs probably because it still had to pull the long  description in first in order to trim or count it. 

I also contacted our ERP tech support and they sent me an email with this:

SOLUTION:

In some cases the problem is that the data you are trying to retireve is just simply too large.  You can try the SUBSTR function in your SQL statement.  Below is an example of what that might look like, Part Description is used for this example.

 

SELECT SUBSTR(PartDescription, 1, 100) shortPartDesc FROM PUB.Part

 

This will work if you're using a pass-thru query and if you want the whole description, you can pull it down in pieces:

 

SELECT SUBSTR(PartDescription, 1, 100) PartDesc1, SUBSTR(PartDescription, 101, 100) PartDesc2 FROM PUB.Part

 

I don’t think that SUBSTR is a function in Crystal (at least I could not get it to work)…  This "concept" seems like it would work however. 

Anyone have any ideas?

Thanks so much!

John


Edited by aeromonte - 16 Feb 2010 at 8:30am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 16 Feb 2010 at 7:58am
Did a little research for you, I am assuming you are using a Microsoft SQL Server connection.  If so, then the function is substring(string, start, length)
IP IP Logged
aeromonte
Newbie
Newbie


Joined: 25 Feb 2008
Location: United States
Online Status: Offline
Posts: 18
Quote aeromonte Replybullet Posted: 16 Feb 2010 at 8:13am
Kevlray, thanks for helping out! 
We are actually not using a SQL Server connection (kind of wish we were). 
Our database is Progress and we use an ODBC connection to it. 
 
I am trying to find a function in Crystal Reports or even from a MS Access query via ODBC. 
 
When trying to pull all parts/part descriptions In Access, I get ODBC-call failed: a partdescription in table pub.part has exceeded its max length or precision.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 16 Feb 2010 at 8:24am
I do not know the progress DB, thus I do not know what functions are available for it.   As far as Access, it has a lot of limitations, so I do am not sure what you can get away with.
 
Lots of Luck.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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.047 seconds.