Print Page | Close Window

Using Oracle data type "Long" in a report

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1094
Printed Date: 18 May 2024 at 5:54am


Topic: Using Oracle data type "Long" in a report
Posted By: wattsjr
Subject: Using Oracle data type "Long" in a report
Date Posted: 31 Jul 2007 at 9:08am
I am in the process of rewriting several reports that were originally written in CR6 and run from a VB6 app. In the report I'm working on now there is a comments field that is defined in the Oracle table as data type LONG.  All of the other comment type fields that I've been using are defined as VARCHAR2(2000) and they work fine.  Is there a trick to using a LONG data type?  I should also mention that they display just fine in the CR6 version, and redefining the Database field is not an option.
 
Any help would be greatly appreciated.


-------------
-jrw



Replies:
Posted By: jkwrpc
Date Posted: 31 Jul 2007 at 12:12pm

I am not a Oracle person but in looking on the web it seems this is  datatype that holds alphanumeric characters (a whole lot of characters).  So it is probably somewhat simitar to the Text datatype in SQL Server.

If that is true I would try the following in a formula

CStr({Yourfieldname}

 
It should convert it to a string which CR can read.
 
Best thought I have....
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net


Posted By: wattsjr
Date Posted: 31 Jul 2007 at 2:34pm
Thanks for trying to help.
 
Although your suggestion "CStr({Yourfieldname}" didn't work, your reply did get me thinkiing in another direction.
 
I went over to Business Objects and poked around until I came across a solution that made me wonder if my ohoice of OLE DB Provider could be the problem.
 
I was using "Microsoft OLE DB Provider for ODBC Drivers". 
 
I created a new Q'n'D (quick n' dirty) report using "Microsoft OLE DB Provider for Oracle" and the errant Oracle Long field was able to be displayed in the report.
 
Now if I can just figure out a way to change the OLE DB Provider in my real report.
 
Any suggestions?
 
Again, thanks for the help.
-jrw


-------------
-jrw


Posted By: BrianBischof
Date Posted: 31 Jul 2007 at 3:34pm
Glad to see that John got you on the right track. You can use Database > Set Datasource Location to change providers.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: jkwrpc
Date Posted: 31 Jul 2007 at 6:32pm
Thats the way it always happen you get an off track answer that leads you to the correct one.  That is the value of forums such as this one. Its a place to share thoughts that lead to solutions. Thanks again to Brian for hosting it.
 
Looks like you have what you need to go on to finishing the project and that is all that matters.
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net
 



Print Page | Close Window