水晶报表导出指定名称

asd_qingchengxue 2009-12-02 09:21:57
我用的是vs2005自带的水晶报表,导出和打印用的是水晶报表自带的功能。

导出时默认的名称如下:



现在想实现导出时,给报表指定一个名字,规则是汉字+时间,例如:销售日报20091202 或 销售日报2009-12-02

不想要他默认的名字,也不用客户自己去改这个名字,直接给他指定好,他要改就改,不改默认就是我给他默认的名字。

这个可以做吗?

...全文
250 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
哦,是这样啊,我试试。
阿泰 2009-12-02
  • 打赏
  • 举报
回复
[Quote=引用 15 楼 asd_qingchengxue 的回复:]
不好意思泰哥,一个帖子问了两个问题,嘻嘻

之前我没解决那个问题,两个js我都替换了,可是还没好用。

麻烦泰哥发个图给我看看,打印导出时页面都变成中文是什么样的呀?


[/Quote]

改完后就是中文的。
我现在这台机器上没有,周末在家里的机器回给你的。

你的网站程序是在80端口下的吗(也就是根目录是c:\inetpub\wwwroot),如果不是的话,就要改对应端口目录下的文件的。
阿泰 2009-12-02
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 hetl_1985 的回复:]
可以参考一下
[/Quote]

hetl_1985,你这个代码,在哪个代码行或代码段上实现了改名字?
asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
不好意思泰哥,一个帖子问了两个问题,嘻嘻

之前我没解决那个问题,两个js我都替换了,可是还没好用。

麻烦泰哥发个图给我看看,打印导出时页面都变成中文是什么样的呀?

asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
好,我试试,泰哥,之前我发过一个帖子,是打印导出时页面英文的问题,您说您已经解决了,覆盖掉原来的语种文件strings_en.js文件, 可以给我发一个解决后的图吗?之前的问题链接:http://topic.csdn.net/u/20091125/20/e8ca1577-67f6-423e-9626-629f452dace5.html

谢谢泰哥。
cupwei 2009-12-02
  • 打赏
  • 举报
回复
楼上很强啊
悔说话的哑巴 2009-12-02
  • 打赏
  • 举报
回复
可以参考一下
悔说话的哑巴 2009-12-02
  • 打赏
  • 举报
回复

public partial class frmReportViewer : BaseForm
{

ReportDocument _rd;
string _connName = "MAIN";
string _rptTitle = "";

public frmReportViewer()
{
InitializeComponent();
}
public frmReportViewer(ReportDocument rd, GlobalService globalService, string systemCode, string functionCode)
{
InitializeComponent();
_rd = rd;
this.GlobalService = globalService;
SystemCode = systemCode;
FuncCode = functionCode;

}
public frmReportViewer(ReportDocument rd, GlobalService globalService, string systemCode, string functionCode, string strRptName)
{
InitializeComponent();
_rd = rd;
this.GlobalService = globalService;
SystemCode = systemCode;
FuncCode = functionCode;
_rptTitle = strRptName;


}


public override void BeforeFormLoad()
{
if (GlobalService.IsStandaloneMode)
{
StandAloneSettings.LoadStandaloneSettings(GlobalService);
GlobalService.InitStandaloneMode();

}
Text = _rptTitle;
}

private void frmReportViewer_Load(object sender, EventArgs e)
{
this.crvReportViewer.ReportSource = _rd;
SetButtonMode(MaintenanceMode.Report);
}

public override void Print()
{
this.crvReportViewer.PrintReport();
base.Print();
}

private void _ChangeFormMode(MaintenanceMode mode)
{
SetButtonMode(mode);


SetButton(LauncherToolStripAction.New, false);
SetButton(LauncherToolStripAction.Delete, false);
SetButton(LauncherToolStripAction.Copy, false);
SetButton(LauncherToolStripAction.Search, false);
SetButton(LauncherToolStripAction.Approve, false);
SetButton(LauncherToolStripAction.MoveFirst, false);
SetButton(LauncherToolStripAction.MovePrevious, false);
SetButton(LauncherToolStripAction.MoveNext, false);
SetButton(LauncherToolStripAction.MoveLast, false);
SetButton(LauncherToolStripAction.Edit, false);
SetButton(LauncherToolStripAction.Print, true);

}





private void frmReportViewer_Activated(object sender, EventArgs e)
{
SetButtonMode(MaintenanceMode.Report);
}

private void frmReportViewer_FormClosed(object sender, FormClosedEventArgs e)
{
_rd.Dispose();
}

private void crvReportViewer_Load_1(object sender, EventArgs e)
{

}



}
悔说话的哑巴 2009-12-02
  • 打赏
  • 举报
回复
可以修改的
阿泰 2009-12-02
  • 打赏
  • 举报
回复
导出为excel,直接让使用者选择路径保存。
拖个服务器端button,,双击后编写代码:
Response.Clear();
//注意此行,导出文件
Response.AppendHeader("Content-Disposition", "attachment;filename=MyReport.xls");
myReport.ExportToHttpResponse(ExportFormatType.Excel , Response, false, "");



myReport 怎么来的你应该知道的吧,呵呵


asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
自己写一个导出的方法吗?

那可以调到它导出的页面吗?让客户自己指定文件的存放位置?

或是调用到系统的那种导出,客户可以指定文件的存放位置。
asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 liherun 的回复:]
可以改不是汉字的名字,不知道哦可以不可以改成汉字的
[/Quote]

怎么改呀,说说呀。
阿泰 2009-12-02
  • 打赏
  • 举报
回复
用工具栏自带的导出按钮,是做不到的。
只能自己写代码却实现。
asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
我希望是可以的,大哥大姐们快来解决我的问题吧。

等着呢呦……
asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
哦,真的不行呀。吼吼,好伤心呀。

再等一会,确定不行就结贴了。
liherun 2009-12-02
  • 打赏
  • 举报
回复
可以改不是汉字的名字,不知道哦可以不可以改成汉字的
雷肿么了 2009-12-02
  • 打赏
  • 举报
回复
这个以前讨论过。。貌似不行。。
asd_qingchengxue 2009-12-02
  • 打赏
  • 举报
回复
泰哥,不要太忙啦。来看看我的问题呀,哈哈。
冰糖_adam 2009-12-02
  • 打赏
  • 举报
回复
学习

4,818

社区成员

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

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