473,396 Members | 1,907 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,396 software developers and data experts.

Decimal Formatting in Details Section of Report

I have a report that is grouped by a field called DataSource. In the detail section of the report where the record data fields are displayed, such as Jan, Feb, Mar, etc, I want to format the decimal places to 2 if the DataSource is Rate and 0 decimal places for any other value in DataSource. Is this possible and if so, how? Thanks in advance.
Jan 24 '09 #1
1 1523
ADezii
8,834 Expert 8TB
@AccessInCA
In the Group Header's Format() Event, try:
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
  3. Dim TBox As TextBox
  4. '
  5. Set TBox = Me![DataSource]
  6. '
  7. If TBox = "Rate" Then
  8.   TBox.Format = "#,#,#.00"
  9. Else
  10.   TBox.Format = "#,#,#"
  11. End If
  12. End Sub
  13.  
Jan 25 '09 #2

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

Similar topics

21
by: Batista, Facundo | last post by:
Here I send it. Suggestions and all kinds of recomendations are more than welcomed. If it all goes ok, it'll be a PEP when I finish writing/modifying the code. Thank you. .. Facundo
0
by: Kerri | last post by:
Hi, I have a report that I render out as PDF. I have two sections in my Details section of the report. I want to format the background of each section. so one half will be one colour and...
2
by: Eddy Bee | last post by:
Hi there, I'm encountering an inexplicable problem with page formatting in reports. Here's the easiest way to explain it: The Detail section of my report contains two elements: And let's...
2
by: Jozef | last post by:
Hello, I have a report that contains a memo field that can contain quite a bit of information. There are actually a couple of fields like this. When I use can grow / can shrink, the report...
0
by: mmcd79 | last post by:
I am using .NET 2005 and the integrated Crystal Reporting Engine (v10.2). I don't know what in the world is happening but something isn't right. When I prevew my report in the designer,...
1
by: John | last post by:
Hi I am doing a report to print invoices on pre-printed laser invoice forms. The invoices can go on more than one page potentially depending on the amount of details. On my report the detail...
5
by: CarrieR | last post by:
I am working within a DB I have been devolping in Access 2003, and have encountered a report coding issue I was hoping someone could help me with: I have 18 reports, each running off some smaller...
4
by: D.Stone | last post by:
I am having problems formatting an Access 2003 report which is trivial in the extreme (tabular layout, 9 fields from 1 table per row in the detail section, no groups/totals). One field (only) in...
0
by: peter.c.bradley | last post by:
Hi folks, I have an Access report that has an unbound text box in the details section. The report also includes the standard headers and footers. The details section is populated by a query...
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: 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
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
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,...
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...

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.