解决CR格式错误 [英] Resolving a CR Formatting Bug

查看:120
本文介绍了解决CR格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#(VS2003),ASP.net和Crystal Reports构建了一个简单但有效的报表引擎。向用户呈现报告列表,一个月和一个月。年份可供选择,然后只需点击提交即可。当他/她执行此代码时:

I've built a simple, but effective reporting engine using C# (VS2003), ASP.net, and Crystal Reports.  The user is presented with a list of reports, a month & year to choose from and then just has to hit Submit.  When s/he does this the code:

  1. 从服务器上的特殊文件夹加载报告定义
  2. 将参数传递给它
  3. 生成报告,以PDF格式创建
  4. 在浏览器窗口中显示生成的PDF文件

但是它存在一个问题。创建报表定义后,我使用SQL Server中的Views来获取布局报表所需的字段。但是在运行报表之前,我将数据源更改为从存储过程生成的DataSet:

report.Database.Tables [tblNum] .SetDataSource(dataTable);

但是,完成此操作后,报告的格式将变得混乱。对齐更改。货币符号消失。等等。我已经得出结论,这必定是Crystal Reports的一个错误。问题是,如何解决?

有没有人遇到类似的东西并有可能的解决方案?

真诚,

Robert W.
迈阿密,佛罗里达

But there's one problem with it.  When the report definitions were created, I used Views from SQL Server in order to get the fields necessary to layout the report.  But just before the report is run, I change the data source over to a DataSet that's generated from a stored procedure:

     report.Database.Tables[tblNum].SetDataSource(dataTable);

However, when this is done, the formatting of the report is thrown into disarray.  Alignment changes.  Currency symbols disappear.  Etc.

I've concluded that this must be a bug with Crystal Reports.  The question is, how to resolve it? 

Has anyone encountered something similar and has a possible solution?

Sincerely,

Robert W.
Miami, FL

推荐答案

嗨罗伯特,

为你的帖子添加评论有点晚... jejeje ..
我发现了类似的问题,但是,没有在尝试更改数据源时。我在Web表单中引入一个新元素时遇到了问题..对齐方式发生变化,所有格式都丢失了......真烦人..到目前为止,我找到的唯一解决方法是再次设计webform从头开始,导致删除查看器并添加新的查看器,将无法解决问题。

jp
Hi Robert,

a bit late to add comments on your post...jejeje..
well i found a similar problem, however, not while trying to change the data source. I faced
the problem while introducing a new element in my web form..  the alignment changes and all
the format is lost..  really annoying.. so far, the only workaround i found is to design the webform again from scratch, cause deleting the viewer and adding a new one, won´t solve the problem.

jp


这篇关于解决CR格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