Controller Class :
class ProjHourUtilisationController extends SrsReportRunController
{
#define.ReportName('ProjHourUtilisation.PrecisionDesign1')
ProjHourUtilisationContract
projHourUtilisationContract;
ProjTable projTable ;
}
protected void prePromptModifyContract()
{
if (this.parmArgs() &&
this.parmArgs().record() &&
this.parmArgs().dataset() == tableNum(ProjTable))
{
projTable = this.parmArgs().record();
}
if (!projHourUtilisationContract)
{
projHourUtilisationContract =
this.parmReportContract().parmRdpContract();
}
projHourUtilisationContract.parmProjectId(projTable.ProjId);
super();
}
public void setRange(Args _args, Query
_query)
{
QueryBuildDataSource qbds;
QueryBuildRange qbr;
if (_args && _args.dataset())
{
switch(_args.dataset())
{
case tableNum(ProjTable) :
projTable = _args.record();
break;
}
}
qbds = _query.dataSourceTable(tableNum(ProjTable));
qbds.clearRanges();
//qbr =
qbds.findRange(fieldName2id(tableNum(ProjTable),fieldStr(ProjTable, ProjId)));
if (!qbr)
{
qbr = qbds.addRange(fieldNum(ProjTable, ProjId));
}
if(ProjTable)
{
qbr.value(projTable.ProjId);
}
}
public boolean showQueryValues(str parameterName)
{
return true;
}
public static ProjHourUtilisationController
construct(Args _args)
{
ProjHourUtilisationController
controller=new ProjHourUtilisationController();
controller.parmArgs(_args);
return controller;
}
public static void main(Args _args)
{
ProjHourUtilisationController
controller = new ProjHourUtilisationController();
controller.parmReportName(#ReportName);
controller.parmArgs(_args);
controller.setRange(_args,
controller.parmReportContract().parmQueryContracts().lookup(controller.getFirstQueryContractKey()));
controller.parmShowDialog(true);
controller.startOperation();
}
No comments:
Post a Comment