on 06-04-2010 10:30 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.