Solved

Crystal XI passing parameters to multiple sub-reports

Posted on 2014-01-06
8
861 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

15 Experts available now in Live!

Get 1:1 Help Now