Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Selection formula from Main report to subreport Post Reply Post New Topic
Author Message
bartolo
Newbie
Newbie


Joined: 03 Oct 2009
Online Status: Offline
Posts: 1
Quote bartolo Replybullet Topic: Selection formula from Main report to subreport
    Posted: 03 Oct 2009 at 9:24pm
Hi,
I have a main report that receives from an application
a selection formula based on criteria chosen by end user.
I have added a sub-report in the footer section for summarize some items.
This sub-report should running on the same range of records of the main report, but this don't happen, it summarize items that are not in the main report.
Unfortunately I cannot modify the application.
Is there a way to pass the actual selection formula or the entire sql statements from main report to sub-report.
I have tested the special field "Record selection formula" in the main report at runtime but it seems
to have only the static formula inserted at design time.

Thanks in advanced.
Best regards
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 05 Oct 2009 at 7:05am

I recently had something similar happen to me...forgot to limit the scope the subreport.  Perhaps you need to pass more links to the subreport to limit the subreport's records to the same grouping as the main report.

 
HTH
IP IP Logged
themessenger
Groupie
Groupie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 48
Quote themessenger Replybullet Posted: 07 Oct 2009 at 5:42am
You need to pass the selection criteria down to the subreport (ie @IDNumber) using the 'Change Subreport Links' when you right click on the report.

In the subreport you would feed the link into the record selection criteria and this should bring back the desired results.

Hope this helps.
Managing Director
www.allmymenus.com
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.031 seconds.