473,808 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

report/subreport questions

Ron
I have a report let's call rptOne. On rptOne I have a subreport called
srptOne. On srptOne I have a subreport called srptTwo. Sometimes, srptTwo
is there and shows it's data and sometimes not, based on whether there is
data in the query/table that srptTwo is based on of course. All works fine.

However, now I'd like to control whether certain fields are visible on
srptOne based on whether srptTwo is there or not. Is there a way to do
that? And also, if srptTwo is there and based on one of it's controls, is
also visible(there will be times when I'll want it not visible, even though
it's there)...can I change the visibility of the controls that are printing
out for srptOne based on what's on srptTwo, whether it's visible or not?
And if so, how?

TIA
ron
Apr 11 '07 #1
2 2112
On Wed, 11 Apr 2007 02:50:00 GMT, "Ron"
<ro************ ********@verizo n.netwrote:

Sure. Add a column (let's call it ColumnOne) to the query for the
recordsource of srptOne to indicate the count of records in the
related table used by srptTwo.

Then you can write in the Details.OnForma t event:
SomeControl.Vis ible = (ColumnOne <0)

-Tom.

>I have a report let's call rptOne. On rptOne I have a subreport called
srptOne. On srptOne I have a subreport called srptTwo. Sometimes, srptTwo
is there and shows it's data and sometimes not, based on whether there is
data in the query/table that srptTwo is based on of course. All works fine.

However, now I'd like to control whether certain fields are visible on
srptOne based on whether srptTwo is there or not. Is there a way to do
that? And also, if srptTwo is there and based on one of it's controls, is
also visible(there will be times when I'll want it not visible, even though
it's there)...can I change the visibility of the controls that are printing
out for srptOne based on what's on srptTwo, whether it's visible or not?
And if so, how?

TIA
ron
Apr 11 '07 #2
In srptOne, you have srptTwo in one of the sections (such as Detail.) In
that section, you can test the HasData property of the report in the
subreport control by putting an expression like this into the Control Source
of a text box:
=IIf([srptTwo].[Report].[HasData], "Yep", "Nothing there")

But remember that reports are forward scrolling only. They don't have a
current record. And the subreport could (at least theoretically) have
multiple records where the text box is visible in some rows and not in
others. Attempting to test the Visible property of a control in a subreport
in its parent report is therefore likely to be an exercise in frustration.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Ron" <ro************ ********@verizo n.netwrote in message
news:s1YSh.2484 $Z66.9@trnddc06 ...
>I have a report let's call rptOne. On rptOne I have a subreport called
srptOne. On srptOne I have a subreport called srptTwo. Sometimes, srptTwo
is there and shows it's data and sometimes not, based on whether there is
data in the query/table that srptTwo is based on of course. All works
fine.

However, now I'd like to control whether certain fields are visible on
srptOne based on whether srptTwo is there or not. Is there a way to do
that? And also, if srptTwo is there and based on one of it's controls,
is also visible(there will be times when I'll want it not visible, even
though it's there)...can I change the visibility of the controls that are
printing out for srptOne based on what's on srptTwo, whether it's visible
or not? And if so, how?

TIA
ron
Apr 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4136
by: Steve Edwards | last post by:
I am trying to use an existing report as a subreport in another report. I have the subreport added to the main report, but the only thing that shows up where the subreport should be is the name of the subreport. In reading the Access help files, it sounds like there should be LinkChildFields and LinkMasterFields proprties in the propert sheet for the subreport. However, neither of these properties are there for the subreport.. I used...
6
2703
by: David B | last post by:
I have a report with 2 sub reports on it. The report is an invoice and the sub reports are dropping data onto the invoice. This worked fine if generating 1 invoice at a time. I am trying to create a run of invoices. I would like the appropriate data for each custid from each sub report to be on the same page. The nearest I can get is 2 pages for each customer Any Thoughts TIA David B Hexham UK
3
3718
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what a spreadsheet might show, the column names will actually be dynamic, based on data from a SQL Server 2000 database. The row data will also come from the same database. So in this case, I will have a main report and a subreport. I've already tried...
1
2380
by: last Name | last post by:
Hello all, I'm using Access 2000. I have a subreport control which loads a report in the detail section of a main report. I need to keep a count of each item price in the subreport and place it in the Report footer of the main report. Each post i've read on this seems to not work and/or give me the same problems the other posters are having: a box coming up asking for parameter values. Thanks in advance for your help.
7
3574
by: Ellen Manning | last post by:
I've got an A2K report showing students and their costs. Student info is in the main report and costs are in a subreport for each student. The user inputs the program desired then only those students in that program are printed. I want the subreports headings to print only for the first student on the page. Is there a way to suppress printing of the headings on subsequent students on that page? I tried the following in both the...
1
3778
by: shaqattack1992-newsgroups | last post by:
I know this is kind of a weird question, but is there anyway to give a subreport control of a main report? I posted my situation earlier about having drawings print out after a group. I have a report grouped by part group that lists the part numbers needed from that group. I have force new page after each group. This gives me a list of parts on each page. I want to print the needed drawings after the groups/list of parts. There are...
3
7409
by: lorirobn | last post by:
Hello, I have a report which uses a subreport. When I run the report, I get "Enter Parameter Value" error message for "tblGuestRoom". I click ok and the report seems to work fine. I narrowed down this error to the Link Master Fields property setting, when I tried the same scenario with form/subform. It gave me error: 'The Link Master fields property setting has produced this error: The object doesn't contain the Automation object...
3
12920
by: kenneth xg | last post by:
Hi, I have problem on passing parameters to subreports' stored procedures which require parameters, from an asp.net web form. I ve tried to use the stored procedures on the main report it works fine, however once the stored procedures were put into a subreport, it cause an exception: "Missing parameter field current value"
2
3236
by: jburris | last post by:
In my current database, I have a single table which contains order information such as product, unit price and payment. The payment for each product is entered in and subtotals and totals are calculated fields on reports. With this setup our customers pay for each product in full. I am trying to divide the table to move payment information to a related table such that customers can make partial or installment payments. I managed to...
0
10628
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10374
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9195
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.