Strataframe and Report SharpShooter


Author
Message
Marcel Heitlager
Marcel Heitlager
StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)
Group: StrataFrame Users
Posts: 84, Visits: 835
I added the following code to my app based on a suggestion by one of the forum members because of an issue with Perpetuum and Strataframe:

Public Class TransactionReport

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim CardType As String = Me.SetCardType()

If ValidateCardTypes() Then

Me.CreditCardTransReportBBS.FillByDate(Me.dtTransDateFilter.Value, CardType, Me.SchoolPCCDefaultsBO1.School_key)

If Me.CreditCardTransReportBBS.BusinessObject.Count > 0 Then

MsgBox("Prepare")

TransReport.Prepare()

MsgBox("End Prepare")

Else

With InfoBox.NotifyBoxSettings

.SpecialEffect = InfoBoxSpecialEffect.Fade

.Sound = MessagingSounds.Notify

End With

InfoBox.NotifyBox("No Records", "There are no " + CardType + " transactions " _

& " on " + Me.dtTransDateFilter.Value.ToShortDateString.ToString + " " _

& "for " + Trim(Me.SchoolPCCDefaultsBO1.School_name) + ".")

End If

End If

End Sub

Private Sub TransReport_RenderCompleted(ByVal sender As Object, ByVal e As System.EventArgs) Handles TransReport.RenderCompleted

MsgBox("TransREport_rendercompleted")

Dim NewThread As Thread = New Thread(New ThreadStart(AddressOf GenReport))

NewThread.SetApartmentState(ApartmentState.STA)

NewThread.Start()

End Sub

Sub GenReport()

MsgBox("GenReportStart")

Thread.Sleep(0)

Dim previewForm As PerpetuumSoft.Reporting.View.PreviewForm

previewForm = New PerpetuumSoft.Reporting.View.PreviewForm(TransReport)

previewForm.WindowState = FormWindowState.Maximized

'previewForm.ShowDialog(Me)

previewForm.ShowDialog()

MsgBox("PreviewForm.ShowDialog.Done")

If Not (previewForm Is Nothing) Then

previewForm.Dispose()

End If

End Sub

End class

When generating the report it shows the first prepare message and end prepare message.  But then nothing happens.  The program continues as if everything's fine.  It seems to never call the transreport_rendercompleted sub.  The Rendercompleted message should show up after end prepare message. BTW, it works fine on my XP development machine and I end up with a report.  I know this isn't your product but I you guys do have experience with it.  Do you know off hand what it might be, or should I just go to Perpetuum?

Thanks,

Marcel

 


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