How can be Display data of two diffrent comapany in a single report .

Hello ,

How can be Display data of two diffrent comapany in a single report .

I want to show two different company’s data from my single report means when user click report it will show two report with different comapnay’s data .

Thanks

Hi Verma,

you can use the “changecompany”,

changecompany(‘company1’)

{

select Table…

}

changecompany(‘company2’)

{

select Table…

}

Thanks,

valeru.

or directly you can declare the “CrossCompany” in the select statement. have a look at the following sample code.

static void JobDemoCrossCompany(Args _args)
{
BankAccountTable tabBAT; // saveDataPerCompany == true.
container conCompanies = [ ‘cm1’, ‘cm2’, ‘dat’ ];
str 4 sCompanyPrevious = " "; // Maximum length is 4 characters.
int iCountCompanies = 0;
;
while select
crossCompany
: conCompanies

  • from tabBAT
    order by dataAreaId
    {
    if ( sCompanyPrevious != tabBAT .dataAreaId )
    {
    info( tabBAT .dataAreaId + " = tabBAT .dataAreaId" );
    iCountCompanies++;
    if ( iCountCompanies >= 2 )
    {
    break;
    }
    sCompanyPrevious = tabBAT .dataAreaId;
    }
    }
    return;
    }

Thanks to both of you …

Now my requirement is diffrent now i want to display report according to company parameter means when dialog open user select company (it can be more then one means multiselect in company field ) it will show report according to selection of parameter means user select 2 companies it will show report in diffrent window with diffrent company data .

Again thanks in advance