Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: 2nd Sub Report Based On Parameter From 1st Sub Rep Post Reply Post New Topic
Author Message
chrisfaw
Newbie
Newbie
Avatar

Joined: 26 Apr 2016
Online Status: Offline
Posts: 13
Quote chrisfaw Replybullet Topic: 2nd Sub Report Based On Parameter From 1st Sub Rep
    Posted: 24 Oct 2016 at 11:30pm
Hi CR Experts

I have a sub report which is based on a parameter from another sub report. 

I cannot select the sub report1 fields to link to subreport 2 in the  change sub report links option. 

Therefore I have attempted to share the fields which will be the parameter for sub report 2 from sub report 1 to the main report.

I have used the below formula to share

Subreport 1
 
Whileprintingrecords;

Shared stringvar substring;

Substring:= {Command.2 Sub Assembly Code}

Main Report

whileprintingrecords;

Shared StringVar  substring;

substring

The correct field which I need as parameter for sub report 2 appears when a add the filed to the footer of the main report.  I have then linked the filed to sub report2 using the change links sub report option.

However the sub report is still not filter by the parameter.  Please advise?

Regards

Chris @-)


IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 25 Oct 2016 at 5:34am
I have not tried this, but in the selection formula for the second sub-report, can you put the shared variable in there and use as a filter (by passing setting up a parameter)

i.e.,
Shared stringvar substring;
{fieldtobefiltered}= substring


Edited by kevlray - 25 Oct 2016 at 5:35am
IP IP Logged
chrisfaw
Newbie
Newbie
Avatar

Joined: 26 Apr 2016
Online Status: Offline
Posts: 13
Quote chrisfaw Replybullet Posted: 25 Oct 2016 at 11:34pm
Hi thanks for your reply.

No I tried the above but the 2nd sub report would not allow me to filter by a formula e.g the shared stringvar.

However I have moved some of the above fields to the footer and it seems to be filtering ok now.

Regards

Chris
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.