cancel
Showing results for 
Search instead for 
Did you mean: 

CRVS2010 Beta - Question about Format.ConditionFormulas

Former Member
0 Kudos

In RDC 9 was possible to set the text interpretation of a field as a condition formula, using a statement like the following:

fobj.Format.ConditionFormulas(CRStringFieldConditionFormulaType.crTextInterpretationConditionFormulaType).Text = "if InSTr(CurrentFieldValue,""</"")<>0 then crHTMLText else crUninterpretedText"

where fobj is a FieldObject.

The same statement in CRVS2010 gets executed, but the formula is not assigned. Reading the help I've seen such a statement seems to be no longer supported. The constant CRStringFieldConditionFormulaType.crTextInterpretationConditionFormulaType is not available. Is this true? If yes, how can I achieve the same result?

Thanks in advance.

Pier Alberto Guidotti

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Pier,

Open the Object Browser and then search for ConditionFormula and you'll find all of the references you are looking for. I don't have specific samples but check these links out for existing samples that should have one available:

Root Page

http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsHome

Enterprise Samples (including managed and unmanaged ras)

http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsSDKSampleApplications

Non-Enterprise Samples

http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications

Exporting Samples (RAS)

http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting

Thnak you

Don

Former Member
0 Kudos

I searched in the object browser but I haven't found something like the CRStringFieldConditionFormulaType constants as it was available in the RDC.

It seems the whole CRStringField group is missing. This sound a little bit strange to me. I recall I've seen the same issue when testing CR 2008 .NET and it was one of the reason I gave up in migrating our RDC app to .NET assemblies.

There is another way to assign the Text Interpretation Condition formula?

Thank you.

Pier Alberto Guidotti

0 Kudos

Hi Pier,

You have to include all of the RAS components to see the objects.

Add: CrystalDecisions.ReportAppServer.ReportDefModel.

then you'll find: CommonFieldFormatConditionFormulas

It should look something like this:

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

using CrystalDecisions.ReportAppServer.ClientDoc;

using CrystalDecisions.ReportAppServer.Controllers;

using CrystalDecisions.ReportAppServer.ReportDefModel;

using CrystalDecisions.ReportAppServer.DataSetConversion;

using CrystalDecisions.ReportAppServer.DataDefModel;

using CrystalDecisions.ReportAppServer.CommLayer;

using CrystalDecisions.ReportAppServer.CommonControls;

using CrystalDecisions.ReportAppServer.DataSetConversion;

using CrystalDecisions.ReportAppServer.ObjectFactory;

using CrystalDecisions.ReportAppServer.Prompting;

Thank you

Don

Former Member
0 Kudos

Hi Don,

I included all of the RAS components, and I saw the CommonFieldFormatConditionFormulas object.

My problem is I can't find the constant corresponing to the TextInterpretation condition formula.

I tried without success a statement like this:

fobj.FieldFormat.CommonFormat.ConditionFormulas(200).Text = "if InSTr(CurrentFieldValue,""</"")<>0 then crHTMLText else crUninterpretedText"

where fobj is of type CrystalDecisions.ReportAppServer.ReportDefModel.ISCRFieldObject and the value 200 corresponds to the value the TextInterpretation condition formula had in the RDC.

The search of the string "TextInterpretation" in the object browser returns no values.

Thank you.

Pier Alberto

Answers (1)

Answers (1)

0 Kudos

If the function is not their in the final release your only option is to manually code the function your yourself using .NET text API's.

Thank you

Don