Solved

Crystal XI passing parameters to multiple sub-reports

Posted on 2014-01-06
8
865 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 7

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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

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 7

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 7

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now