chaitus
December 18, 2016, 6:36pm
1
Hi All,
I have created a query based report with custtable and added PrecisionDesign1,PrecisionDesign2.
Question: Based on the customer group parameter value I want to open the report design.
Ex: If Customer Group ‘10’ open the PrecisionDesign1
else Customer Group ‘20’ open the PrecisionDesign2
I created a “Controller class” with preRunModifyContract(). But its not working.
Please any one help me.
Thanks
Hello Chaitu,
are you getting any error or can you tell us the behavior and what exactly you are passing in this method
chaitus
December 19, 2016, 4:34am
3
Hello Kunal,
Thanks a lot for the replie. I didn’t get any error.
protected void preRunModifyContract()
{
#define .parameterCustomerGroup(‘CustomerGroup’)
str paramValue1;
SrsReportDataContract dataContract = this.parmReportContract();
SrsReportRdlDataContract contract = dataContract.parmRdlContract();
paramValue1 = contract.getValue(#parameterCustomerGroupt ).getValueTyped();
if(paramValue1 ==“10”)
{
dataContract.parmReportName(ssrsReportStr(ch_custtranslist,PrecisionDesign1));
}
else if(paramValue2)
{
dataContract.parmReportName(ssrsReportStr(ch_custtranslist,PrecisionDesign2));
}
}
I didn’t get the value(Customer Group) in paramValue1 .
kranthi
December 19, 2016, 10:32am
4
Is that a typo? the value doesn’t match with the marco you used.
You can simply use contract.getValue(#parameterCustomerGroup ).
chaitus
December 19, 2016, 5:14pm
5
Hi Krinthi,
I tried but i got below error.
“Parameter Customer group does not exist”.
kranthi
December 20, 2016, 6:34am
6
So does the customer group added as a query range?
chaitus
December 20, 2016, 4:48pm
7
Thanks Kranthi for the replie.
Its working,i wrote like this.
contract = this.parmReportContract().parmRdlContract();
paramValue1 = contract.getValue(#parameterCustomerGroup );
if(xxxxx)
this.parmReportContract().parmReportName(ssrsReportStr(CH_CusttransListGroupDesign,PrecisionDesign1));
else