在报告中使用查询 [英] Use queries in reports

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

问题描述

您可以在报告中使用查询吗?我正在尝试在报表的文本框中输入SQL语句,但如果我使用等号执行此操作,则会出现语法错误。如果我在没有等号的情况下这样做,我会得到一个无效的控制源。


如果可能的话,我哪里出错?


这是我的SQL语句:

Can you use queries in reports? I''m trying to enter a SQL statement in a text box on a report, but if I do it with an equal sign I get a syntax error. If I do it without an equal sign I get an invalid control source.

If this is possible, where am I going wrong?

Here''s my SQL statement:

展开 | 选择 | Wrap | 行号

推荐答案


您可以在报告中使用查询吗?我正在尝试在报表的文本框中输入SQL语句,但如果我使用等号执行此操作,则会出现语法错误。如果我在没有等号的情况下这样做,我会得到一个无效的控制源。


如果可能的话,我哪里出错?


这是我的SQL语句:
Can you use queries in reports? I''m trying to enter a SQL statement in a text box on a report, but if I do it with an equal sign I get a syntax error. If I do it without an equal sign I get an invalid control source.

If this is possible, where am I going wrong?

Here''s my SQL statement:
展开 | 选择 | Wrap | 行号


您不需要查询。您还可以在基础表上使用DCount()获得类似的结果(当然,假设计数很简单)。
You won''t need the query though. You can also use DCount() on the underlying table for similar results (assuming of course that the counting is as simple as it would appear).


我在报告中尝试了DLookup,但是它没有返回一个值。它甚至没有返回错误。我输入完全如图所示,检查了表格和列的名称,它又回来了。


任何想法我做错了什么?这是否与报告有关?
I tried the DLookup in the report, but it''s not returning a value. It''s not even returning an error. I typed it in exactly as shown, checked the names of the tables and columns, and it is coming back blank.

Any ideas what I''m doing wrong? Does it make a difference that it''s on a report?


这篇关于在报告中使用查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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