Viewing all data in a Report

S

s.r.grace

I have a Search Form where when you enter an Entity Name, it'll show
you that Entity Name's detail. I have a Preview Report button, and as a
parameter, it passes the Entity Name. When the preview pops up, only 1
record is shown when 3 records exist, but you can go and see other
pages (they are blank and show no data). The report runs a select query
with the Entity Name as a parameter. When I run just the query, 3
records show up. Any suggestions on this?
 
K

Ken Sheridan

When you say " I have a Preview Report button, and as a parameter, it passes
the Entity Name" do you mean that the WhereCondition argument of the
OpenReport method is being used to filter the report? If so this would be
unnecessary as the parameter in the report's underlying query should already
be restricting the query, and hence the report. The parameter would be on
the Entity Name column and would reference the control on the form along
these lines:

Forms!frmSearch!txtEntityName

This doesn't really explain why the report is showing only one record,
however, as filtering the report and simultaneously restricting its query,
while inefficient, should still produce all matching records in the report.

If you are duplicating the means of restricting the report in this way
remove the use of WhereCondition setting from the code in the button's Click
event procedure and rely solely on the parameter in the query. If you still
get the same behaviour then examine the structure of the report. The only
explanations I can think of in that context would be that the controls bound
to the query's columns are in the report header, or the report is grouped on
Entity and the controls are in the group header and there are no bound
controls in the detail section. Either way only the first row returned by
the query would show in the report and if a new page is being forced after
the detail section this would explain the blank pages.

Ken Sheridan
Stafford, England
 
S

s.r.grace

It's now displaying 2 pages, but the 2nd page does not show the fields,
just the header.
 
K

Ken Sheridan

I'd suspect the report design Have you examined the possibilities I
suggested as regards this in my last post?
 
S

s.r.grace

I just decided to scrap the report design I was working with and just
create a new one.
 

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