Pages

Banner 468 x 60px

 

Wednesday, November 22, 2017

controller in SSRS

0 comments
controller in SSRS :

protected void prePromptModifyContract()
{
#ISOCountryRegionCodes
DeliveryOrderContract contract;
TECDeliveryOrderTable TECDeliveryOrderTable;
FormDataSource fds;
str range;
;

contract = this parmReportContrat().parmRDPContract() as TECDeliveryOrderTable;
TECDeliveryOrderTable = args.record();
fds = args.record().datasource();

contract
}


How does your class look like?

Just to be sure, I'll show you a step by step

1. You create a class which extends from SrsReportRunController. Then you define a macro with the report name and the Data Contract class.

class forecastController extends SrsReportRunController
{
   #define.ReportName("Report.DesignName")
   forecastContract   dataContract;
}

2. Next you create a main method

public static client void main(args _args)
{
   forecastController controller = new forecastController();

   controller.parmReportName(#ReportName);
   controller.parmArgs(_args);
   controller.startOperation();
}

3. Now you override the prePromptModifyContract method

protected void prePromptModifyContract()
{
   args   Args;

   super();

   Args = this.parmArgs();

   dataContract = this.parmReportContract().parmRdpContract();
   dataContract.parmProjid(Args.record().(fieldnum(forecastTable, Projid)));
}

4. Then you create a Menu Item and choose the Controller class as the object

5. On the form you create a new Menut Item button and set the property "CopyCallerQuery" to "Yes". Then you choose the created Menu Item as the MenuItemName for the button.

That should make it work then.

0 comments:

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH