方法如下:
private void FormatReportViewer()
{
CrystalDecisions.Windows.Forms.PageView oPageView = new CrystalDecisions.Windows.Forms.PageView();
System.Windows.Forms.TabControl oControl = new TabControl(); foreach(object tab in CrystalReportViewer1.Controls)
{
string sControl = tab.GetType().Name.ToString();
if(sControl == "StatusBar")
{
CrystalReportViewer1.Controls[4].Visible = false;
}
if(sControl == "PageView")
{
oPageView =
(CrystalDecisions.Windows.Forms.PageView)(tab);
oControl = (TabControl)(oPageView.Controls[0]);
oControl.ItemSize = new Size(0, 1);
oControl.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
oControl.Appearance = System.Windows.Forms.TabAppearance.Buttons;
}
}
}
private void FormatReportViewer()
{
CrystalDecisions.Windows.Forms.PageView oPageView = new CrystalDecisions.Windows.Forms.PageView();
System.Windows.Forms.TabControl oControl = new TabControl(); foreach(object tab in CrystalReportViewer1.Controls)
{
string sControl = tab.GetType().Name.ToString();
if(sControl == "StatusBar")
{
CrystalReportViewer1.Controls[4].Visible = false;
}
if(sControl == "PageView")
{
oPageView =
(CrystalDecisions.Windows.Forms.PageView)(tab);
oControl = (TabControl)(oPageView.Controls[0]);
oControl.ItemSize = new Size(0, 1);
oControl.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
oControl.Appearance = System.Windows.Forms.TabAppearance.Buttons;
}
}
}
解决方案 »
- C# Thread 没被执行 怎么回事???????????
- 几个C#语法问题求解答……
- C#可能够获取CPU中断信息呢
- Adapter.Update时出现RowError值: SQL: Statement too long.”
- 请问在C#2.0中怎样编程设置一个目录共享
- .Net开发的一个remoting程序,内存占用直线上升而且不释放。。。。。
- 请问在一个框架向另一个框架document.write(字符串),怎样实现!!
- 有关注册登录界面的一些问题,急!
- C# 怎么把主线程的方法委托给子线程啊?
- treeview闪烁
- 关于制作安装包的问题
- 李开复搞的Code Jam编程大赛里面的一道Demo例题!
{
foreach(Control control in CrystalReportViewer1.Controls)
if (control is CrystalDecisions.Windows.Forms.PageView)
foreach(Control controlInPage in control.Controls)
if (controlInPage is TabControl)
foreach(TabPage tabPage in (controlInPage as TabControl).TabPages)
if (tabPage.Text == "MainReport")
{
tabPage.Text = newName;
return;
}
}