在报告中执行存储过程 [英] Execute stored procedure in report

查看:129
本文介绍了在报告中执行存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的存储过程和表捕获了有关运行哪些报告,由谁以及何时运行的报告的详细信息。在Crystal Reports开发人员环境中,这可以正常工作。存储过程将运行并捕获详细信息。

My stored procedure and table capture details about which reports are run, by who, and at what time. This works fine in the Crystal Reports developer environment; The sproc gets run and details are captured.

当部署到Business Objects时,存储过程中的insert语句永远不会触发。它们肯定在报告中,但不要在日志记录表中创建任何条目。我该如何解决呢?

When deployed to Business Objects the insert statements inside my stored procedure don't never fire off. They are definitely in the report, but don't create any entries in the logging table. How can I resolve this?

几乎就像Crystal Reports将SQL从存储过程中刮掉,忽略插入语句,然后运行查询而不是实际运行

It's almost like Crystal Reports "scrapes" the SQL out of the stored procedure, ignores insert statements, and runs a query rather than actually running the sproc.

我不想使用带有业务对象的审计功能,那么如何使它起作用呢?

I do not want to use auditing that comes w/ business objects, so how can I get this working instead?

推荐答案

您可以获得您在应用中提到的详细信息,您无需仅将db expert用于此信息,例如:在您的应用程序中

you can get the details that you mentioned in the aplication, you don't need to use the db expert just for this info, e.g: In your app

Dim p As New Report
p.ReportName = getReportName()
p.User = getUser()
p.Date = getDate() or "DateTime.Now"
p.show()

在您的报告中:

Public ReportName As String
Public User As String
Public Date As String

"object".SetParameterValue("Parameter Field Name 1", ReportName)
"object".SetParameterValue("Parameter Field Name 2", User)
"object".SetParameterValue("Parameter Field Name 3", Date)

顺便说一句,您可以将这些数据与proc添加到应用程序而不是报告中。

And btw, you can add these data with your proc in your app and not in the report.

这篇关于在报告中执行存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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