分析Crystal Reports的最佳方法是什么?

时间:2021-12-12 22:46:12

If you have two versions of the same report (.rpt) and you want to establish what the exact differences are, what is the best way to go about this? I've seen some commercial tools to do this, but I'm not too interested in forking out cash for something that should be relatively straight forward. Can I hook into the Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... @:-)

如果您有相同报告的两个版本(.rpt),并且您想确定具体的差异,那么最好的方法是什么?我已经看到了一些商业工具来做到这一点,但我并不太愿意花钱买一些应该相对直接的东西。我可以挂钩到Crystal API并简单列出每个字段的所有属性吗?请有人告诉我,某个地方有一个开源项目可以做到这一点...... @ :-)

@Kogus, wouldn't diffing the outputs as text hide any formatting differences?

@Kogus,不会将输出区分为文本隐藏任何格式差异?

@ladoucep, I don't seem to be able to export the report without data.

@ladoucep,我似乎无法在没有数据的情况下导出报告。

3 个解决方案

#1


8  

Can I hook into the Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... @:-)

我可以挂钩到Crystal API并简单列出每个字段的所有属性吗?请有人告诉我,某个地方有一个开源项目可以做到这一点...... @ :-)

There is in fact, such an API. I wrote a VB6 application to do just what you asked and more. I think I even migrated it to VB.Net. As it was for my own use, I didn't spend much time making it 'polished'. I've been intending to release it, but I haven't had the time...

事实上,这样的API。我写了一个VB6应用程序来完成你所要求的内容以及更多内容。我想我甚至将它迁移到VB.Net。由于它是我自己使用的,我没有花太多时间使它“抛光”。我一直打算发布它,但我没有时间......

Another approach that I've used in the past is to create an Access application to help manage large, report-development projects. One of it's many features includes the ability to extract the tables that are used by the report, and the SQL statements used by its Commands and SQL Expressions. It's intent is to give one a global perspective of which reports use which tables. I probably still have it somewhere...

我过去使用的另一种方法是创建一个Access应用程序来帮助管理大型的报表开发项目。其中一个功能包括提取报表使用的表以及其命令和SQL表达式使用的SQL语句。其目的是为一个人提供一个全局视角,了解哪些报告使用哪些表。我可能还有它...

** edit 1 **

**编辑1 **

BusinessObjects Enterprise XI (R?) has a feature named 'Meta Manager'. It will periodically examine the contents of the Repository and save the results to a database. It uses the Report-Application Service (RAS) to generate the meta data. It's an additional, 5-figure license, of course.

BusinessObjects Enterprise XI(R?)具有名为“Meta Manager”的功能。它将定期检查存储库的内容并将结果保存到数据库中。它使用Report-Application Service(RAS)生成元数据。当然,这是一个额外的5位数的许可证。

** edit 2 **

**编辑2 **

Consider using PowerShell to do the work: PsCrystal.

考虑使用PowerShell来完成工作:PsCrystal。

#2


1  

One helpful technique is to output both versions of the report to plain text, then diff those outputs.

一种有用的技术是将报告的两个版本输出到纯文本,然后区分这些输出。

You could write something using the crystal report component to describe every property of the report, like you described. Then you could output that to text, and diff those. I'm not aware of any open source tool that does it for you, but it would not be terribly hard to write it.

您可以使用crystal report组件编写一些内容来描述报告的每个属性,就像您描述的那样。然后你可以将它输出到文本,然后区分它们。我不知道有任何开源工具为你做这件事,但编写它并不是非常难。

@question in the post: Diffing the outputs would only show formatting changes if the relative positions had changed. For example, if i had this:

帖子中的@question:如果相对位置发生了变化,则输出的差异只会显示格式更改。例如,如果我有这个:

before: First name, last name, addresss

之前:名字,姓氏,地址

after: Last Name, First Name, Address

之后:姓氏,名字,地址

Then that would show up as a difference.

然后,这将显示为差异。

But if I had just bumped the address column over a few pixels, or changed it from plain text to bold, then you are right, that would not show up.

但是,如果我刚刚将地址列碰到几个像素,或者将其从纯文本更改为粗体,那么你是对的,那就不会出现了。

#3


1  

One technique I have used to great effect in the past is to print out reports from both versions based on the same data. I then take the first page from each version, lay one on top of the other (it is important not to mix them up) and hold them up to a window. It is generally quite easy to see any differences, and these differences can be manually annotated with a suitable writing instrument such as a pencil. Repeat for each page in the report.

