Crystal Reports 2011

Crystal Reports 2011

Postby Taavi » Fri Aug 24, 2012 3:08 pm

Hello,
is somebody using Crystal 2011 with xHarbour? They seems to have API for .NET ja Java only.
But I also found crpe23.dll in installation folder,was able to load it in application and even got an meaningful error when trying to load report.

Anybody using CR 2011 with (x)Harbour?
Antonio, could it be possible to use CR .NET or Java API?

Taavi.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: Crystal Reports 2011

Postby Antonio Linares » Mon Aug 27, 2012 8:56 am

Taavi,

Yes, we could use the .NET, you can review FiveNet for an example of use:
http://code.google.com/p/fivenet/

I have seen how to use Java from C in Harbour, not sure if it will also work the same way on Windows. You could try that too:

Code: Select all  Expand view  RUN

#pragma BEGINDUMP

#include <jni.h>

HB_FUNC( YOUR_FUNCTION )
{
   JNIEnv * env = create_vm();
   jclass class = JavaFindClass( env, "myclass" );
   jobject obj = JavaGetClass( env, class );

   ...
}

#pragma ENDDUMP  
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Crystal Reports 2011

Postby Marc Vanzegbroeck » Wed Apr 17, 2013 12:35 pm

Taavi,

Did you succeeded to connect Crystal 2011 with xHarbour?
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Crystal Reports 2011

Postby Marc Vanzegbroeck » Fri Apr 19, 2013 6:40 am

Hi,

Does anyone else use Crystal-Reports 2011 with xHarbour?
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Crystal Reports 2011

Postby fgondi » Fri Apr 19, 2013 8:48 am

Yo uso Crystal report 11 con ADS

Code: Select all  Expand view  RUN
oCRApp         := CreateObject("CrystalRuntime.Application.11")
oCRReport     := oCRApp:OpenReport(cRpt)
oCRDatabase := oCRReport:Database
oCRTables     := oCRDatabase:Tables

oCRTable:= oCRDatabase:Tables(1)
oCRTable:ConnectionProperties:DeleteAll()

oCRDatabase:LogOnServer ('crdb_Ads', "BASE DE DATOS ADD",, cUsuario, cPassword )

For i:= 1 to oCRTables:Count()
  oCRTable:= oCRDatabase:Tables(i)
  oCRTable:SetLogOnInfo( "BASE DE DATOS ADD", , cUsuario, cPassword )
next
oCRReport:EnableParameterPrompting("False")
oCRReport:DiscardSavedData()

//Ejemplo de Parametros si hacen falta
oCRParameterField := oCRReport:ParameterFields
if oCRParameterField:Count() > 0
  oCRParameterField:GetItemByName('pFchIni'):AddCurrentValue( dFchIni )
  ...
endif


//Visor ActiveX
 DEFINE Window oVentHija MDICHILD Title cTitle
 oActiveX := TActiveX():New( oVentHija, "CrystalReports11.ActivexReportViewer.1" )  
 oVentHija:oClient := oActiveX
 oVentHija:cTitle( cTitle )
 oActivex&#058;SetProp( "ReportSource", oCRReport )
 oActiveX&#058;SetProp( "EnableStopButton",     1  )
 oActiveX&#058;SetProp( "EnableAnimationCtrl",  0  )
 oActiveX&#058;SetProp( "EnableCloseButton",    1  )
 oActiveX&#058;SetProp( "EnableExportButton",   1  )
 oActiveX&#058;SetProp( "EnablePopupMenu",      0  )
 oActiveX&#058;SetProp( "EnableRefreshButton",  0  )
 oActiveX&#058;bOnEvent = { | event, aParams | EventInfo( event, aParams, oCRReport, oActivex  ) }

ACTIVATE WINDOW oVentHija;
 ON INIT ( oActiveX&#058;Do( "Viewreport" ) );
 Valid ( oCRDatabase:LogOffServer ('crdb_Ads', "BASE DE DATOS ADD",, cUsuario, cPassWord ), oCRDatabase := NIL, oActiveX := NIL, oCRReport := NIL )


function EventInfo( event, aParams, oCRReport, oActivex )
   local cMsg := cValToChar( event ) //+ CRLF
return cMsg
 
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Re: Crystal Reports 2011

Postby Marc Vanzegbroeck » Fri Apr 19, 2013 9:13 am

Thank you Fernando for the example.

I will try it.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 71 guests