Friday 14 March 2014

direct report open

EX:
Step1:

class DNGRMRentalQuotationReportController extends SrsReportRunController
{
    #define.ReportName('DNRentalQuotationReport.LineReport')
    SalesQuotationTable salesQuotationTable ;
 }


Step 2: 
public void setRange(Args _args, Query _query)
{
    QueryBuildDataSource qbds;
    QueryBuildRange qbr;
    if (_args && _args.dataset())
    {
        switch(_args.dataset())
        {
            case tableNum(SalesQuotationTable) :
                SalesQuotationTable = _args.record();
                break;
        }
    }
    qbds = _query.dataSourceTable(tableNum(SalesQuotationTable));
    qbds.clearRanges();
    qbr = qbds.findRange(fieldName2id(tableNum(SalesQuotationTable),fieldStr(SalesQuotationTable, QuotationId)));
    if (!qbr)
    {
        qbr = qbds.addRange(fieldNum(SalesQuotationTable, QuotationId));
    }
    if(SalesQuotationTable)
    {
        qbr.value(SalesQuotationTable.QuotationId);
    }
}

Step 3: 

public static DNGRSSalesQuotationReportController construct(Args _args)
{
    DNGRSSalesQuotationReportController controller=new DNGRSSalesQuotationReportController();
    controller.parmArgs(_args);
    return controller;
}

Step4 :

public static void main(Args _args)
{
    DNGRMRentalQuotationReportController controller = new DNGRMRentalQuotationReportController();
    controller.parmReportName(#ReportName);
    controller.parmArgs(_args);
    controller.setRange(_args, controller.parmReportContract().parmQueryContracts().lookup(controller.getFirstQueryContractKey()));
    controller.parmShowDialog(false); 
    controller.startOperation();
 }

No comments:

Post a Comment

SQL/SSRS Interview questions I thought of blogging some SQL/SSRS interview questions.

Below are some. I will add more, when I complete the compilation 1. What is OLTP(Online Transaction Processing)? OLTP stands ...