Solved

Crystal XI passing parameters to multiple sub-reports

Posted on 2014-01-06
8
874 Views
Last Modified: 2014-01-13
Main report and two sub-reports... Main Report prompts for OrderDet.OrderNo, the Quote Costs sub-report prompt for OrderDet. JobNo and the Job Matl sub-report prompts for POReleases.JobNo.

OrderNo example: 110954
JobNo example: 110954-01

The -01 signifies the top level assembly JobNo to which WIP activity and costs are rolled up.

I'd prefer to enter a single OrderNo parameter but could live with entering the OrderNo and a single JobNo passed to both subreports; but would like to avoid entering 3 parameters.

The JobNo will always end with -01
Is it possible to prompt only for the OrderNo and pass that parameter to the two subreport parameters and add the -01 suffix to them?
Job-Cost-Actual-vs-Estimate.rpt
0
Comment
Question by:Lee Ingalls
  • 4
  • 3
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39760564
The easy way is to not have the subreport prompt for anything and link it on the field/value you want.

You could create a formula that adds the -01 to the orderno parameter and link that to the parameters in the subreports.

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39760568
To link to a subreport parameter make sure you select it from the list.  Don't just accept the parameter the linking expert selects which will be something like ?pm_OrderNo

mlmcc
0
 
LVL 8

Author Comment

by:Lee Ingalls
ID: 39762907
I've been beating head against this one since last night...

The main report uses parameter OrderDet.OrderNo
The two subreports use a JobNo parameter

Keep in mind RHa also contains a copy of the subreport so I can pre-run for the shared currencyvar povalue.

All I end up doing is adding additional parameter prompts. This one is kicking my ass!
Doc7.pdf
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 39763401
Try this version

mlmcc
Job-Cost-Actual-vs-Estimate-rev1.rpt
0
 
LVL 8

Author Comment

by:Lee Ingalls
ID: 39765266
Thank you mlmcc. I have a concern that Job Matl Subrpt2 is no longer returning the correct povalue. I was expecting the amount to be $17,902.61 but the report with the updated subreport links is returning a povalue of $8,141.25 based upon the OderNo/JobNo parameters. I'm in the process of comparing the two version to try and determine what's causing some of the PO details to be excluded.

I started the report from scratch so that I can eliminate some of the old report artifacts and will try your subreport links.
0
 
LVL 34

Expert Comment

by:James0628
ID: 39766154
In your original "Job Matl Subrpt2" subreports (one in the report header and one in the report footer), your record selection formula only compared the parameter with POReleases.JobNo.  mlmcc added tests on PODet.JobNo in one subreport and OrderDet.JobNo in the other.  Maybe those fields have different values (like the "-01" that you mentioned) in PODet and OrderDet, so that excludes some records.

 James
0
 
LVL 8

Accepted Solution

by:
Lee Ingalls earned 0 total points
ID: 39766431
James, we're on the same track... I had just finished my "eureka" moment when I saw your post.

I had started re-writing the report from scratch eliminating some of the unnecessary artifacts in the report... writing the main report and each sub-report separately.
 
What was getting excluded were POValues which had multiple Job Numbers, ie, 110954-01 and 110953-01, completely different job numbers to the same vendor on the same PO.

mlmcc's was excluding some POValues and my re-write of the report was doubling some Vendor POValues... focusing on the entries that were being excluded or multiplied I realized we were purchasing the same items from the same vendor PO, for multiple jobs... POReleases was the key.

RFd:  Job Matl Subrpt2,  I changed the record select formula from OrderDet.JobNo =  the parameter prompt to POReleases.JobNo = parameter prompt. I also changed my @Value formula to use {POReleases.Qty}*{PODet.UnitCost} instead of {PODet.Qty}*{PODet.UnitCost}

Just need to make a minor tweak to get the shared currencyvar povalue formula to pass the the amount back to the main report.

You guys are awesome! Persistence paid off.
0
 
LVL 8

Author Closing Comment

by:Lee Ingalls
ID: 39776120
mlmcc's was excluding some POValues and my re-write of the report was doubling some Vendor POValues... focusing on the entries that were being excluded or multiplied I realized we were purchasing the same items from the same vendor PO, for multiple jobs... POReleases was the key.

RFd:  Job Matl Subrpt2,  I changed the record select formula from OrderDet.JobNo =  the parameter prompt to POReleases.JobNo = parameter prompt. I also changed my @Value formula to use {POReleases.Qty}*{PODet.UnitCost} instead of {PODet.Qty}*{PODet.UnitCost}
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question