473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to specify variables to define content of subreports

I am using the sendobject function to email a report out to various members of staff.

Essentially I have two reports.

Report1 contains the subreports, and is the report that is emailed

Report2 displays records matching two criteria: Total Points >150, and one of the Houses (there are 4 Houses - Barton, Furley, Harvey or Weil)

Report2 is replicated 4 times on Report1 - the idea being that each House has its own report

At the moment, when I run the report, I have to type in each of the 4 houses. I want to add this report into an existing code so that it automatically picks the condition from a string (strSoL) in the table and I don't have to type it in.
Oct 18 '10 #1
3 1233
nico5038
3,080 Expert 2GB
When report 1 is based on a query for each of the houses, a subreport in the detailsection based on a query with the >150 criteria that's linked to the main report1 will automatically filter the data for you.

Clear ?

Nic;o)
Oct 18 '10 #2
do you mean nico that i need to have four separate queries, one for each of the houses? Is there no way to just use the same query four times with a different variable specified each time?
Oct 19 '10 #3
nico5038
3,080 Expert 2GB
No, I propose to use a main report with one query extracting the four houses from a table (you could use e.g. a Group By query when houses are only recorded in detail records, or a select query when you have a tblHouse.

Next place the sub-report in the detail section and accept the link the Access report wizard proposes.

Thus the subreport will occur as many times as houses are selected on the main form.

Keep in mind that the House Header needs to be on the main form as the page headers on a sub report are suppressed.
Oct 19 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Spartanicus | last post by:
I'd like to know if it's possible to use js to step through and select a header in an HTML document, select it's content and all content below it. Context: I'm wondering if it's possible to use...
26
by: lbolognini | last post by:
Hi all, I have a very long list of parameters coming from a web form to my method foo(self, **kwargs) I would like to avoid manually binding the variables to the values coming through the...
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
6
by: Kenneth Keeley | last post by:
Hi, I have a Masterpage that controls the basic layout of the pages displayed on a web site. The masterpage also uses some variables. I would like to be able to access some of these variables from...
0
by: Henry | last post by:
I have written an ASP/VB.Net application via VS 2003 (Crystal V9) that uses MS Access 2000 as its database. I can export reports that have no linked sub reports for printing. However, I'm unable...
0
by: Mark | last post by:
In ASP.NET 2.0, there doesn't seem to be much support for referencing element ID's across Content elements, using this new databinding syntax. The only way I've found is to string up a bunch of...
1
by: sam48430 | last post by:
Hi, I have a problem of useing a variable which is defined in javascript which i need to pass a function which will work on it. this function is defined in a java class which is being imported in...
2
by: Jan | last post by:
Is it possible to set the ContentType for the VirtualFile-descendant that a custom virtual path provider returns in response to a call to its GetFile method? Right now, web browsers tend to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
Oralloy
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.