Modify the report design based on parameter values

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

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 .

Is that a typo? the value doesn’t match with the marco you used.

You can simply use contract.getValue(#parameterCustomerGroup).

Hi Krinthi,
I tried but i got below error.
“Parameter Customer group does not exist”.

So does the customer group added as a query range?

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