I have got this report which I've designed with a query(having 60+ controls) as its record source. Its a one page report. The problem that I'm facing is that whenever I preview it, I get one extra page with all the controls on the main page(of course with the exception of the report header controls).
I get this result whenever I supply it with the query parameters and when I don't, I get the desired result, but with no data of course. I've been searching on the web for hours with no avail.
Anybody out there with the idea of what am I missing? My gratitude in advance.
11 1220 twinnyfo 3,653
Recognized Expert Moderator Specialist
Are you by chance forcing a page feed after the report footer or detail section of your report? Is the record source one record or multiple records? Doese the report print the same way or does htis happen just in preview mode? Is this preview in "Print Preview" mode or "Report View"? All these factors may affect how your report appears.
Please provide additional information.
No I'm not forcing the page feed after the report footer nor detail section. The record source is the single query that retrieve multiple records based on a single entity(student): the report is a student report card on his/her academic performance which include personal details and scores from three different types of tests on 15 subjects each. It also include 3 unbound textboxes for comments from the teacher and the parent. The report print the same way in both the Report View and Print Preview.
First I thought the problem may be related to report width but I've worked on it with no positive result.
Hope I have provided the additional information you were asking for.
twinnyfo 3,653
Recognized Expert Moderator Specialist
Could you send a screen shot of your result? Very strange that you should show the controls but no data. Thanks for your patience.
Here it is:
1.Desired
2.Unwanted extra
3.With no data twinnyfo 3,653
Recognized Expert Moderator Specialist
MfanyaKitu,
In post #3 above, you say, "The record source is the single query that retrieve multiple records based on a single entity". If there are multiple records being pulled, then the report will (should) produce a page for each record. Each report card (for each student) should be one page, and hence one record, correct?
What might be helpful to me would be to see: - Your Query
- The results your query pulls on one student
Another question: Is it possible to produce a report that includes all students? If so, does the report print two pages for each student or one page with an included blank page at the end? This also might help us trouble shoot your problem.
Hope we can find a solution for this!
Correct, each report card (for each student) should be one page, and hence one record; that's what I wanted to mean. Hence to edit my post #3 on that respect; the report is supposed to be a single page(report card) for a single student, and not many pages for many students.
1.My query
Record source -
SELECT StudentByAcademicsQR1.*,
-
AcademicInfos.monthlyCivics,
-
AcademicInfos.monthlyBiology, AcademicInfos.monthlyMathematics, AcademicInfos.monthlyEnglish,
-
AcademicInfos.monthlyKiswahili, AcademicInfos.monthlyAccounting, AcademicInfos.monthlyGeography,
-
AcademicInfos.monthlyHistory,
-
AcademicInfos.monthlyPhysics,
-
AcademicInfos.monthlyChemistry,
-
AcademicInfos.monthlyDivinity,
-
AcademicInfos.monthlyCommerce,
-
AcademicInfos.[monthlyBook-keeping], AcademicInfos.monthlyAgriculture, AcademicInfos.monthlyComputer,
-
AcademicInfos.midtermCivics,
-
AcademicInfos.midtermBiology, AcademicInfos.midtermMathematics, AcademicInfos.midtermEnglish,
-
AcademicInfos.midtermKiswahili, AcademicInfos.midtermAccounting, AcademicInfos.midtermGeography,
-
AcademicInfos.midtermHistory,
-
AcademicInfos.midtermPhysics,
-
AcademicInfos.midtermChemistry,
-
AcademicInfos.midtermDivinity,
-
AcademicInfos.midtermCommerce,
-
AcademicInfos.[midtermBook-keeping], AcademicInfos.midtermAgriculture, AcademicInfos.midtermComputer,
-
AcademicInfos.terminalCivics,
-
AcademicInfos.terminalBiology, AcademicInfos.terminalMathematics, AcademicInfos.terminalEnglish, AcademicInfos.terminalKiswahili, AcademicInfos.terminalAccounting, AcademicInfos.terminalGeography, AcademicInfos.terminalHistory,
-
AcademicInfos.terminalPhysics, AcademicInfos.terminalChemistry, AcademicInfos.terminalDivinity, AcademicInfos.terminalCommerce,
-
AcademicInfos.[terminalBook-keeping], AcademicInfos.terminalAgriculture, AcademicInfos.terminalComputer
-
FROM AcademicInfos, StudentByAcademicsQR1;
-
-
Query StudentByAcademicsQR1 -
SELECT Students.StudentID,
-
Students.Firstname,
-
Students.Middlename,
-
Students.Lastname,
-
[Firstname]+" "+[Lastname] AS StudentName,
-
Students.Sex,
-
Students.Class,
-
AcademicInfos.AcademicYear,
-
AcademicInfos.Term,
-
([monthlyCivics]+[midtermCivics]+[terminalCivics])/3 AS Civics,
-
([monthlyBiology]+[midtermBiology]+[terminalBiology])/3 AS Biology,
-
([monthlyMathematics]+[midtermMathematics]+[terminalMathematics])/3 AS Maths,
-
([monthlyEnglish]+[midtermEnglish]+[terminalEnglish])/3 AS English,
-
([monthlyKiswahili]+[midtermKiswahili]+[terminalKiswahili])/3 AS Kiswahili,
-
([monthlyAccounting]+[midtermAccounting]+[terminalAccounting])/3 AS Accounting,
-
([monthlyGeography]+[midtermGeography]+[terminalGeography])/3 AS Geography,
-
([monthlyHistory]+[midtermHistory]+[terminalHistory])/3 AS History,
-
([monthlyPhysics]+[midtermPhysics]+[terminalPhysics])/3 AS Physics,
-
([monthlyChemistry]+[midtermChemistry]+[terminalChemistry])/3 AS Chemistry,
-
([monthlyDivinity]+[midtermDivinity]+[terminalDivinity])/3 AS Divinity,
-
([monthlyCommerce]+[midtermCommerce]+[terminalCommerce])/3 AS Commerce,
-
([monthlyBook-keeping]+[midtermBook-keeping]+[terminalBook-keeping])/3 AS [Book-keeping],
-
([monthlyAgriculture]+[midtermAgriculture]+[terminalAgriculture])/3 AS Agriculture,
-
([monthlyComputer]+[midtermComputer]+[terminalComputer])/3 AS Computer,
-
([Civics]+[Biology]+[Maths]+[English]+[Kiswahili]+[Accounting]+[Geography]+[History]+[Physics]+[Chemistry]+[Divinity]+[Commerce]+[Book-keeping]+[Agriculture]+[Computer])/15 AS Average
-
FROM Students INNER JOIN AcademicInfos ON Students.StudentID = AcademicInfos.StudentName
-
WHERE (((Students.StudentID)=[Type STUDENT ID]) AND ((Students.Class)=[Type CLASS]) AND ((AcademicInfos.AcademicYear)=[Type Academic Year]) AND ((AcademicInfos.Term)=[Which TERM are you looking for?]));
-
-
2. The screen shot is indeed the result for one student.
On your last question:
I have report that includes all students but I've limit it to show certain records since it is in list format, so I don't think if it will help us here; by the way it doesn't produce a blank page at the end.
twinnyfo 3,653
Recognized Expert Moderator Specialist
In your StudentByAcademicsQR1 query, why not do it this way: - SELECT Students.*, AcademicInfos.*,
-
[Firstname]+" "+[Lastname] AS StudentName,
-
([monthlyCivics]+[midtermCivics]+[terminalCivics])/3 AS Civics,
-
...
-
FROM Students INNER JOIN AcademicInfos ON Students.StudentID = AcademicInfos.StudentName
-
WHERE (((Students.StudentID)=[Type STUDENT ID]) AND ((Students.Class)=[Type CLASS]) AND ((AcademicInfos.AcademicYear)=[Type Academic Year]) AND ((AcademicInfos.Term)=[Which TERM are you looking for?]));
This should gather all your necessary information, making the other Record Source query unnecessary. I htink one of the problems with the Record Source Query is that the Table and Query are not joined in any way. This may be producing the undesired results.
Let me know how this affects your end result....
Ok, thanks. I will work on it and let you know.
Thank you so much twinnyfo, it has worked at last. As you thought the problem was that Table and Query were not joined in any way, and by applying your proposed solution the desired result were obtained.
Thanks once again.
twinnyfo 3,653
Recognized Expert Moderator Specialist
I'm so glad I could help! Now, since it's getting late for you, please get some rest and enjoy your family!
zmbd 5,501
Recognized Expert Moderator Expert
MfanyaKitu
Thank you so much twinnyfo, it has worked at last. As you thought the problem was that Table and Query were not joined in any way, and by applying your proposed solution the desired result were obtained.
Thanks once again.
So as not to mis-lead other new members: Table and Query were not joined in any way
This is not the most correct statement:
You cannot have a query without a table at some point.
All Queries are always joined to a table
(where joined means "to be associated with")
at some point because, the query is, in simplest terms, a filter against the data stored in the table (or multiple tables). If you will, it is a special programming language that tells the database program to go to a data source, and display only those fields from specific records that match the filter requirements.
Now as Twinnyfo has done in post#8 Queries can also have "joins" between other queries and amongst other underlying tables; however, it must be made clear that these types of "joins" are "filtering" in nature... that is to say that these "joins" return data from the multiple record sources based upon mutually agreeing data within the records between the sources.
These "joins" do not associate a query to the table or other record source, the query is just a display of data from the table(s)
There is another form of joining... that is a join between tables in a normalized rational database...
MfanyaKitu, which,
After reviewing the SQL scripts posted in Post#7 I have the impression that your database is in need of normalization as described in > Database Normalization and Table Structures. Sign in to post your reply or Sign up for a free account.
Similar topics |
by: lupo666 |
last post by:
Hi everybody, this time I have three problems driving me nuts :-(((
(1)
I have a report with 20 or so Yes/No "squares". Is there a way to
either hide/show the "square" or change the yes/no...
|
by: Suzanne801 |
last post by:
Hi,
I am new to VB and trying to get Excel output from Access 2007-Report
using:
DoCmd.OutputTo acOutputReport, rptName, acFormatXLSX, OFileName, True
I keep on getting:
Run-time error...
|
by: cowboyjunkey |
last post by:
This is what I want to do:
Each report page will list some details about a sample (like time
sampled, where, who sampled) and below it a chart showing the
distribution of the sample (i.e....
|
by: riaane |
last post by:
Please help: I have Conditional Formatting on a Report Field that fills the background Red if the criteria is met. This displays correctly in Report View, however, when I "OutputTo" this report to...
|
by: mfuentes74 |
last post by:
Hi! I need help I have a report in Access 2007 and I need to insert a page break after every operator id (kn028mf) the first five characters are the same only the last two change, I have tired...
| |
by: mrzebo1 |
last post by:
I have an access 2007 report that I an executing from a form, The report is based on a query that i change when it is execuded using me.recordsource=, There is a text box in the heading that i want...
|
by: dowlingm815 |
last post by:
Contained within a 2007 database, a report has VBA code for detailed line shading as shown below. However, when a macro executes open report command, the shading does not appear. But appears when...
|
by: Diana Miller |
last post by:
Hi All,
I have created an interactive Access 2007 report where the user selects a date from a combo box and results are shown. I would like to know how I can share this report interface so that...
|
by: Adam Tippelt |
last post by:
I know there's a few topics on the forums about this already, but none of them seem to have a definitive answer, and it's unclear if they're for 2003 or 2007.
I've got a report in Access 2007 that...
|
by: mcupito |
last post by:
I am trying to make an annual report that brings together 3 subreports. Each of the subreports returns data in the manner and fashion I am seeking. The problem comes when trying to view them on the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |