473,662 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide field(s) in Report

Cintury
81 New Member
Hello, I saw a similar thread on this subject but did not find the answer I was looking for.

I have a report that is used to find undistributed balances of food using a table and a subreport. It includes Date/Donor Company/Bakery/Dairy/Meat/Fruit/Veg/Prod/Prep'd/Bev/Non-Perish/Non-Food/Total

Under that if the "Cross-reference" button is selected it shows the Agency it was delivered to. (Same run through as above "Receiving Agency" instead of Donor Company)

After each pair it has a line that contains the "Undistribu ted Balance" if any. It simply takes the top donor amount, ex. 100 Bakery, and subtracted each value given to each corresponding agency.

What I want to do is have the report check the undistributed balance, and if it is zero(0) I don't want that Donor Company and its corresponding agency to be displayed. This will allow me to go ahead and re-distribute and balance each month at a glance. Currently it is only effective to view 1 day and 1 donor company at a time otherwise there is atleast 30 pages of report to scan through.

This is the coding under the "Detail" section of the report. (Where the undistributed balance line appears):

Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)

End Sub

Private Sub Detail_Print(Ca ncel As Integer, PrintCount As Integer)

End Sub

Private Sub Report_Open(Can cel As Integer)
Dim strCriteria
On Error GoTo eh
If fcnIsFormOpen(" fdlgPrintReport s") Then
strCriteria = Nz(Forms!fdlgPr intReports!txtE nterBeginningDa te, "") & IIf(IsNull(Form s!fdlgPrintRepo rts!txtEnterEnd ingDate), "", " Through " & Forms!fdlgPrint Reports!txtEnte rEndingDate)
Me.lblCriteria. Properties("Cap tion") = strCriteria
If Forms!fdlgPrint Reports!optCros sRefReceipts = True Then
Me.rsubFoodDona tionbyReceipt.P roperties("Visi ble") = True
Me.txtUndistrib utedBakery.Prop erties("Visible ") = True
Me.txtUndistrib utedBeverage.Pr operties("Visib le") = True
Me.txtUndistrib utedDairy.Prope rties("Visible" ) = True
Me.txtUndistrib utedMeat.Proper ties("Visible") = True
Me.txtUndistrib utedNonFood.Pro perties("Visibl e") = True
Me.txtUndistrib utedNonPerish.P roperties("Visi ble") = True
Me.txtUndistrib utedFruit.Prope rties("Visible" ) = True
Me.txtUndistrib utedVeg.Propert ies("Visible") = True
Me.txtUndistrib utedPrepared.Pr operties("Visib le") = True
Me.txtUndistrib utedProduce.Pro perties("Visibl e") = True
Me.txtUndistrib utedTotal.Prope rties("Visible" ) = True
Me.lblUndistrib utedBalance.Pro perties("Visibl e") = True
Me.lblUndistrib utedBalance.Pro perties("Height ") = 200
Me.lblCorrespon dingReceipt.Pro perties("Height ") = 200
Else
If Forms!fdlgPrint Reports!fraInve ntoryOption = 2 Then
Me.rsubFoodDona tionbyReceipt.P roperties("Visi ble") = True
Me.txtUndistrib utedBakery.Prop erties("Visible ") = True
Me.txtUndistrib utedBeverage.Pr operties("Visib le") = True
Me.txtUndistrib utedDairy.Prope rties("Visible" ) = True
Me.txtUndistrib utedMeat.Proper ties("Visible") = True
Me.txtUndistrib utedNonFood.Pro perties("Visibl e") = True
Me.txtUndistrib utedNonPerish.P roperties("Visi ble") = True
Me.txtUndistrib utedPrepared.Pr operties("Visib le") = True
Me.txtUndistrib utedFruit.Prope rties("Visible" ) = True
Me.txtUndistrib utedVeg.Propert ies("Visible") = True
Me.txtUndistrib utedProduce.Pro perties("Visibl e") = True
Me.txtUndistrib utedTotal.Prope rties("Visible" ) = True
Me.lblUndistrib utedBalance.Pro perties("Visibl e") = True
Me.lblUndistrib utedBalance.Pro perties("Height ") = 200
Me.lblCorrespon dingReceipt.Pro perties("Height ") = 200
Else
Me.rsubFoodDona tionbyReceipt.P roperties("Visi ble") = False
Me.txtUndistrib utedBakery.Prop erties("Visible ") = False
Me.txtUndistrib utedBeverage.Pr operties("Visib le") = False
Me.txtUndistrib utedDairy.Prope rties("Visible" ) = False
Me.txtUndistrib utedMeat.Proper ties("Visible") = False
Me.txtUndistrib utedNonFood.Pro perties("Visibl e") = False
Me.txtUndistrib utedNonPerish.P roperties("Visi ble") = False
Me.txtUndistrib utedPrepared.Pr operties("Visib le") = False
Me.txtUndistrib utedFruit.Prope rties("Visible" ) = False
Me.txtUndistrib utedVeg.Propert ies("Visible") = False
Me.txtUndistrib utedProduce.Pro perties("Visibl e") = False
Me.txtUndistrib utedTotal.Prope rties("Visible" ) = False
Me.lblUndistrib utedBalance.Pro perties("Visibl e") = False
End If
End If
Else
Me.lblCriteria. Properties("Cap tion") = ""
Me.rsubFoodDona tionbyReceipt.P roperties("Visi ble") = False
Me.txtUndistrib utedBakery.Prop erties("Visible ") = False
Me.txtUndistrib utedBeverage.Pr operties("Visib le") = False
Me.txtUndistrib utedDairy.Prope rties("Visible" ) = False
Me.txtUndistrib utedMeat.Proper ties("Visible") = False
Me.txtUndistrib utedNonFood.Pro perties("Visibl e") = False
Me.txtUndistrib utedNonPerish.P roperties("Visi ble") = False
Me.txtUndistrib utedPrepared.Pr operties("Visib le") = False
Me.txtUndistrib utedFruit.Prope rties("Visible" ) = False
Me.txtUndistrib utedVeg.Propert ies("Visible") = False
Me.txtUndistrib utedProduce.Pro perties("Visibl e") = False
Me.txtUndistrib utedTotal.Prope rties("Visible" ) = False
Me.lblUndistrib utedBalance.Pro perties("Visibl e") = False
End If

