Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Saving Rich Edit formatting...
Terry Keane
Posts: 12
 
Saving Rich Edit formatting...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Aug 06 11:33 AM
fiogf49gjkf0d
Hi,

Is there a way to save the formatting created in a RichEdit textbox back to the database and then, when querying and returning the value, to have the formatting applied back to the RichEdit box?

Thanks.
Terry
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Saving Rich Edit formatting...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Aug 06 11:39 AM
fiogf49gjkf0d
How about a memo/blob field? You'd run into severe limitation issues if you tried to use a string field for instance as I believe rich text, like html, is mainly markup with a bit of text sprinkled about it.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Saving Rich Edit formatting...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Aug 06 12:39 PM
fiogf49gjkf0d
Yes. Bind the RichText property to a field in the database (memo). It will save the values along with the RichText markup & formatting and display properly as well when displayed. Also, if you need to report on the data as well, you can mark the field in Crystal as RTF so it will display correctly there as well.

BTW, if you use the Text property it will just give you the text without any RTF markup, so use the RichText property instead.
[Reply][Quote]
Terry Keane
Posts: 12
 
Re: Saving Rich Edit formatting...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Aug 06 1:40 PM
fiogf49gjkf0d
Thanks Jeremy and Ryan,

One problem I am having is that I need to insert the value of the RichText property into a SQL Statement. When I do, everything after the value (it looks like this:

=======
Update sysdba.MgrMeetingNotes Set MeetingNote='{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\b\fs16 test
\par }
========
)

gets chopped off. There is supposed to be a Where clause after the \par }. Is it because of the escape sequences? Am I supposed to delimited the Rich Text with something other than apostrophe?

Unfortunately, because of the context of what we are doing here, the form itself isn't bound. It will be serving multiple purposes depending upon the user's selection and it was thought to leave it unbound and fill it in on opening.

Any suggestions would be appreciated.

Thanks.
Terry


[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Saving Rich Edit formatting...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Aug 06 2:15 PM
fiogf49gjkf0d
Use an updateable recordset instead of a SQL statement.

See this article for reference:

How to update Data with Updateable RecordSets
http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=76
[Reply][Quote]
Steve Meyers
Posts: 11
 
Re: Saving Rich Edit formatting...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Aug 06 10:11 AM
fiogf49gjkf0d
Another advantage to the Updateable recordset is that the ISO date conversion is automatically handled for you through the OLEDB provider.
[Reply][Quote]
Terry Keane
Posts: 12
 
Re: Saving Rich Edit formatting...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Aug 06 2:12 PM
fiogf49gjkf0d
It worked!
Thanks!!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 10:50:31 AM