FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour diseñador de informes Reportman
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
diseñador de informes Reportman
Posted: Wed Feb 27, 2013 07:06 PM

Hola amigos,

¿Alguno usa este?

http://reportman.sourceforge.net/indexes.html

Muchas gracias.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: diseñador de informes Reportman
Posted: Wed Feb 27, 2013 09:13 PM

Excelente generador de reportes, por donde quieres empezar ?

Slds,

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: diseñador de informes Reportman
Posted: Wed Feb 27, 2013 09:55 PM

Hola Nicanor,

¿Lo has conseguido llamar y utilizar desde Harbour?.

Muchas gracias.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 03:31 AM

puedes usarlo a traves de una conexion oledb con el motor de advantage sever o local.

slds

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 12:11 PM

Hola,

Muchas gracias por la respuesta.

¿Podrías por favor al menos poner un .exe de ejemplo, con Fivewin?.

Si quieres hablamos en privado acerca del precio del código fuente para usarlo desde Harbour, gracias.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 02:17 PM
Lucas,

Reportman permite ser usuado con cualquier motor de base de datos ODBC u OLEDB, para el caso de harbour y advantade server o local instalo el contrlador odbc y oledb que puedes descargar en http://devzone.advantagedatabase.com


comparto el código y hablamos en privado cualquier otro detalle que te pueda ayudar con tu implementacion este es un ejemplo adapatado para Tdolphin para mysql para facilitar la distibucion de reportes en entornos cliente servidor yo los guardo en la base de datos.

Mañana comparto un ejemplo usando tablas DBF usando avantage local, el mismo ejemplo aplicaría para advantage server

Code (fw): Select all Collapse
//--------------------------------------------------------//

Function Reportman_Empresas( cCual )
Local cCon, oQry


   HCONN := 'Provider=MSDASQL.1;Password=sistemas;Persist Security Info=True;' + ;
            'User ID=sistemas;Extended Properties="Driver={MySQL ODBC 5.1 Driver};' + ;
            'Server='+HSERVER+';DefaultDatabase='+HDBNAME+';Database='+HDBNAME+';' + ;
            'Port=3306;User=sistemas;Option=3"'


      DEFAULT cCual := "E"

        do case
         case cCual == "E"
            cTitulo := "Listado de Empresas"
         case cCual == "T"
            cTitulo := "Listado de Terceros"
         case cCual == "D"
            cTitulo := "Listado de Entidades"
         case cCual == "A"
            cTitulo := "Listado de Aseguradoras"
         case cCual == "C"
            cTitulo := "Listado de Corredores"
    EndCase

      cSql:="Select codemp as CODIGO,nitemp as NIT, nomemp as NOMBRE from empresas where clasemp='"+cCual+"' order by nomemp"
      ???  CRLF+cSql

      oQry := oServer:Query( "Select file,reporte from reportes where reporte='Empresas.rep'" )

     cReportName := SaveReport( oQry )

     if ! file( cReportName )
        
       MsgStop("Error al descargar reporte")
       Return
        
      Endif 

      TRY

        oReport := createobject("Reportman.ReportManX")

        oReport:Filename        := cReportName //HDRIVE+HDIR+"\empresas.rep"
        oReport:Preview         := .t.
        oReport:ShowPrintDialog := .t.
        oReport:Title           := "Sistema de Reportes: "+cTitulo
        oReport:ShowProgress    := .t.
        oReport:SetDatasetSQL("EMPRESAS",cSql)
        oReport:SetParamValue("TITULOINFORME",cTitulo)
        oReport:SetParamValue("ADOCONNECTIONSTRING",HCONN)

//      msginfo(oReport:GetParamValue("ADOCONNECTIONSTRING"))

        oReport:Execute()

      CATCH oErr

           ShowError( oErr )

        END

      SET DATE ANSI

return nil


//----------------------------------//

