Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Follow up on previous question Post Reply Post New Topic
Author Message
MadMan
Newbie
Newbie
Avatar

Joined: 04 Apr 2012
Location: United States
Online Status: Offline
Posts: 6
Quote MadMan Replybullet Topic: Follow up on previous question
     Posted: 12 Apr 2012 at 4:22am
Hello,
I'm a nb to Crystal Reports and am working on a report for a friend. There is a Main Report and 3 sub reports. The Main report is using a date range to gather information on mainenance records / costs on pieces of equipment. Each pc of equp will have multiple work orders attached to it.
The first subreport lists the work done and the cost of the labor for inhouse maintenance. The second subreport lists the cost of the parts needed. And the 3rd subreport lists any associated costs for parts and labor for work done outside of our organization... ie work from an outside vendor.
Many Thanks to "DBlank" I was able to set up sharedvars to total the buckets in the sub reports, and then pass those values to the main report.
 
The problem I have now is if you are viewing a equp "A's" workorder report, it would show labor of $300.00 on wrk order "1".  On workorder "2" that 300.00 should not be there, but the main report still shows it).  That $300.00 labor charge will remain on the main report until a new labor record is found and sent to the main report to replace it. 
 
This value is will not change until the next subreport value replaces it. I am looking for a way to initialize the total buckets so they will reflect the current workorder being viewed's information, and not something from a previous one.  Unfortunately if the work order has no labor records, the fields are Null, and not zero, so I'm running into problems..... and would appreciate suggestions please... (how do i get myself into these things... lol)
 
thanks
Madman
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Apr 2012 at 4:57am

if you are setting a group per workorder number then i assume you are placing each of your sub reports into a group header or footer.

if so you can reset the shared variable amount back to 0 for each variable inside the GH. Therfore by the time it runs for the next grouping (workorder) it is a clean slate.


Edited by DBlank - 12 Apr 2012 at 4:58am
IP IP Logged
MadMan
Newbie
Newbie
Avatar

Joined: 04 Apr 2012
Location: United States
Online Status: Offline
Posts: 6
Quote MadMan Replybullet Posted: 12 Apr 2012 at 5:31am
Thank You DBlank......
I ran across a couple other posts and apparently I made a mistake and put the namedvar reset in the wrong group header... once I changed that and it seems to be working now.   Unfortunately there's no one where I work that has any experience at all with Crystal , so I get to do the learn as you go process....  things take much longer than they should this way... but I'm making progress...  
 
Thanks for your help, very much appreciated...
Madman
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum