Solved

Crystal XI passing parameters to multiple sub-reports

Posted on 2014-01-06
8
878 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

792 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