Crystal Report in php - php

How I can create a crystal report in php kindly guide me so that I can make it possible. I have tried a lot of code and tutorials but un-usefull for me.
I have tried
$COM_Object = "CrystalReports12.ObjectFactory.1";
$my_report = "C:\\Report2.rpt";
$ObjectFactory= New COM($COM_Object);
$creport = $ObjectFactory->OpenReport("c:\\report2.rpt", 1);
Here is the error is
Fatal error: Call to undefined method com::OpenReport()
any one can help me i m very thankful for that preson

This may help you.
Use XML + XSL:FO with Apache FOP via PHP-JavaBridge.
Here is how: http://wiki.apache.org/xmlgraphics-fop/HowTo/PHPJavaBridge
PostScript would be nice!

Related

Error generating SVG with phpqrcode

I am trying to execute following code from the SVG basic output example from the docs.
<?php
include('vendors/phpqrcode/qrlib.php');
$svgCode = QRcode::svg('PHP QR Code :)');
echo $svgCode;
All I get is the error:
Fatal error: Call to undefined method QRcode::svg()
/path/to/php/file/index.php on line 1337
The strange thing is that the simple PNG output example works fine without any errors, so the include must be correct.
<?php
include('vendors/phpqrcode/qrlib.php');
QRcode::png('PHP QR Code :)');
Do you guys have an idea what I might have forgot to check? Maybe the error is obvious for you.
As noticed in another thread and I experienced myself, the latest version is at https://github.com/t0k4rt/phpqrcode. With the version there, SVG is implemented and working.

Parse error in php web driver

I have no idea about PHP programming before. Now I am working on selenium using Facebook php web driver. I have just started with very basic test code that is to open pages and click links and so on. But I got stuck just after few lines of code and it shows a parse error. I couldn't find what the parse error is? It would really grateful if someone can help me out. Here is my few lines of code..
<?php
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
require_once 'vendor/Autoload.php';
$host = 'http://localhost:4444/wd/hub'; // this is the default
$capabilities = DesiredCapabilities::firefox();
$driver = RemoteWebDriver::create($host, $capabilities, 5000);
$driver->get('http://qa.practera.com');
$link =$driver>findElement(WebDriverBy::xpath('//a[#href='login']'));
$link->click();
?>
Result:
Parse error: parse error in
/Users/srujanareddyenugala/Desktop/php-webdriver/1.php on line 14
I am an intern and trying to learn by looking at some examples because my mentor just want me to learn by myself. I want to start from basics but they are not giving me enough time and wants me to do just by going through examples and understand. It will be very helpful if someone can help me by giving advices how to learn quickly and also could suggests me with some websites or books or online courses.
Thanks in advance!!
This line
$link =$driver>findElement(WebDriverBy::xpath('//a[#href='login']'));
To
$link =$driver->findElement(WebDriverBy::xpath('//a[#href='login']'));
you are missing a - sign

turning on the dom_xml functionality on php 5

I am trying to implement an store locator using php and mysql and google maps
I have gone through this article "https://developers.google.com/maps/articles/phpsqlajax_v3 "
it says "Check your configuration or try initializing a domxml_new_doc() to determine if your server's PHP has dom_xml functionality on."
But apparantly mine is not on because it is giving me this error :
"Fatal error: Call to undefined function domxml_new_doc() in C:\wamp\www\StoreLocator\phpsqlajax_genxml.php on line 5"
I am using php 5, and I am not sure how I can turn it on.
Please help me with your opinions.
This question might help answer your problems.
Are you sure you want to go down the XML route and not the JSON one?

Problems with my PHP script - newbie fails?

Hey Guys I have a Problem with my PHP Script it doesn't work ...
I don't know why it doesn't work or which skills I have to improove.
I would be thankfull for help
The Code is here : http://pastebin.com/gkFBEJS0
Thanks a loot
Chris
Your first fatal error is easy, you are calling $db->query($db_var_one) and $db is not an object.
It looks like you need $db_cnct_one instead.

PHP script stops without error message (Which error type?)

a PHP script stops without an error message, if I change the signature of a method of a class, which implements a intereface, e.g.:
interface A
{
public function somefunction();
}
class B implements A
{
public function somefunction(XY $xy);
{
...
}
}
This is an error of course, but there is no error message shown.
What is the name of this error type? (I already searched a lot, but with the wrong phrases obviously)
How can I log or output this error?
I'm using PHP 5.3.1 (with XAMPP for Windows 1.7.3)
(I used Zend Debugger with PHP < 5.3 earlier, where those erros were shown in the Eclipse console, but now I'm using XDebug.)
Thanks in advance for any hint!
put at the top of file and then try,
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
?>
If you still getting no output, please check your error_log.
RESOLVED
#ontrack Thanks, your hint directed me to the right direction:
I'm using an autoload function to load required classes (by using spl_autoload_register()). My implemention of my autoloader restrains all error messages... I did not know, that this causes such 'deeper' errors not to show up.
This was at least kind of stupid from my side, but I'm more happy, that I found the reason for this problem and I have learned something :-)
Many thanks to all your contributions! And sorry again, that I cannot edit my initial question anymore.
#outis Thanks, please read my comment
Put the following at the top of your script:
error_reporting(E_ALL);
It should report an error.
Something must be up with your configuration. When I try the sample code under PHP 5.3.2+XDebug 2.1.0, PHP complains:
Fatal error: Declaration of B::somefunction() must be compatible with that of A::somefunction()
The type of error is a substitution violation, since a B can't be substituted for an A in all situations.

Categories