CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Help/Consulting -> Help - Jobs Wanted

 Printer Output from CCS

Print topic Send  topic

Author Message
Computer Force
Posted: 02/18/2004, 10:50 AM

Is there (in CCS2) at the moment or in the near future - possibility to send output of the search form using PHP (thru CSS or any other way) to printer (default printer or selected printer).

The best way would be to have the choice: output to the browser window or output to the default printer.

There are number of functions in PHP for printer outputs, but I did not see (yet) good scripts for printer outputs (with PHP language).

Let's consider this: Huge database for print. Choose columns, choose records (from .... to ....). Choose printer as output. Submit print. Sounds so easy. But it is not.

Anybody knows for a solution?
peterr


Posts: 5971
Posted: 02/18/2004, 11:16 AM

This is not exactly possible whether in CCS or PHP or any Web application, at least in the form that I think you think of. Imagine if a Website could start messing up with my printer :-)
If anything was printed via PHP, it would be sent to the printer connected to the Web server (via cable or network), but not to the printer connected to the computer used for viewing the Web page (client). Theoretically you can send output to the client's printer if they are both on the same network, but then it would not be exactly a feature of a Web application.
Have you ever seen a Website that can do this?
Usually the printing is done by printing the Web page, for example using the Print button in IE. In business environment it may be better to output a PDF, Excel or other common format, then let the users view it and print however they like. Though this is a different topic.

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Computer Force
Posted: 02/18/2004, 12:06 PM

