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

256 Char limit

Status
Not open for further replies.

jamor1999

Technical User
Jun 26, 2001
182
US
Does anyone know of any type of variable that will hold more than 256 characters?
 
Variables will hold more than 254 characters, you just can't display more than 254 within a formula from CR 8.5 or below.

There are ways to work around this, such as using multiple formulas and dropping them into a text object.

Consider posting what you are doing, someone may come up with a better way of handling it.

-k
 
Let me try to sum this up. I've got a table in a program that looks like this:

Customer_Number | Memo
Customer_Number | Memo

and so on...

now, the memo field appears to be limited to 60 chars, so if the memo entered for a particular customer is longer than 60 chars, a new record is created for that customer and the continuation of the memo is stored.

Something like this:

Customer_Number | Memo
---------------------------------------------
01235698 | spoke with b.a. today. he says they have
01235698 | been receiving our statements. this is n
01235698 | ot likely since i sent over 5 of them sin
01235698 | ce Oct.
05475412 | Customer contacted A/R inquiring about th
05475412 | e notice we sent them.


I hope that will give the general idea. I needed to combine all of the memo fields into one paragraph so that they will print continuously. Otherwise, we see those incomplete words at the end of a sentance that carry over to the next line.

Unfortunately, when I tried to concatenate them into one string, Crystal won't display it because of the 256 character limitation.

Any ideas?
 
This is a weird design for a database, first, thoroughly douse the architect in a steamy heap of dung.

I would create a SQL Expression and CAST or CONVERT these into a varchar(60). Now you can do anything you'd like with the field.

Now group the report by Customer, and then create multiple detail bands (right click and select insert section below), placing this field in each band.

Now conditionally suppress each band based on a counter, such as:

Group header:
whileprintingrecords;
numbervar counter:=1;

Last Details section:
whileprintingrecords;
numbervar counter:=counter+1;

Right click each section and in the X 2 next to suppress create formulas to suppress each section, as in:

whileprintingrecords;
//record 1 detail
numbervar counter;
counter <> 1

//record 2 detail
whileprintingrecords;
numbervar counter;
counter <> 2

Now each line will appear only in there own detail section, one after the other.

Otherewise it will likely take external code or a messy set of concatenation code into numerous formulas to straighten this out.

Now toss a match on the dungheap.

-k
 
Boy, that's a lot to digest - for me anyway who has eeked along this far. I thank you for all your help already!

yeah, and I thought I was just a silly techy who didn't know anything about database design but could figure that this table sucks! i wish i could find that architect!

anywho... i will again read over your post and try to implement it. I hope you will be available if the dung hits the fan. ;)
 
One question, how do I determine how many detail sections I will need??
 
Unfortunately you would have to explore your data to know this, and this is really an ugly fix for an ugly database implementation.

The formulas method is even more complicated.

If possible, create a SP or View against the database which builds an intelligent data source.

-k
 
SV-

I'm confused by your solution, so maybe I'm not understanding something. It looks like jamor already has a 60-character field that she/he can work with (maybe not a true memo field?) and that it is already in its own detail line. My reading is that there are not multiple memo fields, but instead just one field with the contents appearing across multiple records--in essence, &quot;multiple detail&quot; lines per customer because there are multiple records.

If this is the case, then why not accumulate the field across records for each customer, using a formula that assigns them to different variables when the 254 limit is reached? Then a display formula for each variable could be dropped in a text box to combine them all.

Just trying to understand (and learn)...

-LB
 
LB: I alluded to that solution in the beginning, but I think that this might be simpler in this case.

My understanding is that it creates a new memo field each time 60 characters are hit (which is an absurd design). Hence you'll have multiple rows, and as you noted, will likely go into multiple formulas.

Tossing 10 detail lines in and conditionally suppressing is probbaly much simpler for this instance.

I wouldn't do any of it within Crystal, this is clearly a bad design(providing I understand it correctly), so I'd write a View or SP to correct the data prior ot bringing it into CR, which is what I do in EVERY case, at every contract.

I never use tables directly (only Views), and I always try to offload all processing to the database.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top