Static Function SaveReport( oQry )

   LOCAL nHandle, hWnd:=GetActiveWindow()
   LOCAL cDir := GetEnv("TEMP")

   cursorwait()

    cFilename := AllTrim( oQry:reporte )

   nHandle := FCreate( cDir + "\" + cFilename )

   IF FError() # 0

         RETURN

   ENDIF

   FWrite( nHandle, oQry:file, Len( oQry:file ) )
   FClose( nHandle )

    cursorarrow()
        
RETURN cDir +"\"+cFileName

cadena de conexion en Reportman Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;DefaultDatabase=controles;Database=controles;Port=3306;User=*****;Option=3
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 02:30 PM
Este es el reporte, puedes copiar el codigo y guardarlo como .rep


Code (fw): Select all Collapse
object TRpReport
  PageOrientation = rpOrientationLandscape
  PageHeight = 8120
  PageWidth = 5742
  PageBackColor = 16777215
  SubReports = <
    item
      SubReport = TRpSubReport0
    end>
  DataInfo = <
    item
      Alias = 'EMPRESAS'
      DatabaseAlias = 'CONTROLES'
      SQL = 'Select * from empresas'
    end
    item
      Alias = 'DOCUMENTOS'
      DatabaseAlias = 'CONTROLES'
      SQL = 'select * from document'
    end>
  DatabaseInfo = <
    item
      Alias = 'CONTROLES'
      LoadParams = True
      LoadDriverParams = True
      LoginPrompt = False
      Driver = rpdataado
      ReportTable = 'REPMAN_REPORTS'
      ReportSearchField = 'REPORT_NAME'
      ReportField = 'REPORT'
      ReportGroupsTable = 'REPMAN_GROUPS'
      ADOConnectionString = 
        'Provider=MSDASQL.1;Password=********;Persist Security Info=True;' +
        'User ID=sistemas;Extended Properties="Driver={MySQL ODBC 5.1 Dri' +
        'ver};Server=127.0.0.1;DefaultDatabase=controles;Database=control' +
        'es;Port=3306;User=sistemas;Option=3"'
    end>
  Params = <
    item
      Name = 'TITULOINFORME'
      AllowNulls = False
      Value = 'Reporte por Empresa'
      SearchDataset = 'EMPRESAS'
      SearchParam = 'TITULOINFORME'
      Description = ''
      Hint = ''
      Search = ''
      ErrorMessage = ''
      Validation = ''
    end
    item
      Name = 'ADOCONNECTIONSTRING'
      AllowNulls = False
      Value = 
        'Provider=MSDASQL.1;Password=sistemas;Persist Security Info=True;' +
        'User ID=sistemas;Extended Properties="Driver={MySQL ODBC 5.1 Dri' +
        'ver};Server=127.0.0.1;DefaultDatabase=controles;Database=control' +
        'es;Port=3306;User=sistemas;Option=3"'
      Datasets.Strings = (
        'DOCUMENTOS'
        'EMPRESAS')
      SearchDataset = 'DOCUMENTOS'
      SearchParam = 'ADOCONNECTIONSTRING'
      Description = ''
      Hint = ''
      Search = ''
      ErrorMessage = ''
      Validation = ''
    end>
  StreamFormat = rpStreamText
  ReportAction = []
  Type1Font = poHelvetica
  WFontName = 'Arial'
  LFontName = 'Helvetica'
  object TRpSubReport0: TRpSubReport
    Sections = <
      item
        Section = TRpSection1
      end
      item
        Section = TRpSection0
      end
      item
        Section = TRpSection2
      end>
    Alias = 'EMPRESAS'
  end
  object TRpSection0: TRpSection
    Width = 14130
    Height = 255
    SubReport = TRpSubReport0
    ChangeBool = False
    PageRepeat = False
    SkipPage = False
    AlignBottom = False
    SectionType = rpsecdetail
    Components = <
      item
        Component = TRpExpression2
      end
      item
        Component = TRpExpression0
      end
      item
        Component = TRpExpression1
      end
      item
        Component = TRpExpression3
      end>
    ExternalTable = 'REPMAN_REPORTS'
    ExternalField = 'REPORT'
    ExternalSearchField = 'REPORT_NAME'
    StreamFormat = rpStreamText
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    ChangeExpression = ''
    BeginPageExpression = ''
    ChangeExpression = ''
    SkipExpreV = ''
    SkipExpreH = ''
    SkipToPageExpre = ''
    BackExpression = ''
    Stream = {0000000000000000}
  end
  object TRpSection1: TRpSection
    Width = 14145
    Height = 1305
    SubReport = TRpSubReport0
    ChangeBool = False
    PageRepeat = False
    SkipPage = False
    AlignBottom = False
    SectionType = rpsecpheader
    Components = <
      item
        Component = TRpShape0
      end
      item
        Component = TRpExpression4
      end>
    ExternalTable = 'REPMAN_REPORTS'
    ExternalField = 'REPORT'
    ExternalSearchField = 'REPORT_NAME'
    StreamFormat = rpStreamText
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    ChangeExpression = ''
    BeginPageExpression = ''
    ChangeExpression = ''
    SkipExpreV = ''
    SkipExpreH = ''
    SkipToPageExpre = ''
    BackExpression = ''
    Stream = {0000000000000000}
  end
  object TRpSection2: TRpSection
    Width = 14160
    Height = 1701
    SubReport = TRpSubReport0
    ChangeBool = False
    PageRepeat = False
    SkipPage = False
    AlignBottom = False
    SectionType = rpsecpfooter
    Components = <>
    ExternalTable = 'REPMAN_REPORTS'
    ExternalField = 'REPORT'
    ExternalSearchField = 'REPORT_NAME'
    StreamFormat = rpStreamText
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    ChangeExpression = ''
    BeginPageExpression = ''
    ChangeExpression = ''
    SkipExpreV = ''
    SkipExpreH = ''
    SkipToPageExpre = ''
    BackExpression = ''
    Stream = {0000000000000000}
  end
  object TRpExpression2: TRpExpression
    Width = 4200
    Height = 264
    PosX = 2190
    PosY = 0
    Type1Font = poHelvetica
    FontSize = 8
    AutoExpand = False
    AutoContract = False
    ExportPosition = 0
    ExportSize = 1
    ExportDoNewLine = False
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    WFontName = 'Arial'
    LFontName = 'Helvetica'
    Expression = 'EMPRESAS.nomemp'
    DisplayFormat = ''
    ExportDisplayFormat = ''
    AgIniValue = '0'
    ExportExpression = ''
  end
  object TRpExpression0: TRpExpression
    Width = 2100
    Height = 264
    PosX = 0
    PosY = 0
    Type1Font = poHelvetica
    FontSize = 8
    AutoExpand = False
    AutoContract = False
    ExportPosition = 0
    ExportSize = 1
    ExportDoNewLine = False
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    WFontName = 'Arial'
    LFontName = 'Helvetica'
    Expression = 'EMPRESAS.nitemp'
    DisplayFormat = ''
    ExportDisplayFormat = ''
    AgIniValue = '0'
    ExportExpression = ''
  end
  object TRpExpression1: TRpExpression
    Width = 4200
    Height = 264
    PosX = 7470
    PosY = 0
    Type1Font = poHelvetica
    FontSize = 8
    AutoExpand = False
    AutoContract = False
    ExportPosition = 0
    ExportSize = 1
    ExportDoNewLine = False
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    WFontName = 'Arial'
    LFontName = 'Helvetica'
    Expression = 'EMPRESAS.diremp'
    DisplayFormat = ''
    ExportDisplayFormat = ''
    AgIniValue = '0'
    ExportExpression = ''
  end
  object TRpExpression3: TRpExpression
    Width = 2100
    Height = 264
    PosX = 12075
    PosY = 0
    Type1Font = poHelvetica
    FontSize = 8
    AutoExpand = False
    AutoContract = False
    ExportPosition = 0
    ExportSize = 1
    ExportDoNewLine = False
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    WFontName = 'Arial'
    LFontName = 'Helvetica'
    Expression = 'EMPRESAS.telemp'
    DisplayFormat = ''
    ExportDisplayFormat = ''
    AgIniValue = '0'
    ExportExpression = ''
  end
  object TRpShape0: TRpShape
    Width = 14145
    Height = 225
    PosX = 0
    PosY = 1035
    PenWidth = 0
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
  end
  object TRpExpression4: TRpExpression
    Width = 8280
    Height = 585
    PosX = 4020
    PosY = 225
    Type1Font = poHelvetica
    FontSize = 15
    FontStyle = 1
    Alignment = 4
    AutoExpand = False
    AutoContract = False
    ExportPosition = 0
    ExportSize = 1
    ExportDoNewLine = False
    PrintCondition = ''
    DoBeforePrint = ''
    DoAfterPrint = ''
    WFontName = 'Arial'
    LFontName = 'Helvetica'
    Expression = 'M.TITULOINFORME'
    DisplayFormat = ''
    ExportDisplayFormat = ''
    AgIniValue = '0'
    ExportExpression = ''
  end
end
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 02:40 PM

Tengo una duda , pero tienes que colocar alguna libreria para compilar con harbour fivewin.
seria posible hacer el llamado del designer , algo parecido con Fastreport solamente se usa una DLL
Que archivos habria que copiar para que se ejecute en estaciones de trabajo.

Saludos

Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 03:16 PM

Solo debes registar el OCX y copiarlo donde esta la aplicacion el system32, el Designer no tiene esa funcionabilidad si lo necesitas lo instalas en el cliente y lo llamas haciendo un llamado con un shellexecute(.....) asociando los .rep al designer

registar el ocx con

regsvr32 reportman.ocx

Slds

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 07:26 PM

Saludos , Gracias por tu informacion.

Nicanor , si hago el regsvr32 reportman.ocx en la estacion de trabajo, no se requiere instalar el Reportman enla estacion de trabajo.

Gracias

Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 07:48 PM

Ruben,

No es necesario instalar el diseñador solo registrar el Ocx, lo que si debes instalar en cada estacion es el conector ODBC u OLEDB, no es necesario crear un DSN si configuras correctamente la cadena de conexion.

Slds

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Re: diseñador de informes Reportman
Posted: Thu Feb 28, 2013 08:35 PM

Gracias,

Voy hacer mis pruebas.

Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Re: diseñador de informes Reportman
Posted: Mon Mar 04, 2013 08:09 PM

Saludos

Nicanor , podrias colocar el ejemplo con DBF

Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: diseñador de informes Reportman
Posted: Tue Mar 05, 2013 03:52 AM

Ruben,

una vez lo tenga armado lo pongo para la descarga.

SLds

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com

Continue the discussion