来自外部数据库的OpenReport [英] OpenReport from an External Database

查看:46
本文介绍了来自外部数据库的OpenReport的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我创建了一个名为MainDatabase的数据库(基于多个查询的多个报告)并将该数据库保存在服务器上。现在我创建了另一个名为NewDatabase的数据库,并创建了一个表单,使用连接将值插入到MainDatabase中,如下所示:

Dim ExtDB as Database

Dim strPath as String


strPath =" \\server\MinDatabase.mdb"


设置ExtDB = DBEngine.Workspac(0) .OpenDatabase(strPath)


(如果上面的代码中有任何拼写错误,我会道歉)


此代码在我更新时正常工作使用Recordset的值。但是我无法理解如何在NewDatabase中打开MainDatabase的报告。是否有任何程序或代码可以使用我可以打开/查看报告。


请注意服务器位于本地网络。请求尽快回复。


感谢你。



问候


穆罕默德费萨尔

Hi Everyone,

I made a database named MainDatabase (with several reports based on several queries) and kept that database on the server. now i made another database named NewDatabase and made a form to insert values into MainDatabase using connection, which is explained below:

Dim ExtDB as Database
Dim strPath as String

strPath = "\\server\MinDatabase.mdb"

Set ExtDB = DBEngine.Workspac(0).OpenDatabase(strPath)

(i appologize if there is any spelling mistake in the code above)

This code is working when i updating values using Recordset. But i failed to understand how i can open the report of MainDatabase in my NewDatabase.Is there any procedure or code by using which i can open/view the report.

Please note that Server is located on local network.An expeditous reply is requested.

Thanking you.


Regards

Mohammad Faisal

推荐答案


大家好,


我创建了一个名为MainDatabase的数据库(包含多个报告)基于几个查询)并将该数据库保存在服务器上。现在我创建了另一个名为NewDatabase的数据库,并创建了一个表单,使用连接将值插入到MainDatabase中,如下所示:

Dim ExtDB as Database

Dim strPath as String


strPath =" \\server\MinDatabase.mdb"


设置ExtDB = DBEngine.Workspac(0) .OpenDatabase(strPath)


(如果上面的代码中有任何拼写错误,我会道歉)


此代码在我更新时正常工作使用Recordset的值。但是我无法理解如何在NewDatabase中打开MainDatabase的报告。是否有任何程序或代码可以使用我可以打开/查看报告。


请注意服务器位于本地网络。请求尽快回复。


感谢你。



问候


Mohammad Faisal
Hi Everyone,

I made a database named MainDatabase (with several reports based on several queries) and kept that database on the server. now i made another database named NewDatabase and made a form to insert values into MainDatabase using connection, which is explained below:

Dim ExtDB as Database
Dim strPath as String

strPath = "\\server\MinDatabase.mdb"

Set ExtDB = DBEngine.Workspac(0).OpenDatabase(strPath)

(i appologize if there is any spelling mistake in the code above)

This code is working when i updating values using Recordset. But i failed to understand how i can open the report of MainDatabase in my NewDatabase.Is there any procedure or code by using which i can open/view the report.

Please note that Server is located on local network.An expeditous reply is requested.

Thanking you.


Regards

Mohammad Faisal



您可以使用一点自动化。

You can use a little Automation.

  1. 声明模块级变量
  1. Declare a Module Level Variable
展开 | 选择 | Wrap | 行号


感谢您的回复。这个例子真的可以帮助我了解连接外部数据库的新方法。


你给我的代码工作得很好。但有一件事我想消除,我只想查看报告。此代码使用户能够打开数据库的每个对象。我只是打开一份特定的报告。


如何实现这一目标?


感谢你。


问候。


Mohammad Faisal
Thank you for your great reply. This example would really help me to know new ways to connect external databases.

The code you gave me is working nicely. But there is one thing which i wana eliminate that is i want to view the report only. This code is enabling the user to open each n every object of the database. I just wana open a particular report.

How i can achieve this?

Thanking you.

regards.

Mohammad Faisal



谢谢你的回复。这个例子真的可以帮助我了解连接外部数据库的新方法。


你给我的代码工作得很好。但有一件事我想消除,我只想查看报告。此代码使用户能够打开数据库的每个对象。我只是打开一份特定的报告。


如何实现这一目标?


感谢你。


问候。


Mohammad Faisal
Thank you for your great reply. This example would really help me to know new ways to connect external databases.

The code you gave me is working nicely. But there is one thing which i wana eliminate that is i want to view the report only. This code is enabling the user to open each n every object of the database. I just wana open a particular report.

How i can achieve this?

Thanking you.

regards.

Mohammad Faisal



在这里你可能会遇到严重的问题问题。为什么不简单地更改1个参数

并打印报告而不是查看它,如:

Here you may run into serious problems. Why not simply change 1 Argument
and Print the Report instead of viewing it, as in:

展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


这篇关于来自外部数据库的OpenReport的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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