1

平台:Windows 7 Professional Web 服务器:WAMP 2.1

我目前正在构建一个可以使用 php 生成报告的站点。我的 MS Access 中已经有报告,我想使用它来节省时间,而不是在其他报告工具中使用相同的报告再次创建。现在,我正在使用这段代码: shell_exec("\"C:\\Program Files (x86)\\Microsoft Office\\Office12\\msaccess.exe\" \"E:\\central\\projapps\\HSSE\\hsse.mdb\" /X \"HSSE TRAINING STATISTIC\"");

  1. 首次设置:

    • WAMP 服务器已关闭,
    • httpd.exe 作为控制台应用程序运行,一个黑色窗口(类似于 cmd 提示符)
    • 上面的代码将生成我的报告并在 MS Access 中查看
    • 但无法正常查看整个网站
  2. 第二个设置:

    • WAMP 服务器启动
    • httpd.exe 未作为控制台应用程序运行
    • 上面的代码不会生成我的报告
    • 整个网站将完美运行

在第二个设置中,将出现交互式服务检测。希望我能清楚地表达自己,因为我真的非常需要这个。提前致谢,你们今天过得愉快。

4

1 回答 1

0

You can't use Access in web development as a reporting tool unless you jump through a pile of hoops to get there. This is because Access is designed to be a desktop application for the most part. You could follow a "Not recommended" path with these steps.

  1. Create a sub or function that runs when the Access file is shelled that takes an argument to determine which report to run.
  2. Export the report to HTML
  3. Point to this HTML file from your website.

Most likely it won't be worth the effort to go this route. I think it would be best to just rewrite the reports in a web reporting tool.

于 2012-10-31T18:35:34.197 回答