Showing posts with label groups. Show all posts
Showing posts with label groups. Show all posts

Wednesday, March 28, 2012

RunningValue crashes VS

I have a standard report with a bunch of fields and groups within a
table.
I've added a field for a running total:
Field is amount_rt
Definition is: =RunningValue(Fields!amount.Value,Sum,Nothing)
The second I try to preview the report or deploy it, VS crashes.
I figured it might be something with my data, so I changed
Fields!amount.Value to Fields!test.Value where test = 1
Same thing.
The error message gives me no detail whatsoever.
Has anyone seen this before?
ThanksDid you create this field by going to your dataset and adding a newfield, or
just by code in a textbox or table?
<bigbrorpi@.gmail.com> wrote in message
news:1156263917.161190.3160@.b28g2000cwb.googlegroups.com...
>I have a standard report with a bunch of fields and groups within a
> table.
> I've added a field for a running total:
> Field is amount_rt
> Definition is: =RunningValue(Fields!amount.Value,Sum,Nothing)
> The second I try to preview the report or deploy it, VS crashes.
> I figured it might be something with my data, so I changed
> Fields!amount.Value to Fields!test.Value where test = 1
> Same thing.
> The error message gives me no detail whatsoever.
> Has anyone seen this before?
> Thanks
>

Monday, March 26, 2012

Running totals: Custom Reset via Formula

Hi All,

I have attached a screenshot to help make up for my inability to describe the situation I'm dealing with here.

I have three groups within a report that currently use distinct Running Totals fields that Reset at the group levels that I assigned. I am attempting to create a single Running Totals field that will reset depending on which Group is being calculated at the moment so that I don't have to have a separate Running Totals object for each and every group. I'm not sure how to do this or write this formula as I'm new to Crystal Reports and am used to SQL Reporting Services where this evaluation is automatically done for you (I was spoiled I guess).

For example, if the Running Totals field control is in Group #1, I want it to reset at Group #1, and Group#2 to reset at Group #2.

So basically I'm attempting to use a formula to create a Reset point (view screenshot for detail) that is determined by which group the data is being calculated in. Is this possible? I realize that it is possible by simply creating a new running total object for each group, but this seems completely redundant and overly time consuming for larger reports where there are multiple groups.

I'm developing the report with Crystal Reports within Visual Studio 2005 if that helps any.

Please let me know if I can attach a screen shot or give more information to make my task clear.

Thanks!Either this will answer your question or I've totaly missed the point! (again..ahem)!

Enter a Running Total against the required field. In the Evaluate section select On Change of Group and select your relevant group header.

Very simple or completely wrong! I'll let you make your mind up!

Take it easy

Rob|||Either this will answer your question or I've totaly missed the point! (again..ahem)!

Enter a Running Total against the required field. In the Evaluate section select On Change of Group and select your relevant group header.

Very simple or completely wrong! I'll let you make your mind up!

Take it easy

Rob

Thanks for giving it a shot, Rob. =]

Yeah, I knew about the On Change of Group. I'm able to create a new running totals field for each individual group, but that's what I want to avoid. Instead of selecting the exact group, I'm trying to find a way to code it so that the field examines which group it is currently being evaluated in so that I don't have to create a running totals field for each group as I have a lot of fields that I'm getting the sum for in each group. This would cut my work by a third (or 1/4th for some reports as there will be 4 groups with running totals).|||Actually, a running total has to be placed in an appropreate group footer.
If it has to be reset on change of group#1, it has to be placed in GF1.
If it has to be reset on change of group#2, it has to be placed in GF2 but not in any other one.
How are you planning to solve that problem?|||Try to solve your problem with a new table, view or query where the subtotals are included
I use Crystal in all my projects but I know that it has limits ( or myself ) and always try to make my reports as simple as I can by resolving almost all the stuff at programming side

Running Totals at group level

Hi,

I have a report that groups data by day - I have created a running value to

show cumulative sales for Monday, Monday+Tuesday, Monday+Tuesday+Wednesday etc.

I have a group below this level that expands out the customer. I

wish to create a cumulative sales value for that customer for that day of the

week. i.e. Customer A Monday value, Customer A Monday+Tuesday

value.

When you use RunningValue with scope Nothing, ie.

RunningValue(Fields!nett_value.Value, Sum, Nothing), the value returned on

Tuesday is Total Monday value plus each customer Tuesday value cumulative

adding. If you use scope at customer group level it cumulatively

adds that day’s customer totals.

I need to recreate:
Daily

Cumulative

Monday

100 100

Customer A 50

50

Customer B 25

25

Customer C 25

25

Tuesday

100 200

Customer A 50

100

Customer B 25

50

Customer C 25

50

Any ideas?

Thanks

While I am having fun trying to work this out...

Any help would be great!!!

Thanks!

Running Total in Details Section

Hi,
I have an invoice with details section and no groups. I want to show the running total of the positions at the bottom of the page and on each page. Where do I have to place the running total field?
thank you
sorinHave you tried the page footer...?|||Yes, the running total is wrong, it adds the value of the first postion from the next page. It should only show the sum of the positions shown on one page.

If I place the running total in the details section, its value is right, but then the running total is shown for each record, I want it only one time at the end of the details section.|||I don't think I've ever put a running total in a page footer, so don't know about it picking up the next record's value too.
One way would be to create your own formulas to do the summing. e.g.

1) In the details, suppressed
whileprintingrecords;
numbervar total;
total := total + {table.position};

2) In the page footer
whileprintingrecords;
numbervar total|||it works, thank you