Skip to Content
0
Oct 15, 2019 at 07:18 AM

How to read formula for adjusting of x-position from .NET code behind

116 Views

Hi, I've written in C# as follows:

CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument iscrep = (costlistgrpt as ReportDocument).ReportClientDocument;
CrystalDecisions.ReportAppServer.ReportDefModel.ISCRReportObject reobj = iscrep.ReportDefinition.FindObjectByName("pager22");
CrystalDecisions.ReportAppServer.ReportDefModel.ISCRConditionFormula iscrfrml
= reobj.Format.ConditionFormulas[CrystalDecisions.ReportAppServer.ReportDefModel.CrObjectFormatConditionFormulaTypeEnum.crObjectFormatConditionFormulaTypeHorizontalAlignment];
string stxt = iscrfrml.Text;

//stxt has VALUE:
//Global BooleanVar bduplexa;
//Global NumberVar ipage;
//IF (ipage + PageNumber) MOD 2 <> 0 AND bduplexa = true OR bduplexa = false THEN
// crRightAligned
//ELSE
// crLeftAligned


How to get existing formula for adjusting of x-position for the same object; crObjectFormatConditionFormulaTypeDeltaX doesen't work; CR Version 13.022.2668
//Global BooleanVar bduplexa;
//Global NumberVar ipage;
//IF (ipage + PageNumber) MOD 2 <> 0 AND bduplexa = true OR bduplexa = false THEN
// 0
//ELSE
// -9000