umorx.blogg.se

Imprimir sin vista previa crystal reports
Imprimir sin vista previa crystal reports












imprimir sin vista previa crystal reports
  1. #Imprimir sin vista previa crystal reports code#
  2. #Imprimir sin vista previa crystal reports windows#

#Imprimir sin vista previa crystal reports windows#

He bajado los dlls que dice Raul y los he puesto tanto en la carpeta de c: windows crystal como en c: windows system32 pero a la hora de registrar con regsvr32 el p2ssql.dll me lanza el siguiente error: “p2ssql.dll was loaded, but the DllRegisterServer entry point was not found this file can not be registered” estoy desarrollando un aplicativo en vb6 apuntando a una base de datos SQL Server 2005 Express y el Crystal Report 8.5 El OLE DB Provider que estoy usando es el SQL Native Client. Mil gracias por los intentos de ayuda! Que veo que a algunos les ha funcionado, pero a mi no. M_currentPageIndex += 1 ev.HasMorePages = (m_currentPageIndex. Private Sub Export( ByVal report As LocalReport) Dim deviceInfo As String = ' & _ 'EMF' & _ '8.5in' & _ '11in' & _ '0.25in' & _ '0.25in' & _ '0.25in' & _ '0.25in' & _ ' Dim warnings As Warning() m_streams = New List(Of Stream)() report.Render( 'Image', deviceInfo, AddressOf CreateStream, warnings) For Each stream As Stream In m_streams stream.Position = 0 Next End Sub ' Handler for PrintPageEvents Private Sub PrintPage( ByVal sender As Object, ByVal ev As PrintPageEventArgs) Dim pageImage As New Metafile(m_streams(m_currentPageIndex)) ' Adjust rectangular area with printer margins.ĭim adjustedRect As New Rectangle(ev.PageBounds.Left - CInt(ev.PageSettings.HardMarginX), _ ev.PageBounds.Top - CInt(ev.PageSettings.HardMarginY), _ ev.PageBounds.Width, _ ev.PageBounds.Height) ' Draw a white background for the report ev.Graphics.FillRectangle(Brushes.White, adjustedRect) ' Draw the report content ev.Graphics.DrawImage(pageImage, adjustedRect) ' Prepare for the next page. Private Function CreateStream( ByVal name As String, ByVal fileNameExtension As String, ByVal encoding As Encoding, ByVal mimeType As String, ByVal willSeek As Boolean) As Stream Dim stream As Stream = New MemoryStream() m_streams.Add(stream) Return stream End Function ' Export the given report as an EMF (Enhanced Metafile) file.

imprimir sin vista previa crystal reports imprimir sin vista previa crystal reports

Data.xml') Return dataSet.Tables(0) End Function ' Routine to provide to the report renderer, in order to ' save an image for each page of the report. Dim dataSet As New DataSet() dataSet.ReadXml( '. Imports System Imports System.IO Imports System.Data Imports System.Text Imports System.Drawing Imports Imports Imports Imports Imports Public Class Demo Implements IDisposable Private m_currentPageIndex As Integer Private m_streams As IList(Of Stream) Private Function LoadSalesData() As DataTable ' Create a new DataSet and read sales data file ' data.xml into the first DataTable.

#Imprimir sin vista previa crystal reports code#

The project opens with the Code window showing the Program code file.

  • In the Location box, enter the directory in which you want to save your project, or click Browse to navigate to it.
  • In the Name box, type the name of the project: PrintLocalReport.
  • In the Templates pane, choose Console Application.
  • The C# or Visual Basic node may be under Other Languages, depending on your startup settings in Visual Studio.
  • In the Installed Templates pane, choose C# or Visual Basic.
  • On the File menu, point to New, and then select Project.













  • Imprimir sin vista previa crystal reports