SSRS reports not running correctly when executed consecutively.

I have two reports that are setup on print management, each tied to a menu item.  If I run each report individually by clicking the menu item, they execute just fine.  I created a button to run both reports back to back, but when I run it, the second report never gets created.  Is there a wait method or something similar that needs to be called to allow the first report to finish before the second one?

if (_PrReport1)
{
    Args Args1 = new Args();
    Args1.Record(Table1);
    new MenuFunction(menuItemOutputStr(PrintReport1Menu), MenuItemType::Output).run(Args1);
}
if (_PrReport2)
{
    Args Args2 = new Args();
    Args2.Record(Table2);
    new MenuFunction(menuItemOutputStr(PrintReport2Menu), MenuItemType::Output).run(Args2);
}

Regards,

Shawn

Parents
No Data
Reply
  • An update.  It's the first report that disappears.  The first report is a pro-forma invoice using the SalesFormLetter_Invoice class.  If it runs without the second custom SSRS report (rem out the line 11 from above code) following it, it runs fine and a file is created.  If the second report is run after the first, the first does not create a file.  This is the code from the creation of the pro-forma invoice.

    SalesFormLetter_Invoice   SalesformletterInv;
    SalesFormLetterInv.update(salesTableLoc,DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()),
                              SalesUpdate::All,
                              AccountOrder::None,
                              True,     
                              True,     
                              True);    

Children
No Data
Related
Recommended