Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Open two design same time in customize SSRS report

Posted on by 385

Dear All

I have make a report with two design, 

I want to show two design same time of a report,

I mean  when click on output menu then show to two design same time

how to do it 

please help  me 

Thanks 

*This post is locked for comments

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Open two design same time in customize SSRS report

    Seems you are lost in code. You were not supposed to write any code in existing controller classes. you were supposed to call controller classes by writing job or by using any clicked() method. find below sample job to run sales invoice report by code. Note that I am taking firstonly record of journal for demonstration purpose. You'll pass context as per your need. Also you can find many code samples about how to call a report by code.

    static void SampleRunReportByCode(Args _args)
    {
        SrsReportDataContract contract;
        SalesInvoiceContract  rdpContractClass;
        CustInvoiceJour       tblCustInvoiceJour;
        LogisticsAddressCountryRegionISOCode code = 'US';
    
        // Create a controller to run the report.
        SrsReportRunController controller = new SrsReportRunController();
    
        // set the report name and design to be run
        controller.parmReportName(ssrsReportStr(SalesInvoice, Report));
    
        // suppress the parameter dialog as this is to be run by the batch service
        controller.parmShowDialog(false);
    
        // choose to save the executed report as a pdf file
        //reportFilePath = System.IO.Path::Combine(this.getTempPath(), ssrsReportStr(SalesInvoice, Report) + #FileExtensionPDF);
        //this.setReportRunControllerPrintToFile(controller, reportFilePath);
    
        // Set any required parameter values here by first getting the report contract.
        contract = controller.parmReportContract();
    
        // And then fill in that contract based on the contract type (Rdl or Rdp)
    
        // Example of using an Rdp class specific data contract
        rdpContractClass = contract.parmRdpContract() as SalesInvoiceContract;
    
        // Set the required parameter
        rdpContractClass.parmCountryRegionISOCode(code);
        tblCustInvoiceJour.clear();
        select firstOnly RecId from tblCustInvoiceJour;
        rdpContractClass.parmRecordId(tblCustInvoiceJour.RecId);
    
        // run the report
        controller.runReport();
    }
  • Azam  Profile Picture
    Azam 385 on at
    RE: Open two design same time in customize SSRS report

    Dear Ali Raza Zaidi

    this code snippet is perform in controller main method ?

    when  I use in main method  then error show super() not allowed here

    this is my main method

    public static client void main(Args args)

    {

    BBFlockwiseController controller = new BBFlockwiseController();

    BBFlockwiseController controller1 =  new BBFlockwiseController();

    SRSPrintDestinationSettings     settings;

    super();

    controller.parmReportName(ssrsReportStr(BBFlockCostingReport,summary));  controller.parmReportName(ssrsReportStr(BBFlockCostingReport,summary)) ;

       controller.startOperation();

       controller1.parmReportName(ssrsReportStr(BBFlockCostingReport,summary));  controller.parmReportName(ssrsReportStr(BBFlockCostingReport,PrecisionDesign1)) ;

    controller1.startOperation();

    }

  • Ali Zaidi Profile Picture
    Ali Zaidi 4,657 on at
    RE: Open two design same time in customize SSRS report

    Hi Azam you can run two report design with following code snippet.

    SrsReportRunController          controller1 = new SrsReportRunController();

    SrsReportRunController          controller2 = new SrsReportRunController();

    SRSPrintDestinationSettings     settings;

    super();

    controller1.parmReportName(ssrsReportStr(CustomerReport,Design1));

    controller1.startOperation();

    controller2.parmReportName(ssrsReportStr(CustomerReport,Design2));

    controller2.startOperation();

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Open two design same time in customize SSRS report

    You can call reports by code. Doing so you can call two controller classes which will basically open two reports. Having  followed previously suggested practice, will make sure that two reports will open at same time, without closing the other.

  • Azam  Profile Picture
    Azam 385 on at
    RE: Open two design same time in customize SSRS report

    so how to open two design in two report viewer , click on single output menu

    , only one design  specify in controller

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Open two design same time in customize SSRS report

    No, you will not set two designs in dialogshow()

    In fact there is no subject/description about any design in dialogshow()

    you specify your designs in controller class usually or at time of calling report.

    I have NOT specified any where in blog post to use design name in dialogshow()

  • Azam  Profile Picture
    Azam 385 on at
    RE: Open two design same time in customize SSRS report

    please send me any example, how to set two design in dialogShow()

  • Suggested answer
    Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Open two design same time in customize SSRS report

    You may have a look at next blog post

  • Azam  Profile Picture
    Azam 385 on at
    RE: Open two design same time in customize SSRS report

    Dear  Sohaib Cheema

    yes I want print two design in different instances of report viewer

    please tell me how is it

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Open two design same time in customize SSRS report

    This is possible if you want to print two design in different instances of report viewer. The two design will open at same time on screen but in different panes(report viewers)

    Because a single call gives you single instance of report viewer, in ax.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans