473,413 Members | 2,051 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,413 software developers and data experts.

Dissapear a report textbox IF no information or "0"

135 100+
Hello

I have created a report with a subform containing a textbox which i would like to "disappear" (not "visible") if its value is "0".

Can this be done? Can you help me with some code?
Thanks,
Gil
Sep 18 '07 #1
3 2973
lee123
556 512MB
try this

if text?= 0 then
text?.visible=false
else
text?.visible=true
end if

lee 123
Sep 18 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
try this

if text?= 0 then
text?.visible=false
else
text?.visible=true
end if

lee 123
Put the code in the format event of the report.
Sep 18 '07 #3
Gilberto
135 100+
Put the code in the format event of the report.
Re: Hiding Label and Text Control if the Value is Null II
--------------------------------------------------------------------------------

Quote:
Originally Posted by mmccarthy
To be honest, I've never tried running a subform in a report. The problem may be with the Form_Current event as I'm not sure how this would trigger on a report. You could try putting the following in the Reports OnFormat event.


Code: ( vb )
Private Sub Detail_Format()

If Reports![ReportName]![SubformName].Form![RDamortization1] > 0 Then
Reports![ReportName]![SubformName].Form![RDAmortization2label].Visible = True
Else
Reports![ReportName]![SubformName].Form![RDAmortization2label].Visible = False
End If

End Sub


Im using the subform in the report so that i can print to the clients the calculations to get a product final price. In the form a user enters some parameters (tax, labor work, time required, etc.) and the layout of the calculations are displayed. Is there any other way to do it???

Hello again, im using the following:


Code: ( text )
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If Reports![Pricing L1V1]![SUBPricingL1V1].Form![RDamortization1] > 0 Then
Reports![Pricing L1V1]![SUBPricingL1V1].Form![RDAmortization2label].Visible = True
Else
Reports![Pricing L1V1]![SUBPricingL1V1].Form![RDAmortization2label].Visible = False
End If

End Sub


but i get the error: 2465 saying that it CANT find the FIELD 'SUBPricingL1V1'

As it mentioned FIELD i deleted the FROM part from the equation (If Reports![Pricing L1V1]![RDamortization1] > 0 Then..... BUT im still getting the same error.

Any ideas...Thanks again,
Gilberto
Sep 19 '07 #4

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

Similar topics

0
by: sztonix | last post by:
Hi all, I encountered a crystal report deployment problem. I make reports with Crystal Report for Visual Studio .NET 2003. It works fine in the development machine. And then make setup...
5
by: Nick Stansbury | last post by:
Hi, Sorry for the obscure title but I'm afraid I can't think of a better way to describe what happened to one of my clerks last night. The guy was working late, made a series of changes (accross a...
1
by: Tom Louchbaum | last post by:
When I preview my Access 2000 Report it looks fine. When I Email the report using DoCmd.SendObject acSendReport, "Report", acFormatRTF, "To Address", , , "Subject", , False the resulting...
7
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...
2
by: Delali Dzirasa | last post by:
I am a newbie and am creating my first asp.net in crystal reports. I have created the report (.rpt file) and have dropped the CrystalReportViewer on the web form. From the databinding...
2
by: Daren Hawes | last post by:
Hi I need to add an attribute to a Textbox to make it read only. To add a CSS I use DeptDate.Attributes("Class") = "textInput" That adds 'Class="textinput"', but the readonly is like..
3
by: KelHemp | last post by:
I have compiled data from 13 tables, one for each month of the year that hold 45 fields each, and another for employee information, that holds 16 fields. The database is intended to record hours and...
2
by: patrice.pare | last post by:
Hello, Here is a summary of my Dev Environment: I use Visual Studio 2005 Team Suite SP1 with Crystal Report XI SP1 on a Windows XP SP2 development workstation. I also use SQL Server 2000 SP4. ...
16
by: mj.redfox.mj | last post by:
Can anyone help? I have a textbox which I'm programatically adding by using the following code: txtTest = New TextBox txtTest.ID = "txtLeft" + cntCount.ToString...
4
by: Micheal | last post by:
Greetings Access Group, Being relatively new to Access, I try to work through problems on my own and have been very successful, although I have a conundrum that I have been working on for two days...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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...
0
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...
0
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 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.