I would explain the problem ( :( ) further ....

In PHP there is a set of commands for printer jobs. I did not use them yet, but there is strong urge (for me) to start!

Example:
I have huge database (3millions of records, or even more) at the headquarters. I go to the field (300miles from headquarters) and there I have to print part (40,000) to the paper. With headers (a must), footers (can be), record numbers. I would have to choose records (for example: from 2,520,000th to 2,560,000th), or by a query. Form for the purpose would be (very) good. Then I would have to redirect output of the form from browser to my default printer. It would be on-the-fly html, with page-breaks.

Impossible?!

To print 40,000 records to the PDF file? Maybe, that would be a solution. 50 records each page, means 800 pages. Of PDF. May be good, but it would be big PDF file. Of course.

Or, MS Access frontend with ODBC link to the database and MS Access query, and MS Access Report.... I did try. It doesn't work perfectly. Can do the job, but .... Many problems.

I agree (absolutely) that websites (usually, or normally) do not have this opportunity. But .... Problem I mentioned is real world problem, and I am trying to get a solution. Any good solution.

May we continue this conversation? Thank you!
peterr


Posts: 5971
Posted: 02/18/2004, 12:15 PM

OK. Maybe let's start with the question: can your Web server (the one that runs PHP) connect directly (via cable or network) to the printers that your users have access to? Are all the users somewhere in an office, or could they work from home or on the road?

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Computer Force
Posted: 02/18/2004, 2:32 PM

For explanation:
Apache, PHP, MySQL Server is in the center - in the Capitol. Around it field points in small cities. Distance between the center and field offices - 50 - 300 miles. Connection thru Internet. They have local printers at their local field offices. They need possibility to print data (20,000 - 50,000 records) from the central database.

One question:
If CodeCharge Studio can make HTML pages with 20, 30 or 50 rows per page (for the screen) - is there possibility to make big HTML page with all those pages in that one page - with pagebreaks for printer? Printer pagebreaks will be at the position where navigation system is. There will be some header and footer (table header). User would be able to save it to his disk (that one huge HTML page with pagebreaks for the printer), and to print it from his / her browser to his local printer. Using IE File-Print.

Would this be a solution? Is there possibility in CCS now for doing something like this?
peterr


Posts: 5971
Posted: 02/18/2004, 3:17 PM

In this case looks like you should be able to use several printing methods, though not all related to CCS:

1. Create a server program that would output the data directly to the specified printer in the background. CCS probably wouldn't be helpful here. This can be PHP but not necessarily. For example you can remotely trigger some 3rd party reporting tool, especially if you're creating a Web interface to any popular enterprise system - most of them come with own reporting tools.

2. Create a Web page that displays everything that needs to be printed. This is the standard Web-based method.

3. Create a Java Applet or ActiveX that would act as the client and do whatever needed (somewhat like the MS Access example you've given). This might be time-consuming to implement nicely and user friendly but can be done. CCS wouldn't help here though.

4. Use any other reporting tools, such as Oracle Reports or Crystal Reports. Looks like you're not limited only to the Web interface since you've tried to do this with MS Access. Seems that you just need something more robust.

Regarding #2, I think that at this time Crystal Reports may be the only professional tool for both the Web and desktop-based client/server reporting (#4), but it is expensive. Microsoft will be coming up with a powerful reporting tool in the next version of MS SQL Server.

Currently CCS does not support Web reporting and you're limited to outputting grids and report-like grids with simple groupings. Probably page-breaks could be implemented as well, but not the headers or footers. These are rather features specific to the reporting tools. If you don't need to create very complex reports then you may find some free or inexpeinsive reporting tools on the Internet. You can see a related discussion here: http://forums.codecharge.com/posts.php?post_id=25516
Or you can create the report(s) by manually writing the necessary PHP code.

Sorry I couldn't help too much. As you will see in the above forum thread, there are many people interested in this topic, whether CCS users or not.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Computer Force
Posted: 02/19/2004, 11:05 AM

Okay, let's discuss this:

Is there - in Code Charge Studio possibility for this:

1. Make Search page;
2. Link the Search page to Grid page where results will be presented;
3. Edit the Grid page template:
3a. Put not one or two, but 30-40 (depends on font, and page height) rows in template, with headers, but without navigation;
3b. Put HTML <p page-break /p> at the bottom of the template;
4. Result should be huge page with all records user did choose with Search page.

This would be the page to print.

Is this something that can work as a make-report-procedure in CCS?

Do you have suggestions for better way?

Thank you.
peterr


Posts: 5971
Posted: 02/19/2004, 12:11 PM

I have no idea if this might work. Looks interesting and may be worth a try.

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Edd


Posts: 547
Posted: 02/19/2004, 6:40 PM

Computer Force

Just a warning - don't let your print server be on your webserver.

Crystal 9's print services are reportedly VERY HEAVY on the services so keep it off your web server.

The best ( home grown) method is to build a off webserver service that performs print queing. Then the user retrieves the completed report from a queue or the report is dispatched via an emailing facility.

Any way you build it most reporting tools max out machines - generally not because they are inefficient - it is usually that the people who write reports don't ever worry about performance impacts.




_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Michael Mikkelsen
Posted: 02/26/2004, 11:00 PM

Quote Computer Force:
Okay, let's discuss this:

Is there - in Code Charge Studio possibility for this:

1. Make Search page;
2. Link the Search page to Grid page where results will be presented;
3. Edit the Grid page template:
3a. Put not one or two, but 30-40 (depends on font, and page height) rows in template, with headers, but without navigation;
3b. Put HTML <p page-break /p> at the bottom of the template;
4. Result should be huge page with all records user did choose with Search page.

This would be the page to print.

Is this something that can work as a make-report-procedure in CCS?

Do you have suggestions for better way?

Thank you.


You have the right idea here. If you need any help with writing the code to implement it I would be glad to help you for a fee. I consider this to be a relatively easy task in CCS. I would have figured about 20 hours to come up with how to do it and then implement it. Looks you already come up with the basic logic of how to do it, now itís just a matter of implementing it. Let me know if you need my assistance.


Michael Mikkelsen
mike@kccoupon.com
Anton
Posted: 03/01/2004, 11:26 PM

Offline a sub-set of the data for reporting. Run JasperReorts against the local sub-set via a Java app / applet ?

All sorts of JDBC solutions exist for storage of text / binary offline data in XML or formal database structures.

JasperReports is open-source and 100% Java. Very solid and well backed-up by other support applications such as 'OpenReports'.

Best to have 'OpenReports' on a separate 'print' server - if only JIC your users develop a report without a WHERE statement!

OpenReports comes with a complete Tomcat 'ready made and configured' solution. You can get it running very quickly.

Have a serious look at it.

Rgds

Anton
Si Cranmer
Posted: 03/08/2004, 12:54 AM

Anton,

Dont suppose you can point me in the direction of some installation notes (Sorry Im not a very good techie).

TA

Si.

currently using Win2000 sp3, Apache/2.0.48, mod_perl/1.99_10 Perl/v5.8.0 mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4
Anton
Posted: 03/10/2004, 10:20 AM

Hi Si

The installation of the core reporting modual is very simple once you have downloaded the main SDK Java developement and Java's J2EE add on.

To somewhat abuse the extensive installation notes which come with OpenReports (pardon the direct copy):

"Note: If you have downloaded the preconfigured OpenReportsTomcat bundle, and would like to get started immediately,unzip OpenReportsTomcat to root directory of your hard drive, change to the 'openreports-tomcat/bin' directory, start Tomcat via 'catalina run', open 'http://localhost:8080/openreports' in your browser, and login"....

Additional:

Installation of Java is also fairly simple these days. Only two things to look out for:

Win2k environment setting for variables:
------------------------------------------------------

JAVA_HOME=C:\jdk1.4.2
J2EE_HOME=C:\j2sdkee1.3
ANT_HOME=C:\ANT1531
CLASSPATH=J:\Common;.\;J:\mysqljar\mysq308.jar;J:\;D:\jdk1.4.2\lib\dt.jar;D:\jdk
1.4.2\lib\tools.jar;J:\TomCat\common\lib\servlet

Your classpath and installation subdirectories may well be different to mine. You will note that I am using MySQL Java drivers in the classpath for Java to be able to find and load them. If you use other databases then use JDBC drivers suitable for such databases.

Talking about database connections. You can use DBVisualiser to test you drivers and and admister your database:

http://www.dbvis.com/products/dbvis/

Computer/Properties/Advanced/Environment Settings gets you there.
I think that the modern install routine which comes with Sun Java avoids or puts most of the settings in for you.

Just go for Java 1.4.2 or Java 1.4.2_02 latest stable build (it has always been stable for me!)

http://java.sun.com/j2se/1.4.2/download.html


The Ant thing is used to run build routines when you use some software to design reports. Software like this allows the application to be 'built' and run by the user regardless of the platform they are running on.

Ant is extreemly useful and is a real must have. Indeed you can not run CCS to build Java apps without it...

http://ant.apache.org/

Having said that you need NOT use CCS at all to give your users a report facility via OpenReports. The whole thing is a group security based reporting suite.


Just download the OpenReports with TomCat server and install. Unpack the zip file for very extensive installation notes in PDF or HTML format. Also have regard to the ORDesigner package which is very well written to give you fast results when designing reports. The design and report preview are interactive with full demonstration of results from quick data driven wizzard reports or your custom changes/development.

http://sourceforge.net/projects/oreports

When you have TomCat+OpenReports running on localhost:8080 you then need to plug it into your Apatch server for normal port 80 services.

Blinding, I assure you, just go for it.

Anton
computerforce_
Posted: 03/14/2004, 7:02 AM

:(

Something strange happened, when I tried to use my username and password to login, it said: My username is not yet activated ??!

What happened?
Anton
Posted: 03/18/2004, 1:37 AM

Sorry, don't know which system you refer to.

If it is the OpenReports thing then the PDF help document has the user installation instructions:

>Create OpenReports tables in your database.
>Create OpenReports Admin User.
>Configure Hibernate to point to your database.
>Configure upload directory.

>"Once you have created the OpenReports tables in your database, you must insert a record into the REPORT_USER table in order to create an Admin user that you can use to log into and administer the application.

The following example creates a user with the name 'admin', a password of 'password' and Administrative rights:

INSERT INTO REPORT_USER VALUES(0,'admin','password',true)
"

Hibernate is just the example database server - I use MySQL just by running the required SQL scripts past the server - see dos/database sub-dir. Any database will do and there are four example script files to get you going.

Rgds

Anton
dd
Posted: 03/18/2004, 10:00 AM

Doesn't this discussion belong in another forum?

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.