Exit Sub
eh:
MsgBox Err.Number & " - " & Err.Description & " From " & Err.SOURCE
Exit Sub
End Sub
Jun 7 '07 #1
2 4308
Cintury
81 New Member
It seems as though it should be only a few lines of coding please help :(
Jun 8 '07 #2
puppydogbuddy
1,923 Recognized Expert Top Contributor
It seems as though it should be only a few lines of coding please help :(

Cintury,
The code I gave you previously is very easy and works.....I will put the code in for you if you would just post the correct sub procedure that I need. The code you posted above is not the appropriate place to change the code. You provided the code for the open event of the report------->
Private Sub Report_Open(Can cel As Integer)

The code that needs to be changed is the code behind the button that calls the report open code above. If you can post the button click code, I will fix it for you.
Jun 14 '07 #3

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

Similar topics

8
7091
by: mark | last post by:
Access2000 How do I write a query that combines the CTC field from each record below into one record? I need to concatenate the CTC field with a separator, like below: BattID VehicleID STDATE STTIME CTC LKO500HF 00000000 10/27/2003 4:13:51 AM 4 LKO500HF 00000000 10/27/2003 5:13:51 AM 5 LKO500HF 00000000 10/27/2003 10:13:51 AM 6 LKO500HF 00000000 10/27/2003 11:13:51 AM 4
1
362
by: Sharon Frederick | last post by:
I was hoping to get an answer to the following problem. In a report that I run I get lots of duplicate fields when I only want to show one of each. I have said yes to the hide duplicates field and this does show only one of each record but leaves spaces where the original data was. This means the report looks awful. How can I get rid of the spaces and just have the list of courses I need? Thanks in advance. John
7
10139
by: Mark | last post by:
Hi All, I have a report which is based on a query which is used to produce QC check sheets. I have quite a few text boxes which are used to display questions depending on the value of one particular field which will have either a "H" or "B" value. e.g. =IIf(="H"," Does the multipack Qty match the paperwork"," Is the outer label positioned correctly") My problem is that there are more questions for hanging types than boxed.
1
2189
by: Randy | last post by:
I built and employment report from the employment table. I then had to add a field to the table. I now need to add that field to the report. I can't seem to be able to do that by clicking on table icon and adding the field as it is not listed. How am I able to add the new field to the report?
7
4534
by: Darin | last post by:
I have a report that sub-totals on a group, then grand-totals at the report footer. If there's only one group, the sub-total and grand total are redundant, so I only want to show one of them. I know how to count the groups, then hide the report footer if there's only one group, but my problem is I want to hide the group footer (sub-total), not the report footer (because the report footer references what the grand total is for, which is...
5
2766
by: ken | last post by:
Hi, Lets say you have a report with 10 rows. The first 4 of them have duplicate values in a given field. So you set the Hide Duplicates property to Yes and when you preview the report it shows you the first value and the next 3 fields are blank(hidden using hide duplicates). I was wondering if there was some way for me to set a value to those fields so that if a field was hidden due to the hide duplicates property I would somehow show...
2
3084
by: J.B. | last post by:
Greetings all - I have been working on this issue for a while now and it has been frustrating to the point where I'm reaching out to the gurus of .NET for any suggestions. I have a webform where when a user selects an item from a dropdown box and attempts to run a report, if a date is not found in my database, it should return a message to the browser notifying a user that they must select another item to run the report against. The...
10
11748
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines. It seems the simplest thing is to run the code (see below) once with the detail section showing, and a second time hiding the detail section. I can't figure out the code to do that and don't see it posted.
1
9438
by: MattGaff | last post by:
I have a parameter (dropdown menu) on my report which will filter or sort the data depending on the chosen option. There are only 2 options to choose from in this dropdown. I want to Hide duplicates for when the user selects option 1 but not to hide the duplicates for when option 2 is chosen. Since the "Containing group or dataset" field has an expression option next to it, I assume you are able to put in an expression for which dataset to use....
0
8435
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
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
7368
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...
0
5655
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
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.