水晶报表 修改文本信息

阿双2009 2009-12-11 10:04:17
如何修改“主报表”,工具栏上的提示文本信息 以及 状态栏上的文本信息??
...全文
81 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
阿泰 2009-12-11
  • 打赏
  • 举报
回复
我是提供你方法,具体还要你自己去研究。
多试试吧。
阿双2009 2009-12-11
  • 打赏
  • 举报
回复
谢谢,不过状态栏不是要去掉哦,我只是想把“当前页码”、“总页数”和“缩放系数”改成其他文本而已呢。。
阿泰 2009-12-11
  • 打赏
  • 举报
回复


1:去掉“主报表”标签页,去掉状态条等

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;
}
}
}

tabcontrol的Alignment属性可以设置选项卡出现在不同地方~~~~

2:更改mainreport tab上的标题如下:

private   void   SetReportName(CrystalReportViewer   CrystalReportViewer1,   string   newName)   
{
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;
}
}
阿双2009 2009-12-11
  • 打赏
  • 举报
回复
winform
阿泰 2009-12-11
  • 打赏
  • 举报
回复
WinForm程序还是 WebForm程序?
阿双2009 2009-12-11
  • 打赏
  • 举报
回复
怎么改呢。。请指教
cupwei 2009-12-11
  • 打赏
  • 举报
回复
文本信息难道还不能改?

4,816

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