Code Monkey home page Code Monkey logo

crystal-reports-11.5-with-php-and-mysql's Introduction

Crystal-Reports-11.5-with-PHP-and-MySQL

Crystal Reports 11.5 with PHP and MySQL 17

I am new to Crystal Reports, and I am using version Crystal Reports 11.5.

This is what I have so far:

$my_report = "E:\xampp\htdocs\crystal\Test1.rpt";

$my_pdf = "E:\xampp\htdocs\crystal\test.pdf";

$o_CrObjectFactory = new COM('CrystalReports11.ObjectFactory.1');

// Create the Crystal Reports Runtime Application.

$o_CrApplication =$o_CrObjectFactory->CreateObject("CrystalDesignRunTime.Application");

//------ Open your rpt file ------

$creport = $o_CrApplication->OpenReport($my_report, 1);

//------ Connect to DB2 DataBase ------

this is the hard part where I am not able to complete connection to mysql $o_CrApplication->LogOnServer('which library','mlims','root','');

//------ Put the values that you want --------

$creport->RecordSelectionFormula="{parameter.id}='1'";

//------ This is very important. DiscardSavedData make a

// Refresh in your data -------

$creport->DiscardSavedData;

//------ Read the records :-P -------

$creport->ReadRecords();

//------ Export to PDF -------

$creport->ExportOptions->DiskFileName=$my_pdf; $creport->ExportOptions->FormatType=31; $creport->ExportOptions->DestinationType=1; $creport->Export(false);

//------ Release the variables $creport = null; $crapp = null; $ObjectFactory = null;

crystal-reports-11.5-with-php-and-mysql's People

Contributors

ji33 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.