In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.
Imports System.Collections Imports System.Collections.Generic Imports System.Text Imports CrystalDecisions Imports CrystalDecisions.CrystalReports Imports CrystalDecisions.CrystalReports.Engine Namespace Test.Utilities Public Class ReportFactory Protected Shared reportQueue As New Queue() Protected Shared Function CreateReport(reportClass As Type) As ReportClass Dim report As Object = Activator.CreateInstance(reportClass) reportQueue.Enqueue(report) Return DirectCast(report, ReportClass) End Function Public Shared Function GetReport(reportClass As Type) As ReportClass '75 is my print job limit. If reportQueue.Count > 75 Then DirectCast(reportQueue.Dequeue(), ReportClass).Dispose() End If Return CreateReport(reportClass) End Function End Class End Namespace
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.