internal static void SetReportDataItemLinkProperty(this ReportDataItemLinkProperty property, string propertyValue) { do { var fieldName = Parsing.MustMatch(ref propertyValue, @"^([^=]+)=FIELD\(").Groups[1].Value; var referenceFieldName = Parsing.MatchUntilUnnested(ref propertyValue, ')', '('); //var referenceFieldName = Parsing.MustMatch(ref propertyValue, @"^([^)]+)\)").Groups[1].Value; property.Value.Add(new ReportDataItemLinkLine(fieldName, referenceFieldName)); }while (Parsing.TryMatch(ref propertyValue, @"^,\s?")); }
public static void Write(this ReportDataItemLinkProperty property, bool isLastProperty, PropertiesStyle style, CSideWriter writer) { writer.Write("{0}=", property.Name); writer.Indent(writer.Column); foreach (var line in property.Value) { var isLastLine = (line == property.Value.Last()); switch (isLastProperty && isLastLine) { case true: writer.Write("{0}=FIELD({1}) ", line.FieldName, line.ReferenceFieldName); break; case false: writer.WriteLine("{0}=FIELD({1}){2}", line.FieldName, line.ReferenceFieldName, isLastLine ? ";" : ","); break; } } writer.Unindent(); }