Gentleman, I need to do a report based on contract class with parameters, i dont know what I did wrong, but controller class dont call contract class to get parametrs, below my classes, any suggests are welcome :
class SSRSDemoController extends SrsReportRunController
{
}
protected void prePromptModifyContract()
{
SRDemoContract contract;
FormDataSource fds;
//get the reference of the current contract object
contract = this.parmReportContract().parmRdpContract() as SRDemoContract;
}
public client static void main(Args args)
{
//define the new object for controller class
SSRSDemoController ssrsDemoController = new SSRSDemoController();
//set the report name and report design to run
ssrsDemoController.parmReportName(ssrsReportStr(Oxf_relatorio_vendas_retail,PrecisionDesign1));
//pass the caller args to the controller
ssrsDemoController.parmArgs(args);
//execute the report
ssrsDemoController.startOperation();
}
//Contract Class
class SRDemoContract implements SysOperationValidatable
{
AccountNum vendAccountNum;
TransDate formDate,toDate;
RetailStoreId StoreId;
}
[DataMemberAttribute(‘FromDate’)]
public FromDate parmfromDate(TransDate _formDate = formDate)
{
formDate= _formDate;
return formDate;
}
[DataMemberAttribute(‘StoreId’)]
public RetailStoreId parmStoreId(RetailStoreId _storeid = StoreId)
{
StoreId= _storeid;
return StoreId;
}
[DataMemberAttribute(‘ToDate’)]
public ToDate parmtoDate(TransDate _toDate = toDate)
{
toDate= _toDate;
return toDate;
}
public boolean validate()
{
boolean isValid = true;
if (!formDate)
{
isValid = checkFailed(“Informe a Data Inicial”);
}
if (!toDate)
{
isValid = checkFailed(“Informe a Data Final”);
}
if (isValid && (formDate > toDate))
{
isValid = checkFailed(strfmt(“Data Inicial deve ser menor ou igual a data final!”, date2StrUsr(formDate, DateFlags::FormatAll), date2StrUsr(toDate, DateFlags::FormatAll)));
}
if (!StoreId)
{
isValid = checkFailed(“Informe a loja”);
}
return isValid;
}