[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Conditional linking from Sub report to the main report

Posted on 2010-04-07
6
Medium Priority
?
357 Views
Last Modified: 2012-06-27
I have a main report which gets account ID (ACID) and and Control ID(CID),along with other fields.
I have a sub-report,which gets me ACID,CID and Eligibility_ID(E_ID).
The subreport should be linked to the main report :
1. On ACID only, when the E_ID = 'N'
2.ON ACID and CID when the E_ID = 'Y'.

How to accomplish this? Please advise.

I'm on Crystal Reports XI R2.
0
Comment
Question by:pvsbandi
  • 3
  • 2
6 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 30080838
You will have to link on both fields then edit the select expert in the subreport to reflect the condition

In the subreport
Click REPORT --> SELECTION FORMULAS --> RECORD

You should see something like
{AccountIdField} = {?pm_AccountId}
AND
{ControlIdField} = {?pm_ControlId}

Edit it to be
(
{AccountIdField} = {?pm_AccountId}
AND
{Eligibility_IDField} = 'N'
)
OR
(
{AccountIdField} = {?pm_AccountId}
AND
{ControlIdField} = {?pm_ControlId}
AND
{Eligibility_IDField} = 'Y'
)

mlmcc




0
 
LVL 13

Expert Comment

by:PCIIain
ID: 30095207
or

{AccountIdField} = {?pm_AccountId}
AND
({Eligibility_IDField} = 'N' or {ControlIdField} = {?pm_ControlId})
0
 

Author Comment

by:pvsbandi
ID: 30117413
Thanks! I have some questions here..
   The parameters for the ACID and CID are not there on the report.If i create them, wouldn't users be prompted to fill them? I'm new to the world of crystal reports,so please bear with me.
   
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 

Author Comment

by:pvsbandi
ID: 30130013
OK, i figured it out.Now, my problem is in aligning the subreport data with the main report.
 How can use only selective fields in the subreport to show along with the main report fields?
 I've put the subreport in the details,next to the main report fields and it is showing too many fields and doen't make sense rightnow..please help.
0
 

Author Comment

by:pvsbandi
ID: 30133699
Sorry,will ask this as a separate Question.

Thanks much!
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 30176571
If you are referringto the ?pm_xxxx fields then no.

Crystal creates parameters to use in the linking of the main report to the subreport and passes the main report values through them.  The parameters are for report use only and th euser will be unaware of them.

mlmcc
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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 …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses

590 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