Versions des environnements
>I'm just finishing up my first ASP.NET app, which is a reporting module accessing VFP9 data through OLEDB, with a VFP COM component to handle some specialized processing.
>
>It's a pretty simple app, which allows the user to select from a number of criteria and then presents the results in a datagrid. The other day as I was running some test data through it I thought I should try printing some things. Rude awakening. Somehow I had naively assumed that we were just generating html, so I could just hit the print button on the browser and everything would print.
That is exactly what ASP.NET does. Everything that you see comes from the HTML.
> That's fine if you have less than a page of output, but if you have two or three screenfulls of data it chops off after the first page - even says "page 1 of 1" at the bottom.
Do you display all of the rows in your datagrid at once? If you are, then the printing problem is in the browser settings. If you are displaying one page at a time and want to print the entire result as a "report", then you will have to create a separate page that displays the entire result set - or you can use Crystal/SQL Server Reporting Services to create a true report that talks to the printer driver and knows where the page breaks and margins are.
>
>Am I missing something basic? I was just beginning to see what the excitement was about with ASP.NET, being able to present a web-based grid with sortable columns, etc. with minimal code; but what kind of gyrations do I need to go through to print it?
>
>One option I'm thinking of is to put a Print button on the report and link that to a routine that I'd put in my DLL that would generate a stream of html. How have others handled this?
>
This is a common practice on web sites. Many times you will see a "Printable version" link or button somewhere on the page. Click on it and you will get a new browser window that displays the data in static HTML tables. Usually the layout is desinged to get acceptable printing results on most printers.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement