Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Parameter Set to ALL ingnores Select Expert script Post Reply Post New Topic
Author Message
Cervello
Newbie
Newbie


Joined: 18 Jul 2014
Online Status: Offline
Posts: 26
Quote Cervello Replybullet Topic: Parameter Set to ALL ingnores Select Expert script
    Posted: 17 Dec 2015 at 4:48am
I have a issue with one of my reports. The report is using a view as it's source.

There are two sub reports and I'm passing parameters from parent to sub. When I set the department parameter value to ALL I get records that fall outside the date range set in the select expert.

If I set the paramter for department to specifc department values I get the correct data.

When I look at the SQL when the report is set to ALL it ignores the select statement all together, where as it is included in the SQL when I specify a specific department.

Any ideas....Help please !!!

Cervello
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2015 at 6:04am
what is your select statement now?
IP IP Logged
Cervello
Newbie
Newbie


Joined: 18 Jul 2014
Online Status: Offline
Posts: 26
Quote Cervello Replybullet Posted: 17 Dec 2015 at 6:58am
The primary report is:

((if {?Report Type} = "Verification" then {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Verification v2") or
(if {?Report Type} = "Full Call" then {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Full Call Review v2")) and
{vwIRCMSQuestionnaireForms.VoiceLeadID} <> "" and
if {?Department} = 'All' then {vwIRCMSQuestionnaireForms.Department}= {vwIRCMSQuestionnaireForms.Department}
else {vwIRCMSQuestionnaireForms.Department} = {?Department} and
{vwIRCMSQuestionnaireForms.RecordingDate} >= {@Start Date} and
{vwIRCMSQuestionnaireForms.RecordingDate} <= {@End Date}


The sub report is:

({vwIRCMSQuestionnaireForms.VoiceLeadID} = {?Pm-vwIRCMSQuestionnaireForms.VoiceLeadID}) and
((if {?Report Type} = "Verification" then {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Verification v2") or
(if {?Report Type} = "Full Call" then {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Full Call Review v2")) and
{vwIRCMSQuestionnaireForms.VoiceLeadID} <> "" and
if {?Pm-?Department} = 'All' then {vwIRCMSQuestionnaireForms.Department}= {vwIRCMSQuestionnaireForms.Department}
else {vwIRCMSQuestionnaireForms.Department} = {?Pm-?Department} and
{vwIRCMSQuestionnaireForms.ScoringDateTime} >= {?Pm-@Start Date} and
{vwIRCMSQuestionnaireForms.ScoringDateTime} <= {?Pm-@End Date}
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2015 at 7:07am
for your main try:
(
({?Report Type} = "Verification" and {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Verification v2" )
or
({?Report Type} = "Full Call" and {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Full Call Review v2")
)
and
{vwIRCMSQuestionnaireForms.VoiceLeadID} <> ""
and
(
{?Department} = 'All'
or
{vwIRCMSQuestionnaireForms.Department} = {?Department}
)
and
{vwIRCMSQuestionnaireForms.RecordingDate} in {@Start Date} to {@End Date}


sub report try:
{vwIRCMSQuestionnaireForms.VoiceLeadID} = {?Pm-vwIRCMSQuestionnaireForms.VoiceLeadID}
and
(
({?Report Type} = "Verification" and {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Verification v2")
or
({?Report Type} = "Full Call" and {vwIRCMSQuestionnaireForms.QuestionnaireName} = "OB-CT QA Full Call Review v2")
)
and
{vwIRCMSQuestionnaireForms.VoiceLeadID} <> "" and
(
{?Pm-?Department} = 'All'
or
{vwIRCMSQuestionnaireForms.Department} = {?Pm-?Department}
)
and
{vwIRCMSQuestionnaireForms.ScoringDateTime} in {?Pm-@Start Date} to {?Pm-@End Date}
IP IP Logged
Cervello
Newbie
Newbie


Joined: 18 Jul 2014
Online Status: Offline
Posts: 26
Quote Cervello Replybullet Posted: 18 Dec 2015 at 4:41am
I tried these changes but it did not fix the issue. As a work around I took out the parameter and hard coded the departments. Luckly this is a schedule report and I can create seperate instances as needed for that value.
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.029 seconds.