将退出查询添加到报表 [英] Add exsiting query to report
问题描述
我的报告计算我商店中的墨水库存。我在VB.NET中创建了一个SQL语句并得到正确的结果。如何在Crystal报表中显示这些结果?
My report calculates the stock of inks in my stores. I built a SQL statement in VB.NET and got the correct results. How can I display these results in my Crystal Report? Or design a report such that same results will be retrieved?
我试图使用SQL Expression builder但失败了。
I tried to use SQL Expression builder but failed.
推荐答案
通常,您需要使用数据库专家将数据表与报表相关联。在Database Expert中执行相同操作,选择数据库,您可以看到添加命令。选择并单击> 按钮。你会得到一个窗口,写你的SQL查询,并按OK。
Usually you will link Data Tables to your report using Database Expert. Do the same in Database Expert, select the Database and you can see Add Command. Select that and click the > button. You will get a Window, write your SQL Query there and press OK.
完成此操作后,您可以在数据库字段中看到 Command ,其中包含您从SQL Query作为结果。
After finishing this you can see Command in Database Fields which contains all your records got from the SQL Query as result.
这篇关于将退出查询添加到报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!