I have been asked to find out if it is possible to connect Cyrstal Reports to a MYSQL database within a php website.
Is this possible?
Are their any alternatives
Thanks
Edit I suppose in the perfect world I am wanting to show crystal reports within a PHP website
As an alternative you can use iReport. You can use it just as you need, with a mysql database from a php website.
In response to your comment:
I would want to show CR within the PHP website
CR being a Windows executable, this will not be directly possible (aside from embedding a Remote Desktop or VNC instance, but this is probably not feasible, and would not be legal.)
Your best bet is to check whether CR has an export format that can be embedded into the web site: PDF, HTML, XML come to mind. Those you could insert into your web page manually.
If you want automated interaction between the web site's user and CR, this probably possible, but not going to be trivial. There are third party products that allow controlling CR from the command line. You may be possible to set up an interaction between PHP and Crystal Reports through the command line on a Windows server, but it's going to be a lot of work.
Your question isn't very clear, if you're trying to ask if you can connect Crystal Reports to a MySQL database (a MySQL database that is connected to a PHP site) then you might be able to, have a look at this article.
If you're tying to connection Crystal Reports to a MySQL database and embed it within a PHP application... well I'm not too sure, perhaps someone else can tackle this problem.
http://www.eakes.org/80/connecting-to-mysql-with-crystal-reports-xi/
Using Crystal Reports to generate reports from a mySQL data base works fine. Install the latest and greatest mySQL ODBC driver and just do it.
If you want to serve up pre-generated Crystal report .rpt files via a PHP-based web site, that is straightforward. You can ask your users to download the Crystal Report Viewer, and just send out those files as if they were, say, .doc or .xls files.
The viewer is here.
The tricky bit is generating Crystal files on demand. You'll need to control the Crystal instance based on input from your web site users. You'll need to ask them to wait while Crystal runs. SAP sells a server edition of their product for this purpose that works well, but it costs money.
Groff Automation makes a product called Crystal Delivery. It works well for running routine reports.
Related
I'm trying to develop a way to pull a list of printers (names and IPs at least), from a Windows print server. I plan to use this info in an external PHP-driven status website, running on a Linux webserver, which talks to the printers individually via SNMP. The SNMP communication is already functional. I just need a way of dynamically generating the list of printers it talks to, instead of hard coding all of the IPs/DNS Hostnames.
The idea here is that I do this entirely without touching or changing the print server(s), printers, or the underlying webserver. The only thing under my control is a shared, non-administrative CPanel account.
My research so far has led me to three potential leads. I have next to no experience with any of them.
1) The PHP printer_list command, which is part of the PECL extension. At the moment our webserver does not have this extension installed, and I'd prefer not to make that request unless I know it will work for my purposes.
2) The lpstat Linux command, part of CUPS. I've tried using it per the man page and it seems to just sit there doing nothing. I don't know if this is because it's expecting a CUPS response which I figure it will not be getting from a Windows server, or if this might be a firewall issue.
3) SMB or WMI queries of some sort. I have no idea how to even begin with these.
I'd like to ask for a recommendation on where to start. This has been a very troubling project to research because 90% of search results are about people wanting to print. Another 8% are about people polling a local system for printer info. The rest are black magic and proprietary enterprise solutions.
Any insights are very much appreciated.
== Matt
I am using WMI effectively to fetch printer information over network using :
Select * FROM Win32_Printer
To begin:
1 - Run wbemtest from run window.
2 - Connect to any machine where you know printers are configured.
3 - There is query option, copy Select * FROM Win32_Printer
4 - Step 4 will return you table, click on Show MOF, it will provide you printer information. Viola, you are done.
5 - I have used C# ManagementObjectSearcher & ManagementObjectCollection and it is pretty straightforward and easy to use.
There are some pros and cons of using WMI. Read it online.
I have a very simple web page in PHP that uses a MySQL database to randomly feed a simple quiz that goes on forever as long as the user wants to keep answering questions.
I want to move this to my Android to be able to use it offline. I used jQuery Mobile to adapt the layouts to the smartphone. So now I want to move the database to a local database and remove all the need to an internet connection. I have absolutely no experience on Android development so if anyone can help me with a few questions, I'd appreciate it:
How can I store my existing database in the smartphone?
The only actions that the app performs on the database are selects. The information on the database will grow with time (not much, I just want to be able to add more records with time). Is there any tool I can use to manage the local database and add the information as I need (as I do now with PhpMyAdmin)?
The web page exists online right now, will I be able to run it locally as it is? (aka, PHP page with css and js files)
Thanks in advance.
1) Android databases are done in SQLite. I'm unsure exactly what the syntax difference between mySQL and SQLite is, but if a straight dump/import doesn't work, you could export to csv/import that way. For info on getting an external database packaged with an app, check Using your own SQLite database with Android applications. It's a very helpful guide to getting it set up.
2) I use a Firefox add-on, SQLiteManager. I hate doing it, as it's the only reason I have Firefox installed any more, but on *nix it's the best option I've found. It's either that, command line, or SQLiteMan, which I found feature-lacking. On other platforms, I can't comment.
3) I don't know if PHP has a good library for SQLite. If so, you'll most likely need to do some modification to work with that instead of mySQL. If you can get that running smoothly, you should be able to drop it into a webview. The other option is to redo it in Java.
Good luck!
I have a web applications that stores data in a MySQL database on-line. It also retrieves data using PHP code, performs calculations on the server and sends the result back to the user.
Data it's quite simple: names, descriptions, prices, VAT, hourly charges that are read from the database and manipulated on the server side.
Often client work in environments where the internet connection is poor or not available. In this case I would like the client to be able to work offline: enter new names, descriptions, prices and use the last VAT to perform calculations. Then synchronise all data as soon as a connection is available.
Now the problem is that I do not know what is the best way or technologies for achieving this. Don't worry, I am not asking to write code for me. Can you just explain to me what is the correct way to build such a system?
Is there a simple way to use my online MySQL and PHP code locally?
Should I save the data I need in a local file, rebuild the calculation in JavaScript, perform them locally and then synchronise the data if database is available.
Should I use two MySQL database, one local and one online and do a synchronisation between the two when data is available? If yes which technology (language) shall I use to perform this operation?
If possible, I would like an answer from PHP coders that worked on a similar project in the past and can give me detailed information on framework structure and technology to use. please remember that I am new to this way of writing application and I would appreciate if you can spare few minutes and explain everything to me like if I am six year old or stupid (which I am!)
I really appreciate any help and suggestion.
Ciao,
Donato
There are essentially 3 ways to go:
Version 1: "Old school": PHP-Gtk+ and bcompiler
first, if you not have done so already, you need to separate your business logic from your presentation layer (HTML, templating engines, ...) and database layer
then adapt your database layer, so that it can live with an alternative DB (local SQlite comes to mind) and perform synchronisation when online again
Finally use PHP-Gtk+ to create a new UI and pack all this with bcompiler
Version 2: "Standard": Take your server with you
Look at Server2Go, WampOnCD and friends to create a "double clickable webserver" (Start at Z-WAMP)
You still need to adapt your DB layer as in Version 1
Version 3: "Web 2.x": Move application from server to browser
Move your application logic from the server side (PHP) to the client side (JS)
Make your server part (PHP) only a data access or sync layer
Use the HTML5 offline features to replace your data access with local data if you are offline and to resync if online
Which one is best?
This depends on what you have and what you want. If most of your business logic is in PHP, then moving it into the browser might be prohibitingly expensive - be aware, that this also generates a whole new class of security nightmaares. I personally do not recommend porting this way, but I do recommend it for new apps, if the backing DB is not too big.
If you chose to keep your PHP business logic, then the desicion between 1 and 2 is often a quiestion of how much UI does your app have - if it's only a few CRUD forms, 1. might be a good idea - it is definitly the most portable (in the sense of taking it with you). If not, go with 2.
I have worked with similar system for ships. Internet is expensive in the middle of the ocean so they have local web servers installed with database synchronization via e-mail.
We also have created simple .exe packages so people with no experience can install the system or update system...
I wrote an application on VB6/Access for a retail shop almost 8 yrs ago. They are still using it, and now they are asking for changes/upgrade and want to access from multiple locations + multiple machine per location. Earlier it was just one machine per location.
All location is going to run the same application except only the Inventory and customers are different along with app settings. Inventory should be able to move to different location.
I lost touch with VB & Access, also I would like to rewrite the app with open source tools.
I'm a web developer PHP/MySQL and can do html5 if necessary. I believe I can rewrite all the functionalities with PHP/MySQL but I am not confident in printing.
The main requirement of the app is, it should print as fast as it can, should support several custom paper sizes.
Also the database should work distributed environment, all location should be able to work independently as well as able to sync updates when connected.
What is the best thing I can do in
this situation?
Would you recommend to create webapp, and do any desktop
client only for printing. i.e VB in
windows or shell script if linux? or
any alternative?
Any recommended workflow/links for Database setup/mirroring?
Modify the existing VB application to run with required MySQL architecture?
Sorry to violate one question per post rule, but I don't know how to split it.
Lets start with printing.
You could do a print CSS file. But its not very precise. That would get printed from the client browser.
Generate a PDF. With that you could print from the server or from the client. Server would be a faster option. Although multiple printers could get complicated.
Database sync:
I would treat the central database as a separate app and devise rules for each location to sync to the central location. You may not need to share all data, and just replicating the data you get into complex replication rules.
i have a database that is written in access. the access mdb file connects via ODBC to a local mysql database. i have a bunch of sql and vba code in the access file. i dont expect the database to surpass 100mb. currently it is around 10mb. i will need to have multiple user access. (no more than 10 users at a time)
i need to convert this database from being a local one to a web server, and i need to make a web interface for it.
how do i get the current local instance of mysql database to run off a webserver? i am currently running it off wampserver 2.0. i dont have experience putting a database on a webserver.
i have an OK vb.net background. i have never done any web applications. here's a picture of the access form that i may need to replicate to work off a website:
alt text http://img42.imageshack.us/img42/1025/83882488.jpg
which platform should i use as the front end to this thing?
would it be possible to just run this access file off a webserver instead of programming a new front end for it? is that not a smart idea?
thank you for your help!
If your webserver has TCP connectivity to your existing database server, and its hosted in a suitable place (eg, don't have your webserver in a datacenter connecting to a database server on your office DSL connection), then no move is required.
If you do need to move it, it's as easy as creating a backup/dump, and restoring it elsewhere.
As far as the frontend, there are MANY technologies that will do what you need (ASP.NET, PHP, Python, Ruby, Perl, Java being the most popular ones, not necessarily in that order).
Use something you are comfortable with, or that you are interested in learning (provided you have the time to do so)
Use something that runs properly on your target webserver. Really, ASP.NET is the only one that has any major issue here, as it's limited to Windows.
Access itself has no direct web-accessible version. A Google search finds some apps that claim to convert Access forms to web-based, but I will not link to any because I don't know how well they work. I'm certainly leary of anything like that, because web apps are a different breed from Windows apps. If you are going to go that route, be sure they actually generate HTML output; make sane, clean source; and offer a free trial so you can verify it actually works.
Really though, a form like that is reasonably easy to reproduce with some basic knowledge of server-side programming and some HTML.
I don't have any experience migrating access to a web-based interface, although I have heard of people going straight from access to a web page. MySql is exceptionally easy to migrate. MySQL.com has a program called mysqldump that comes with the standard install of MySQL that allows you to export your database straight to a text file that can be used then with mysqldump to import it on another server. I don't believe the WAMP server comes with the command line tools although they can be downloaded from mysql.com. However, if it has phpMyAdmin, then there is also an export feature with that as well that will generate a .sql file that can be imported to the webserver using phpMyAdmin. One thing to keep in mind though is that I have had very little success mixing and matching these methods: ie, I've never been able to get a mysqldump-created file to work with phpMyAdmin and vice versa.
Good luck!
The link will help you to export and import mySQL database
May be on Windows web server there is an opportunity to run Access files, you can check, but any way if you have some programming skills, I would say that it is not difficult to crate a php script which will query your database info and will edit.
Migrating an Access application to the web is quite difficult, because you can't translate an Access form 1:1 into a web page. Web apps are stateless, whereas Access is built around the concept of bound controls and bound datasets.
Secondly, it is impossible to easily replicate an Access subform.
Third, you lose tons of events that Access forms and controls are built around.
In general, a web page that performs the same task as an Access form will bear little or no resemblance to the Access form, simply because the methods for accomplishing the same tasks and the UI widgets available to you are so completely different.
One thing to consider is whether your users need a web application or if they just need to use your existing Access application over the Internet. If the latter is the case, Windows Terminal Server/Citrix can do the job for a lot less money, since there's no conversion needed. You do need to provision a Windows Terminal Server, set up a VPN and purchase CALs for the users, but the costs of those are going to be much less than the cost of rebuilding the app for web deployment.
It may not be an appropriate solution, but it's one that you should consider, I think.