我过去常用的一种技术是根据相同的数据打印出两个版本的报告。然后我从每个版本中取出第一页,将一个放在另一个上面(重要的是不要将它们混合起来)并将它们保持在一个窗口。通常很容易看出任何差异,这些差异可以用合适的书写工具如铅笔手动注释。对报告中的每个页面重复此操作。

Admittedly, for large reports this can be quite time consuming and error prone, but these limitataions can be overcome with patience and care.

不可否认,对于大型报告而言,这可能非常耗时且容易出错,但这些限制可以通过耐心和谨慎来克服。

#1


8  

Can I hook into the Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... @:-)

我可以挂钩到Crystal API并简单列出每个字段的所有属性吗?请有人告诉我,某个地方有一个开源项目可以做到这一点...... @ :-)

There is in fact, such an API. I wrote a VB6 application to do just what you asked and more. I think I even migrated it to VB.Net. As it was for my own use, I didn't spend much time making it 'polished'. I've been intending to release it, but I haven't had the time...

事实上,这样的API。我写了一个VB6应用程序来完成你所要求的内容以及更多内容。我想我甚至将它迁移到VB.Net。由于它是我自己使用的,我没有花太多时间使它“抛光”。我一直打算发布它,但我没有时间......

Another approach that I've used in the past is to create an Access application to help manage large, report-development projects. One of it's many features includes the ability to extract the tables that are used by the report, and the SQL statements used by its Commands and SQL Expressions. It's intent is to give one a global perspective of which reports use which tables. I probably still have it somewhere...

我过去使用的另一种方法是创建一个Access应用程序来帮助管理大型的报表开发项目。其中一个功能包括提取报表使用的表以及其命令和SQL表达式使用的SQL语句。其目的是为一个人提供一个全局视角,了解哪些报告使用哪些表。我可能还有它...

** edit 1 **

**编辑1 **

BusinessObjects Enterprise XI (R?) has a feature named 'Meta Manager'. It will periodically examine the contents of the Repository and save the results to a database. It uses the Report-Application Service (RAS) to generate the meta data. It's an additional, 5-figure license, of course.

BusinessObjects Enterprise XI(R?)具有名为“Meta Manager”的功能。它将定期检查存储库的内容并将结果保存到数据库中。它使用Report-Application Service(RAS)生成元数据。当然,这是一个额外的5位数的许可证。

** edit 2 **

**编辑2 **

Consider using PowerShell to do the work: PsCrystal.

考虑使用PowerShell来完成工作:PsCrystal。

#2


1  

One helpful technique is to output both versions of the report to plain text, then diff those outputs.

一种有用的技术是将报告的两个版本输出到纯文本,然后区分这些输出。

You could write something using the crystal report component to describe every property of the report, like you described. Then you could output that to text, and diff those. I'm not aware of any open source tool that does it for you, but it would not be terribly hard to write it.

您可以使用crystal report组件编写一些内容来描述报告的每个属性,就像您描述的那样。然后你可以将它输出到文本,然后区分它们。我不知道有任何开源工具为你做这件事,但编写它并不是非常难。

@question in the post: Diffing the outputs would only show formatting changes if the relative positions had changed. For example, if i had this:

帖子中的@question:如果相对位置发生了变化,则输出的差异只会显示格式更改。例如,如果我有这个:

before: First name, last name, addresss

之前:名字,姓氏,地址

after: Last Name, First Name, Address

之后:姓氏,名字,地址

Then that would show up as a difference.

然后,这将显示为差异。

But if I had just bumped the address column over a few pixels, or changed it from plain text to bold, then you are right, that would not show up.

但是,如果我刚刚将地址列碰到几个像素,或者将其从纯文本更改为粗体,那么你是对的,那就不会出现了。

#3


1  

One technique I have used to great effect in the past is to print out reports from both versions based on the same data. I then take the first page from each version, lay one on top of the other (it is important not to mix them up) and hold them up to a window. It is generally quite easy to see any differences, and these differences can be manually annotated with a suitable writing instrument such as a pencil. Repeat for each page in the report.

我过去常用的一种技术是根据相同的数据打印出两个版本的报告。然后我从每个版本中取出第一页,将一个放在另一个上面(重要的是不要将它们混合起来)并将它们保持在一个窗口。通常很容易看出任何差异,这些差异可以用合适的书写工具如铅笔手动注释。对报告中的每个页面重复此操作。

Admittedly, for large reports this can be quite time consuming and error prone, but these limitataions can be overcome with patience and care.

不可否认,对于大型报告而言,这可能非常耗时且容易出错,但这些限制可以通过耐心和谨慎来克服。