private void TestRadioField() { string[] radioOptions = { "op1", "op2", "op3", "op3" }; FieldRadio radioTest = new FieldRadio("radioTest", radioOptions); Console.WriteLine(radioTest); radioTest.SetData("op2"); Console.WriteLine(radioTest); (radioTest.elements[2] as FieldBoolean).SetData(true); Console.WriteLine(radioTest); }
private static IReportElement BuildTestGroup() { ElementGroupDynamic testGroup = new ElementGroupDynamic("TestGroup"); IReportElement bool1 = new FieldBoolean("bool1", false); IReportElement bool2 = new FieldBoolean("bool2", true); IReportElement bool3 = new FieldBoolean("bool3", false); IReportElement specialBool = new FieldBoolean("specialBool", false, "tooltip!"); IReportElement specialBool2 = new FieldBoolean("specialBool2", false, "tooltip!"); IReportField textField = new FieldString("textField"); textField.SetData("This is some text for the text field!"); IReportElement comment = new ElementComment("comment1", "This is a comment text block!"); IReportField intField1 = new FieldInteger("intField1", "int field description"); intField1.SetData(5); IReportElement specialString = new FieldString("specialString", "field Description"); ElementGroupDynamic row = new ElementGroupDynamic("testRow"); row.AddElement(new FieldBoolean("boolField", false)); row.AddElement(new FieldInteger("intField")); FieldRows fieldRow = new FieldRows("fieldRows", row); fieldRow.AddRow(); fieldRow.AddRow(); IReportField intField2 = new FieldInteger("intField2"); intField2.SetData("41"); string[] radioOptions = { "op1", "op2", "op3", "op3" }; FieldRadio radioTest = new FieldRadio("radioTest", radioOptions); radioTest.SetData("op3"); string[] listOptions = { "li1", "li2", "li3", "li4" }; FieldList listTest = new FieldList("listTest", listOptions); listTest.SetData("li2"); //testGroup.AddElement(specialBool); //testGroup.AddElement(specialBool2); //testGroup.AddElement(textField); //testGroup.AddElement(comment); //testGroup.AddElement(intField1); //testGroup.AddElement(intField2); //testGroup.AddElement(specialString); //testGroup.AddElement(radioTest); //testGroup.AddElement(listTest); testGroup.AddElement(fieldRow); testGroup.AddElement(bool1); testGroup.AddElement(bool2); testGroup.AddElement(bool3); return(testGroup); }