Empty Report

G

Guest

I have created a report based on a query. I know that I have several records
in my query (8 total), and none of these records are showing up in my report.
The record source for my report is set to the proper query. I am getting
all of the right headings, just no data. Any tips. This seems like a pretty
simple problem.
 
A

Allen Browne

How are you opening the report?
Directly from the Database window?
Or by code/macro that might apply a filter/WhereCondition?

Is there any code in the report's events?

Access might be misunderstanding some field types, as discussed here:
http://allenbrowne.com/ser-45.html


Open the query, and switch to SQL View (View menu.)
Post the SQL statement.
 
G

Guest

No code behind the report. Here is my SQL statement

SELECT [3 Way Collar Quotes].TimeStamp, [3 Way Collar Quotes].[Calendar
Year], [3 Way Collar Quotes].Counterparty, [3 Way Collar Quotes].Underlying,
[3 Way Collar Quotes].[Call Strike], [3 Way Collar Quotes].Done, [3 Way
Collar Quotes].[Amount Done], [3 Way Collar Quotes].Trader,
Commodities.Commodity
FROM Commodities INNER JOIN [3 Way Collar Quotes] ON Commodities.[Commodity
Code]=[3 Way Collar Quotes].[Commodity Code];
 
A

Allen Browne

That's a simple query. No criteria at all.

TimeStamp is a reserved word.
Not sure if that will mess it up.

Presumably [Commodity Code] is the same field type and size in both tables,
and you have declared a relationship with Referential Integrity (Tools |
Relationships.)

You see 8 records when you open the query directly.
But no records when you open the report itself?
Are you opening it directly from the Database window, or via a button?

With the report open (in Preview), press Ctrl+G to open the Immediate
Window, and enter:
? Reports![NameOfYourReportHere].FilterOn
? Reports![NameOfYourReportHere].Filter
? Reports![NameOfYourReportHere].RecordSource
It would be interesting to know if the filter is on, and if so what it is.
(Even though Access cannot be trusted to maintain the FilterOn property
correctly for reports, so this might not prove anything.)

Always worth trying a compact/repair under:
Tools | Database Utilities

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

SPeterson said:
No code behind the report. Here is my SQL statement

SELECT [3 Way Collar Quotes].TimeStamp,
[3 Way Collar Quotes].[Calendar Year],
[3 Way Collar Quotes].Counterparty,
[3 Way Collar Quotes].Underlying,
[3 Way Collar Quotes].[Call Strike],
[3 Way Collar Quotes].Done,
[3 Way Collar Quotes].[Amount Done],
[3 Way Collar Quotes].Trader,
Commodities.Commodity
FROM Commodities INNER JOIN [3 Way Collar Quotes]
How are you opening the report?
Directly from the Database window?
Or by code/macro that might apply a filter/WhereCondition?

Is there any code in the report's events?

Access might be misunderstanding some field types, as discussed here:
http://allenbrowne.com/ser-45.html


Open the query, and switch to SQL View (View menu.)
Post the SQL statement.
 
G

Guest

I don't think the time stamp is throwing it off, because that field is used
in one of my section headers and it works fine.

Commodity Code is the same field type and size in both tables and there is a
relationship there.

I am opening the report directly from the database window, and the report is
showing everything correctly, but just no items in the detail section where
the data should go.

I tried entering that information into the Immediate Window and no result,
same problem. No filter.

Compact/Repair didn't help either.

This is so confusing, no idea why this is not working. Thanks for you help.

Allen Browne said:
That's a simple query. No criteria at all.

TimeStamp is a reserved word.
Not sure if that will mess it up.

Presumably [Commodity Code] is the same field type and size in both tables,
and you have declared a relationship with Referential Integrity (Tools |
Relationships.)

You see 8 records when you open the query directly.
But no records when you open the report itself?
Are you opening it directly from the Database window, or via a button?

With the report open (in Preview), press Ctrl+G to open the Immediate
Window, and enter:
? Reports![NameOfYourReportHere].FilterOn
? Reports![NameOfYourReportHere].Filter
? Reports![NameOfYourReportHere].RecordSource
It would be interesting to know if the filter is on, and if so what it is.
(Even though Access cannot be trusted to maintain the FilterOn property
correctly for reports, so this might not prove anything.)

Always worth trying a compact/repair under:
Tools | Database Utilities

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

SPeterson said:
No code behind the report. Here is my SQL statement

SELECT [3 Way Collar Quotes].TimeStamp,
[3 Way Collar Quotes].[Calendar Year],
[3 Way Collar Quotes].Counterparty,
[3 Way Collar Quotes].Underlying,
[3 Way Collar Quotes].[Call Strike],
[3 Way Collar Quotes].Done,
[3 Way Collar Quotes].[Amount Done],
[3 Way Collar Quotes].Trader,
Commodities.Commodity
FROM Commodities INNER JOIN [3 Way Collar Quotes]
How are you opening the report?
Directly from the Database window?
Or by code/macro that might apply a filter/WhereCondition?

Is there any code in the report's events?

Access might be misunderstanding some field types, as discussed here:
http://allenbrowne.com/ser-45.html


Open the query, and switch to SQL View (View menu.)
Post the SQL statement.

I have created a report based on a query. I know that I have several
records
in my query (8 total), and none of these records are showing up in my
report.
The record source for my report is set to the proper query. I am
getting
all of the right headings, just no data. Any tips. This seems like a
pretty
simple problem.
 
G

Guest

Just figured it out. I was using the wizard and I chose to view the data by
Commodities, which is the table with no information, I think I just thought
that was a grouping option. I knew it was something simple.

Allen Browne said:
That's a simple query. No criteria at all.

TimeStamp is a reserved word.
Not sure if that will mess it up.

Presumably [Commodity Code] is the same field type and size in both tables,
and you have declared a relationship with Referential Integrity (Tools |
Relationships.)

You see 8 records when you open the query directly.
But no records when you open the report itself?
Are you opening it directly from the Database window, or via a button?

With the report open (in Preview), press Ctrl+G to open the Immediate
Window, and enter:
? Reports![NameOfYourReportHere].FilterOn
? Reports![NameOfYourReportHere].Filter
? Reports![NameOfYourReportHere].RecordSource
It would be interesting to know if the filter is on, and if so what it is.
(Even though Access cannot be trusted to maintain the FilterOn property
correctly for reports, so this might not prove anything.)

Always worth trying a compact/repair under:
Tools | Database Utilities

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

SPeterson said:
No code behind the report. Here is my SQL statement

SELECT [3 Way Collar Quotes].TimeStamp,
[3 Way Collar Quotes].[Calendar Year],
[3 Way Collar Quotes].Counterparty,
[3 Way Collar Quotes].Underlying,
[3 Way Collar Quotes].[Call Strike],
[3 Way Collar Quotes].Done,
[3 Way Collar Quotes].[Amount Done],
[3 Way Collar Quotes].Trader,
Commodities.Commodity
FROM Commodities INNER JOIN [3 Way Collar Quotes]
How are you opening the report?
Directly from the Database window?
Or by code/macro that might apply a filter/WhereCondition?

Is there any code in the report's events?

Access might be misunderstanding some field types, as discussed here:
http://allenbrowne.com/ser-45.html


Open the query, and switch to SQL View (View menu.)
Post the SQL statement.

I have created a report based on a query. I know that I have several
records
in my query (8 total), and none of these records are showing up in my
report.
The record source for my report is set to the proper query. I am
getting
all of the right headings, just no data. Any tips. This seems like a
pretty
simple problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top