public bool Cancel(int millisecondsTimeout)
 {
     if (IsRendering)
     {
         try
         {
             AsyncReportOperation operation = m_operation;
             if (operation != null && !operation.Abort())
             {
                 m_cancelInProgress = true;
                 // TODO: Find a way to access Microsoft.ReportingServices.OnDemandProcessing.AbortHelper here
                 //m_backgroundThread.Abort();
                 //millisecondsTimeout = 0;
             }
         }
         catch (ThreadStateException)
         {
             if (IsRendering)
             {
                 throw;
             }
         }
         if (millisecondsTimeout != 0)
         {
             return(m_backgroundThread.Join(millisecondsTimeout));
         }
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 public bool Cancel(int millisecondsTimeout)
 {
     if (IsRendering)
     {
         try
         {
             AsyncReportOperation operation = m_operation;
             if (operation != null && !operation.Abort())
             {
                 millisecondsTimeout = 0;
             }
         }
         catch (ThreadStateException)
         {
             if (IsRendering)
             {
                 throw;
             }
         }
         if (millisecondsTimeout != 0)
         {
             return(m_backgroundThread.Join(millisecondsTimeout));
         }
         return(false);
     }
     return(true);
 }