Click here to Skip to main content
15,891,865 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

I am using VS 2008,asp.net,c#.net.
I have a web application which uses crystal report.
How to set left and top of formula field using C# program ?
How to set left and top of Text field object using C# program ?

Thanks in advance
George n t
Posted

Open your crystal reports design.Right click on formula field you get option format object then u can adjust it throw this!
if not got then again ask!
 
Share this answer
 
Comments
george@84 18-Feb-14 0:07am    
Hi astika, I want to set left and top position of formula field dynamically from C# program.
Section section;
FieldObject fieldObject1, fieldObject2, fieldObject3, fieldObject4;
//FieldFormat fieldFormat;

// Get the Section object by name.
section = rptDoc.ReportDefinition.Sections["Section3"];
// Get the ReportObject by name and cast it as a FieldObject.
// The name can be found in the properties window.
fieldObject1 = section.ReportObjects["ChequeDate1"] as FieldObject;
fieldObject2 = section.ReportObjects["Party1"] as FieldObject;
fieldObject3 = section.ReportObjects["RupeeToWrods1"] as FieldObject;
fieldObject4 = section.ReportObjects["amount2"] as FieldObject;
// Check if the FieldObject is null.
if (fieldObject1 != null)
{
// Get the FieldFormat object.
//fieldFormat = fieldObject.FieldFormat;
//fieldObject.Color = Color.Red;
fieldObject1.Left = Convert.ToInt32( rptDs.Tables[1].Rows[0]["rfChequeDateLeft"]);
fieldObject1.Top = Convert.ToInt32(rptDs.Tables[1].Rows[0]["rfChequeDateTop"]);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900