You should also note, that this needs a bit more work in terms of getting the correct schednum but it sorts of works.
--- In vantage@yahoogroups.com, "brychanwilliams" <brychanwilliams@...> wrote:
>
> sorry,
>
> I missed out a load of steps , I was looking for a methodology for a bpm.....
>
> But here goes..
>
> Any assemblies need to be copied into the client803\client directory
>
> 1) Copy from C:\Program Files\Business Objects\Common\3.5\managed\
> CrystalDecisions.CrystalReports.Engine.dll
> CrystalDecisions.Shared.dll
>
> To client directory
>
> In the UI customisation
>
> Assembly Reference Manager;
>
> Add the following assemblies
>
> CrystalDecisions.CrystalReports.Engine.dll
> CrystalDecisions.Shared.dll
> Epicor.mfg.ad.reportmonitor
> Epicor.mfg.bo.reportmonitor
> Epicor.mfg.if.ireportmonitor
> Epicor.mfg.coro.blconnectionpool
> Epicor.Mfg.Rpt.IPOForm
> Epicor.Mfg.Rpt.POForm.dll
> Epicor.Mfg.UIRpt.POForm.dll
>
> At the start of the code it should look like this and not was originally posted.
>
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
> Imports Epicor.Mfg.Rpt
> Imports Epicor.Mfg.Rpt.POform
> Imports Epicor.Mfg.Core.BLConnectionPool
> Imports System.Collections
> Imports Epicor.Mfg.BO.Reportmonitor
> Imports CrystalDecisions.CrystalReports.Engine
> Imports CrystalDecisions.Shared
> Imports System.IO
>
>
> --- In vantage@yahoogroups.com, "Sean McDaniel" <smcdanie@> wrote:
> >
> > I was trying to get this code to work, but couldn't figure out the correct
> > assembly reference to include for the CrystalDecisions.CrystalReports.Engine
> > or CrystalDecisions.Shared.
> >
> > Can someone shed some light on this?
> >
> > Thanks,
> > Sean
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> > brychanwilliams
> > Sent: Monday, August 10, 2009 8:04 AM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Transfer UI Customisation to BPM . net
> >
> >
> >
> >
> >
> > Hi,
> >
> > I have seen some recent discussions about using .net in BPM.
> >
> > I have some code, very rough please test before use, which generates
> > generates a pdf of the purchase order. I was just wondering how I could
> > transfer this to a BPM so it automatically emails out the pdf.
> >
> > Thanks in advance.
> >
> > Imports System.Collections
> > Imports Epicor.Mfg.BO.Reportmonitor
> > Imports CrystalDecisions.CrystalReports.Engine
> > Imports CrystalDecisions.Shared
> > Imports System.IO
> >
> > Private Sub btnEpiCustom4_Click(ByVal Sender As Object, ByVal Args As
> > System.EventArgs) Handles btnEpiCustom4.Click
> > '// ** Place Event Handling Code Here **
> > Dim PONum as integer = nedEpiCustom2.value
> > if PONum = 0 then
> > PONum =5000
> > end if
> > Dim workstationID As String = POTrackerForm.Session.WorkstationID
> > Dim UserID As String = POTrackerForm.Session.UserID
> >
> > Dim POAdapter2 As Epicor.Mfg.rpt.POform = New
> > Epicor.Mfg.rpt.POform(POTrackerForm.Session.ConnectionPool)
> >
> > Dim POFound As dataset = POAdapter2.GetNewParameters()
> >
> > POFound.Tables("POFormParam").Rows(0)("PONum") = PONum
> >
> > POFound.Tables("POFormParam").Rows(0)("AgentID") = "SystemTaskAgent"
> >
> > POFound.Tables("POFormParam").Rows(0)("workstationID") = workstationID
> >
> > ugdEpiCustom1.datasource = POFound
> > POAdapter2.Rundirect(POFound)
> >
> > ugdEpiCustom2.datasource = POFound.tables("ReportStyle")
> >
> > Dim REportlistwhereclause as string
> > REportListwhereClause = "WorkStationID = '" & workstationID &"' and
> > DCDUserID = '" & UserID & "'"
> >
> > Dim adapterName As String = "ReportMonitorAdapter"
> > '// Name of the Adapter
> > Dim dtMyReportList As DataTable
> > '// Initialize DataTable object
> >
> > '// ** Create SearchOptions object **
> > Dim opts As SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> >
> > '// ** call method, returns DataSet **
> > Dim dsMyReportList As DataSet
> >
> > '// ** Create Hashtable to hold Where Clauses
> > Dim htREportListWhere As Hashtable = New Hashtable()
> > htREportListWhere.Add("SysRptLst", REportListwhereClause)
> > opts = SearchOptions.CreateRuntimeSearch(htREportListWhere,
> > DataSetMode.RowsDataSet)
> >
> > Dim oREportListRes As Object = ProcessCaller.LaunchSearch(POTrackerForm,
> > adapterName, opts)
> > If (TypeOf( oREportListRes) Is DataSet) Then
> > dsMyReportList = oREportListRes
> >
> > ugdEpiCustom2.datasource = dsMyReportList
> > End If
> >
> > Dim xmlsource as string
> > xmlsource = DsMyReportList.tables(0).Rows(0)("FileName")
> >
> > Dim crReportDocument As
> > CrystalDecisions.CrystalReports.Engine.ReportDocument = New
> > CrystalDecisions.CrystalReports.Engine.ReportDocument()
> >
> > Dim crExportOptions As ExportOptions
> > Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
> > 'crReportDocument = New CrystalReport
> >
> > Dim authorsdataset as new dataset()
> >
> > Dim filePath As String = xmlsource
> > AuthorsDataSet.ReadXml(filePath)
> > ugdEpiCustom2.datasource = AuthorsDataSet
> >
> > crReportDocument.Load("\\chicago\epicor\mfgsys803\Server\reports\Vtesse\vtPO
> > Formv1.rpt")
> > messagebox.show("after")
> > crReportDocument.SetDataSource(AuthorsDataSet)
> > crDiskFileDestinationOptions = New DiskFileDestinationOptions
> > crDiskFileDestinationOptions.DiskFileName = "C:\test.pdf"
> > crExportOptions = crReportDocument.ExportOptions
> > With crExportOptions
> > .DestinationOptions = crDiskFileDestinationOptions
> > .ExportDestinationType = ExportDestinationType.DiskFile
> > .ExportFormatType = ExportFormatType.PortableDocFormat
> > End With
> >
> > crReportDocument.Export()
> >
> > End Sub
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>