[SOLVED]integrating CI (php+java = reports)

is it possible in CI to work php + java . I'm trying to build a report using php but to display its format(html or xls, etc..) i used some java codes inside the php file and it works Smile but when i tried to CI a FATAL ERROR occured. Sad. I just used controller and the view for this.
My view.php
$myReport = "receipt_report2.rptdesign";

// load resources, .rpt files and images from the current working dir
$here = getcwd();

$ctx = java_context()->getServletContext();
$birtReportEngine =        java("org.eclipse.birt.php.birtengine.BirtEngine")->getBirtEngine($ctx);

// Create a HTML render context
$renderContext = new java ("org.eclipse.birt.report.engine.api.HTMLRenderContext");
$contextMap = new java("java.util.HashMap");
$CONTEXT = java("org.eclipse.birt.report.engine.api.EngineConstants")->APPCONTEXT_HTML_RENDER_CONTEXT;
$contextMap->put($CONTEXT, $renderContext );

// Load the report design
$design = $birtReportEngine->openReportDesign("${here}/${myReport}");
$task = $birtReportEngine->createRunAndRenderTask( $design );
$task->setAppContext( $contextMap );

// Add HTML render options
$options = new java("org.eclipse.birt.report.engine.api.HTMLRenderOption");

// Create the output
$out = new java("java.io.ByteArrayOutputStream");
$task->run ();

// Return the generated output to the client
echo (string)$out;

also is it possible to call the myview outside CI directory but using the CI controller?


finally solved it.

[quote author="kikz4life" date="1258700081"]finally solved it.[/quote]

hi kikz4life ..

how u solved it ??

I at the same trouble ..

Thx alot before ..


just used html frames in the view then call it to your controller.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.