VB Crystal Report >> Custom-Format a Summary Field

by Arthur Dent » Fri, 15 Apr 2005 02:47:21 GMT

I have a Summary field in my report. I added it using the little summary
dialog. Works fine, shows the right avg in whatever group level it is.
The field its summarizing is a number of seconds, so i want to format it as
HH:MM:SS, so 123 would yield 00:02:03, because 4362 seconds is a meaningless
number to the user. So i wrote a function which takes a number and divides
by 60 then by 60 to get hours mins secs.

Next i write a formula field which calls my function, and i pass in the
summary field, inserted into the formula by double-clicking it in the fields
list.

Only problem is, for some reason, instead of using the group-specific avgs,
it uses the report Total average in the formula, even if i drop it in a
group header or footer. How can i format a summary field with some specific
custom formatting?

Thanks in advance,
- Arthur.




Similar Threads

1. Custom format to numeric fields - VB.Net

2. exporting custom group summary information

I often export Project data to Excel with a macro that goes through
all the tasks, and subject to a certain set of rules, populates a
spreadsheet with the appropriate task information.  I have a problem
now, in that I want to transfer information that is displayed when I
create a Custom Grouping.  Basically, I roll up a bunch of data to
each unique string in Text1.  I can't figure out how to get at the
summary data, since the rows on which is show do not have task
numbers.  Is it possible to get at that data from Project, or do I
have to recreate it in the code before populating the spreadsheet?

Thanks

Ken

3. file summary and custom property - Visual Basic/VB

4. Using VBA - Copying Formatting from Summary to Individual Sheet

Hello,

I have a summary timetable sheet,  and each customer has a differen
colour.  If someone is due to visit them on day x, then the cell i
shaded in that particular customer.

I then have an individual sheet for each customer and I want to be abl
to copy the formatting from the summary to the individual custome
sheet without having to cut and paste for each individual customer.

This is what I have so far

Dim Cell As Object
Dim CurrentCell As Object

Range("B10:Y200").Select


For Each Cell In Selection

If Cell.Interior.ColorIndex = 52 Then


Cell = CurrentCell
Sheets("CustA").Select
Range(CurrentCell).Select
Cell.Interior.ColorIndex = 52
Sheets("Summary").Select

End If

Next Cell

Any ideas, thanks in advance

Ada

5. Referencing custom fields on a custom form in a public folder

6. crystal reports: summary fields

Hi all, hope this isn't too off topic...
My report accesses a database which holds infomation on http requests
from our intranet.  Each record has a user, date, time and size of
transfer.  I already have a working report which displays daily
summaries of the size transfered, and a link to a subreport for that
day.

In the subreport I linked the username and date parameters to the
record selection, and that works fine.  I supressed the details
section, and placed my 00:00-00:15, 00:15-00:30... labels in the
header for the username group, so they don't all appear for every
record.  I need a way to sum only those records which are in a
specified time bracket.  I don't mind writting a function for each
bracket, but I don't know how to step through each record in the
function.

If there's another way, or anyone has any help, thanks in advance.
Hope I explained this ok, 
Andrew Fray.

7. Field Summary of Formula - VB Crystal Report

8. Sorting a Group By Its Summary Field

"JohnJohn" < XXXX@XXXXX.COM > wrote in message 
news: XXXX@XXXXX.COM ...
> Hello.  I have Crystal Reports 11.  I have a simple report that uses two
> tables; MortgageCompany and Account.  I am listing all accounts associated
> with each mortgage company and subtotaling Account.LoanAmount.  So the 
> report
> is grouped by MortgageCompany.CompanyName.  This is how it works now, all
> hunky dory.
>
> What I want to do is sort the MortgageCompany.CompanyName group by the
> subtotal on Account.LoanAmount in descending order, such that the mortgage
> companies with the highest subtotal of LoanAmount appear first.  Can 
> anyone
> give me a pointer on how to do this?

Use the TopN/Sort function. I'm not sure its location in CR XI, but in CR8 
it's accessible from the Report menu. Sort it descending by 
Sum({Account.LoanAmount}, {MortgageCompany.CompanyName}).

HTH.

KB