Does crystal report support CLOB data
I have to bind a stored procedure which returns CLOB data to my report. I am presently unable to do this. Do we need to specify some settings for this or is there any equivalent datatype in crystal reports.
Please reply soon It is very urgent.
Thanking in advance.

Datatypes supported by VS 2003 crystal reports
susanowo
crReportDocument.SetDataSource(ds.Tables[0]);
DatabaseFieldDefinition crDatabaseFieldDefinition;
crDatabaseFieldDefinition = crReportDocument.Database.Tables[0].Fields["Title"];
SortField crSortField = crReportDocument.DataDefinition.SortFields [0];
crSortField.Field = crDatabaseFieldDefinition;
It still gives me an Invalid Sort Number error at line 4 of the above code snippet i.e at SortField crSortField = crReportDocument.DataDefinition.SortFields [0];. Could you pls help in this regard. "Title" here is the name of a field in the table. It does not work even if I give an index.
SamSmithnz
For sorting samples, take a look at the C# ones available here:
http://support.businessobjects.com/communityCS/FilesAndUpdates/csharp_win_samples.exe.asp
There is a csharp_win_sortfields.zip sample in that package.
Keith - Business Objects
Wollmatt
Thanks
Poonam
RayHzz
Hello Poonam,
You will need to add the sort fields at design time as I mentioned in the previous post. Once you do then the code you have will allow you to change the sort field at runtime.
If you are sorting on multiple fields you will need to have more than one sort field defined at design time.
Keith - Business Objects
stxrxgl
I'm having a dynamic list of sort options, sometimes there is only one sort column, other times there are 2 or 3. The default is usually 1 column, how should I solve this Because you have to add sortfields at designtime, I've got 2 extra fields that is not always used, but they are still used by the reportviewer.
An example:
The user can choose from a Combobox with columns to sort by:
This means that I have to add 3 sortfields in designtime, because I must be able to support the "Name + Country + City" selection from my user. On the other hand, if the user only chooses the "Country" sortfield, the two extra sortfields added in designtime will also be present...
How should I resolve this
Is there some kind of dummy variable available, something like this(it can't be null):
rptReport.DataDefinition.SortFields[number].Field = EmptySortFieldDummy;
Ponnaravi
The code that you are using looks fine. I believe that you are getting the error because you have not predefined a sort in your report.
In the report designer, right click on the report surface to get the context menu and from here choose Report|Record Sort Expert.
Once you have added in the sort fields you will be able to define them at runtime.
Keith - Business Objects
DSouto
Datatype not supported.
There is another issue I need a clarification on:
In my report I want to sort the data on multiple fields. The sort fields are picked up at runtime. How do I achieve sort on multiple fields through C# .NET code. I tried the following piece of code:
FieldDefinition FieldDef ;
FieldDef = crReportDocument.Database.Tables[0].Fields[0];
crReportDocument.DataDefinition.SortFields[0].Field = FieldDef;
This code gives me the following error: "Invalid Sort Number".
And also probably does a sorting on only one field.
Please give a solution. We have to deliver this in the next two days.
Thanks for your reply.
DarrelCusey
We do support CLOB data-type when going through ODBC. Is this an Oracle database Do you know which ODBC driver you are using
Is there an error that you are getting
Keith - Business Objects
Peter Villadsen
abhi243
Did the sample application work for you Which version of Crystal Reports are you using
It looks like this was an issue for Crystal Reports XI and is fixed:
http://support.businessobjects.com/library/kbase/articles/c2017069.asp
Keith - Business Objects