cancel
Showing results for 
Search instead for 
Did you mean: 

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

dhgmbh
Discoverer
0 Kudos
220

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

View Entire Topic
0 Kudos

Try reading the formula field collection. See the Parameter sample on the download page.

dhgmbh
Discoverer
0 Kudos

Hi Don,

I've looked thru the code You suggested. It's all about parameters, unfortunately. My problem is NOT to find formula field or its representation in report as a formula field object. I do it all right. The formula field object placed in page footer is moved along x axis according to the formula set by object's x-Position adjustment.

I can't find the above formula in code behind. Help appreciated