Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Legt das Cascading Stylesheet (CSS) für verschiedene Abschnitte und Berichtobjekte fest.
[Visual Basic]
Public Overrideable Sub SetCssClass( _
ByVal objectScope As CrystalDecisions.Shared.ObjectScope, _
ByVal cssClass As String _
)
[C#]
public virtual void SetCssClass(
CrystalDecisions.Shared.ObjectScope objectScope,
string cssClass
);
Parameter
objectScope
Gibt den Abschnitt oder die Abschnitte des Berichts an, auf die sich die Formatklasse bezieht. Legen Sie beispielsweise das Format für den gesamten Bericht fest, oder legen Sie das Format für den Kopfbereich des Berichts fest.cssClass
Der Name der Formatklasse gemäß Definition im Stylesheet.
Hinweise
Die Formatklasse kann verwendet werden, um die Objekt- und Abschnittsformate im Bericht außer Kraft zu setzen. Legen Sie die Formatklasse für Berichte fest, die mit dem CrystalReportViewer-Steuerelement angezeigt werden.
Beispiel
Im folgenden Beispiel wird die Formatklasse für den Detailbereich eines Berichts festgelegt. Zunächst wird der Bereichswert für die Formatklasse festgelegt und dann wird das Format angewendet.
[VJ#]
private void setReportStyle(String styleName, char section)
{
ObjectScope scope;
switch(section)
{
case 'R':
scope =
ObjectScope.AllReportObjectsInGroupHeaderSections;
break;
case 'G':
scope =
ObjectScope.AllReportObjectsInGroupFooterSections;
break;
case 'D':
scope = ObjectScope.AllReportObjectsInDetailSections;
break;
default:
scope = ObjectScope.AllSections;
break;
}
Report.SetCssClass(scope, styleName);
}
[Visual Basic]
Private Sub SetReportStyle _
(ByVal styleName As String, ByVal section As String)
Dim scope As New ObjectScope()
Select Case (section)
Case "GroupHeader"
scope = _
ObjectScope.AllReportObjectsInGroupHeaderSections
Case "GroupFooter"
scope = _
ObjectScope.AllReportObjectsInGroupFooterSections
Case "Detail"
scope = ObjectScope.AllReportObjectsInDetailSections
Case Else
scope = ObjectScope.AllSections
End Select
Report.SetCSSClass(scope, styleName)
End Sub
[C++]
void SetReportStyle(String* styleName, char section)
{
ObjectScope scope;
switch(section)
{
case 'R'
scope = ObjectScope::AllReportObjectsInReportHeaderSections;
break;
case 'G':
scope = ObjectScope::AllReportObjectsInGroupHeaderSections;
break;
case 'D':
scope = ObjectScope::AllReportObjectsInDetailSections;
break;
default:
scope = ObjectScope::AllSections;
break;
};
Report->SetCSSClass(scope, styleName);
};
[C#]
private void SetReportStyle(string styleName, string section)
{
ObjectScope scope = new ObjectScope();
switch(section)
{
case "GroupHeader":
scope =
ObjectScope.AllReportObjectsInGroupHeaderSections;
break;
case "GroupFooter":
scope =
ObjectScope.AllReportObjectsInGroupFooterSections;
break;
case "Detail":
scope = ObjectScope.AllReportObjectsInDetailSections;
break;
default:
scope = ObjectScope.AllSections;
break;
}
Report.SetCSSClass(scope, styleName);
}
Anforderungen
Namespace CrystalDecisions.CrystalReports.Engine
Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Siehe auch
ReportDocument Klasse | ReportDocument Elemente | CrystalDecisions.CrystalReports.Engine Namespace
©2005 Business Objects SA Alle Rechte vorbehalten
| Business Objects SA http://germany.businessobjects.com/ Supportleistungen http://germany.businessobjects.com/support/ |