Para Ivan. Sobre o Report Sharp-Shooter


Author
Message
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Olá Rogério.

Esta mensagem foi reportada no forum do Report Sharp-Shooter também. Porém acho que você encontrou um meio satisfatório de resolver a questão. Como não é algo referente ao StrataFrame, eu te aconselho a postar também no Forum da Perpetuum (http://www.perpetuumsoft.com/Forums.aspx), e certamente poderemos discutir o problema com os desenvolvedores de lá.

Abraços.

Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ivan... Uma maneira que encontrei para evitar o problema foi transferir a chamada do 'previewForm' para uma nova Thread.

Funcionou, mas não sei se essa seria a melhor forma para contornar a questão.

Aguardo seus comentários. Abaixo o código...

        private void inlineReportSlot2_RenderCompleted(object sender, EventArgs e)
        {
            Thread newThread = new Thread(new ThreadStart(Exibe));
            newThread.SetApartmentState(ApartmentState.STA);
            newThread.Start();

        }

        void Exibe()
        {
            Thread.Sleep(0);

            using (PerpetuumSoft.Reporting.View.PreviewForm previewForm = new PerpetuumSoft.Reporting.View.PreviewForm(inlineReportSlot2))
            {
                previewForm.WindowState = FormWindowState.Maximized;
                previewForm.ShowDialog();
            }
 
        }


Rogério Mauri Smile



Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ivan.... A felicidade durou pouco... rs

O problema permanece quando solicito 'exportar' o relatório.

Veja a imagem anexada.

ThreadStateException
  O thread atual deve ser definido no modo STA (single thread apartment) antes que chamadas OLE possam ser feitas. Verifique se a função Main tem STAThreadAttribute marcado. A exceção somente será gerada se um depurador estiver anexado ao processo.

Source     : System.Windows.Forms

Stack Trace:
   em System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)
   em System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
   em PerpetuumSoft.Reporting.View.ReportViewer.ExportReport()
   em PerpetuumSoft.Reporting.View.ReportViewer.ExportEvent(Object sender, EventArgs e)
   em PerpetuumSoft.Reporting.Windows.Forms.Action.ExecuteAction()
   em PerpetuumSoft.Reporting.Windows.Forms.Action.ToolStripItemActionBind.ToolStripItem_Click(Object sender, EventArgs e)
   em System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   em System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   em System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   em System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   em System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   em System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   em System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   em System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   em System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   em System.Windows.Forms.Control.WndProc(Message& m)
   em System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   em System.Windows.Forms.ToolStrip.WndProc(Message& m)
   em System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   em System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   em System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   em System.Windows.Forms.Nativewindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   em System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   em System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   em System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   em System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   em System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   em System.Windows.Forms.Form.ShowDialog()
   em NCClube.PerpetuumReports.Form1.inlineReportSlot2_RenderCompleted(Object sender, EventArgs e) na C:\Users\Rogerio\Documents\Visual Studio 2005\Projects\StrataFrameProjects\NCClube\NCClube\PerpetuumReports\Form1.cs:linha 43
   em PerpetuumSoft.Reporting.Components.ReportSlot.RunRenderCompleted()
   em PerpetuumSoft.Reporting.Components.ReportSlot.OnRenderCompleted()
   em PerpetuumSoft.Reporting.Components.ReportSlotRenderSite.DocumentCompleted(Document document)
   em PerpetuumSoft.Reporting.Rendering.RenderEngine.InternalRenderDocument()
   em System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   em System.Threading.ExecutionContext.runTryCode(Object userData)
   em System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   em System.Threading.ThreadHelper.ThreadStart()


Rogério Mauri Smile



Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Oi Rogério.

Fico contente que tenha encontrado. Qualquer coisa, volte a postar por aqui.

Bom fim de semana. Wink

Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ivan... Questão resolvida....

Encontrei o problema. Estava utilizando o exemplo do help que traz um 'true' no ShowDialog(). Isso causava o erro.

Valeu mesmo assim....

Abraços.

Rogério Mauri Smile



Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
Ivan... Boa Noite...

Conversei hoje com Ricardo sobre um problema que estou encontrando na exibição de relatórios no Report Sharp-Shooter da Perpetuum com StrataFrame BO.

Ricardo retransmitiu o email para você. 

Por gentileza, de um retorno se puder analisar.

Abraços...

Rogério Mauri Smile



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search