本文整理汇总了C#中fyiReporting.RDL.Expression类的典型用法代码示例。如果您正苦于以下问题:C# Expression类的具体用法?C# Expression怎么用?C# Expression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Expression类属于fyiReporting.RDL命名空间,在下文中一共展示了Expression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Label
Expression _Label; // Label (string) for the value to display in the UI
// If not supplied, the _Value is used as the label. If
// _Value not supplied, _Label is the empty string;
internal ParameterValue(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
{
_Value=null;
_Label=null;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Value":
_Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
break;
case "Label":
_Label = new Expression(r, this, xNodeLoop, ExpressionType.String);
break;
default:
break;
}
}
}
示例2: SortBy
SortDirectionEnum _Direction; // Indicates the direction of the sort
// Ascending (Default) | Descending
internal SortBy(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
{
_SortExpression=null;
_Direction=SortDirectionEnum.Ascending;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "SortExpression":
_SortExpression = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
break;
case "Direction":
_Direction = SortDirection.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
break;
default:
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown SortBy element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
if (_SortExpression == null)
OwnerReport.rl.LogError(8, "SortBy requires the SortExpression element.");
}
示例3: DataRegionElement
internal bool DataRegionElement(XmlNode xNodeLoop)
{
switch (xNodeLoop.Name)
{
case "KeepTogether":
_KeepTogether = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
break;
case "NoRows":
_NoRows = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
break;
case "DataSetName":
_DataSetName = xNodeLoop.InnerText;
break;
case "PageBreakAtStart":
_PageBreakAtStart = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
break;
case "PageBreakAtEnd":
_PageBreakAtEnd = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
break;
case "Filters":
_Filters = new Filters(OwnerReport, this, xNodeLoop);
break;
default: // Will get many that are handled by the specific
// type of data region: ie list,chart,matrix,table
if (ReportItemElement(xNodeLoop)) // try at ReportItem level
break;
return false;
}
return true;
}
示例4: DynamicSeries
Expression _Label; // (string) The label displayed on the legend.
internal DynamicSeries(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
{
_Grouping=null;
_Sorting=null;
_Label=null;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Grouping":
_Grouping = new Grouping(r, this, xNodeLoop);
break;
case "Sorting":
_Sorting = new Sorting(r, this, xNodeLoop);
break;
case "Label":
_Label = new Expression(r, this, xNodeLoop, ExpressionType.String);
break;
default:
break;
}
}
if (_Grouping == null)
OwnerReport.rl.LogError(8, "DynamicSeries requires the Grouping element.");
if (_Label == null)
OwnerReport.rl.LogError(8, "DynamicSeries requires the Label element.");
}
示例5: Title
TitlePositionEnum _Position; // The position of the title; Default: center
internal Title(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
{
_Caption=null;
_Style=null;
_Position=TitlePositionEnum.Center;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Caption":
_Caption = new Expression(r, this, xNodeLoop, ExpressionType.String);
break;
case "Style":
_Style = new Style(r, this, xNodeLoop);
break;
case "Position":
_Position = TitlePosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
break;
default:
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Title element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
}
示例6: Visibility
string _ToggleItem; // The name of the textbox used to
// hide/unhide this report item. Clicking on
//an instance of the ToggleItem will toggle
//the hidden state of every corresponding
//instance of this item. If the Toggle item
//becomes hidden, this item should become
//hidden.
//Must be a textbox in the same grouping
//scope as this item or in any containing (ancestor) grouping scope
//If omitted, no item will toggle the hidden
//state of this item.
//Not allowed on and cannot refer to report
//items contained in a page header or
//footer.
//Cannot refer to a report item contained
//within the current report item unless
//current grouping scope has a Parent.
internal Visibility(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
{
_Hidden=null;
_ToggleItem=null;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Hidden":
_Hidden = new Expression(r, this, xNodeLoop, ExpressionType.Boolean);
break;
case "ToggleItem":
_ToggleItem = xNodeLoop.InnerText;
break;
default:
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Visibility element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
}
示例7: ChartExpression
DataPoint _DataPoint; // The data point that generated this
internal ChartExpression(ReportDefn r, ReportLink p, XmlNode xNode):base(r,p,xNode)
{
_Value=null;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Value":
_Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
break;
case "DataPoint":
_DataPoint = (DataPoint) this.OwnerReport.LUDynamicNames[xNodeLoop.InnerText];
break;
default:
if (ReportItemElement(xNodeLoop)) // try at ReportItem level
break;
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Textbox element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
}
示例8: Action
Expression _BookmarkLink; // (string)
//An expression that evaluates to the ID of a
//bookmark within the report to go to when this
//report item is clicked on.
//(If no bookmark with this ID is found, the link
//will not be included in the report. If the
//bookmark is hidden, the link will go to the start
//of the page the bookmark is on. If multiple
//bookmarks with this ID are found, the link will
//go to the first one)
// Constructor
internal Action(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
{
_Hyperlink = null;
_Drillthrough = null;
_BookmarkLink = null;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Hyperlink":
_Hyperlink = new Expression(r, this, xNodeLoop, ExpressionType.URL);
break;
case "Drillthrough":
_Drillthrough = new Drillthrough(r, this, xNodeLoop);
break;
case "BookmarkLink":
_BookmarkLink = new Expression(r, this, xNodeLoop, ExpressionType.String);
break;
default:
break;
}
}
}
示例9: StyleBorderWidth
Expression _Bottom; //(Size) Width of the bottom border. Max: 20 pt Min: 0.25 pt
internal StyleBorderWidth(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
{
_Default=null;
_Left=null;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Default":
_Default = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
break;
case "Left":
_Left = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
break;
case "Right":
_Right = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
break;
case "Top":
_Top = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
break;
case "Bottom":
_Bottom = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
break;
default:
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown BorderWidth element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
}
示例10: Textbox
internal Textbox(ReportDefn r, ReportLink p, XmlNode xNode):base(r,p,xNode)
{
_Value=null;
_CanGrow=false;
_CanShrink=false;
_HideDuplicates=null;
_ToggleImage=null;
_DataElementStyle=DataElementStyleEnum.Auto;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Value":
_Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
break;
case "CanGrow":
_CanGrow = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
break;
case "CanShrink":
_CanShrink = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
break;
case "HideDuplicates":
_HideDuplicates = xNodeLoop.InnerText;
break;
case "ToggleImage":
_ToggleImage = new ToggleImage(r, this, xNodeLoop);
break;
case "DataElementStyle":
_DataElementStyle = fyiReporting.RDL.DataElementStyle.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
break;
default:
if (ReportItemElement(xNodeLoop)) // try at ReportItem level
break;
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Textbox element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
if (_Value == null)
OwnerReport.rl.LogError(8, "Textbox value not specified for " + (this.Name == null? "'name not specified'": this.Name.Nm));
if (this.Name != null)
{
try
{
OwnerReport.LUReportItems.Add(this.Name.Nm, this); // add to referenceable TextBoxes
}
catch // Duplicate name
{
OwnerReport.rl.LogError(4, "Duplicate Textbox name '" + this.Name.Nm + "' ignored.");
}
}
}
示例11: ChartExpression
Expression _YAxis; //140208 GJL Added for left/Right YAxis Support
#endregion Fields
#region Constructors
internal ChartExpression(ReportDefn r, ReportLink p, XmlNode xNode)
: base(r,p,xNode)
{
_Values=null;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
//case "Value":
// _Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
// break;
case "DataValues":
_Values = new DataValues(r, p, xNodeLoop);
break;
case "DataPoint":
_DataPoint = (DataPoint) this.OwnerReport.LUDynamicNames[xNodeLoop.InnerText];
break;
case "ChartLabel":
_ChartLabel = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant);
break;
// 05122007AJM & GJL Added to store PlotType
case "PlotType":
_PlotType = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant);
break;
//140208 GJL Added for left/Right YAxis Support
case "YAxis":
_YAxis = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
break;
case "NoMarker":
case "fyi:NoMarker":
_NoMarker = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
break;
case "LineSize":
case "fyi:LineSize":
_LineSize = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
break;
case "fyi:Color":
case "Color":
case "Colour":
_Colour = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
break;
default:
if (ReportItemElement(xNodeLoop)) // try at ReportItem level
break;
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Chart element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
}
示例12: Query
int _Timeout; // Number of seconds to allow the query to run before
#endregion Fields
#region Constructors
internal Query(ReportDefn r, ReportLink p, XmlNode xNode)
: base(r, p)
{
_DataSourceName=null;
_QueryCommandType=QueryCommandTypeEnum.Text;
_CommandText=null;
_QueryParameters=null;
_Timeout=0;
_RowLimit=0;
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "DataSourceName":
_DataSourceName = xNodeLoop.InnerText;
break;
case "CommandType":
_QueryCommandType = fyiReporting.RDL.QueryCommandType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
break;
case "CommandText":
_CommandText = new Expression(r, this, xNodeLoop, ExpressionType.String);
break;
case "QueryParameters":
_QueryParameters = new QueryParameters(r, this, xNodeLoop);
break;
case "Timeout":
_Timeout = XmlUtil.Integer(xNodeLoop.InnerText);
break;
case "RowLimit": // Extension of RDL specification
_RowLimit = XmlUtil.Integer(xNodeLoop.InnerText);
break;
default:
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Query element '" + xNodeLoop.Name + "' ignored.");
break;
} // end of switch
} // end of foreach
// Resolve the data source name to the object
if (_DataSourceName == null)
{
r.rl.LogError(8, "DataSourceName element not specified for Query.");
return;
}
}
示例13: ChartBase
internal ChartBase(Report r, Row row, Chart c, MatrixCellEntry[,] m, Expression showTooltips, Expression showTooltipsX, Expression _ToolTipYFormat, Expression _ToolTipXFormat)
{
this._ChartDefn = c;
this._row = row;
this._DataDefn = m;
this._bm = null;
int width = this._ChartDefn.WidthCalc(r, null);
int height = RSize.PixelsFromPoints(this._ChartDefn.HeightOrOwnerHeight);
this.Layout = new ChartLayout(width, height);
this._SeriesBrush = null;
this._SeriesMarker = null;
this._showToolTips = showTooltips.EvaluateBoolean(r, row);
this._showToolTipsX = showTooltipsX.EvaluateBoolean(r, row);
this._tooltipYFormat = _ToolTipYFormat.EvaluateString(r, row);
this._tooltipXFormat = _ToolTipXFormat.EvaluateString(r, row);
}
示例14: Field
Expression _Value; // (Variant) An expression that evaluates to the value of
#endregion Fields
#region Constructors
// this field. For example, =Fields!Price.Value+Fields!Tax.Value
// The expression cannot contain aggregates or references to report items.
internal Field(ReportDefn r, ReportLink p, XmlNode xNode)
: base(r, p)
{
_Name=null;
_DataField=null;
_Value=null;
_ColumnNumber = -1;
_Type = TypeCode.String;
// Run thru the attributes
foreach(XmlAttribute xAttr in xNode.Attributes)
{
switch (xAttr.Name)
{
case "Name":
_Name = new Name(xAttr.Value);
break;
}
}
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "DataField":
_DataField = xNodeLoop.InnerText;
break;
case "TypeName": // Extension !!!!!!!!!!!!!!!!!
case "rd:TypeName": // Microsoft Designer uses this extension
_Type = DataType.GetStyle(xNodeLoop.InnerText, this.OwnerReport);
break;
case "Value":
_Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
break;
default:
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Field element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
if (_DataField != null && _Value != null)
OwnerReport.rl.LogError(8, "Only DataField or Value may be specified in a Field element, not both.");
else if (_DataField == null && _Value == null)
OwnerReport.rl.LogError(8, "Either DataField or Value must be specified in a Field element.");
}
示例15: SubreportParameter
Expression _Value; // (Variant) An expression that evaluates to the value to
#endregion Fields
#region Constructors
// hand in for the parameter to the Subreport.
internal SubreportParameter(ReportDefn r, ReportLink p, XmlNode xNode)
: base(r, p)
{
_Name=null;
_Value=null;
// Run thru the attributes
foreach(XmlAttribute xAttr in xNode.Attributes)
{
switch (xAttr.Name)
{
case "Name":
_Name = new Name(xAttr.Value);
break;
}
}
if (_Name == null)
{ // Name is required for parameters
OwnerReport.rl.LogError(8, "Parameter Name attribute required.");
}
// Loop thru all the child nodes
foreach(XmlNode xNodeLoop in xNode.ChildNodes)
{
if (xNodeLoop.NodeType != XmlNodeType.Element)
continue;
switch (xNodeLoop.Name)
{
case "Value":
_Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
break;
default:
// don't know this element - log it
OwnerReport.rl.LogError(4, "Unknown Subreport parameter element '" + xNodeLoop.Name + "' ignored.");
break;
}
}
if (_Value == null)
{ // Value is required for parameters
OwnerReport.rl.LogError(8, "The Parameter Value element is required but was not specified.");
}
}