PDA

View Full Version : Print Detail View Page Only


leonchin
01-18-2009, 09:33 PM
How could I get a print button to display the detail view (like the default table view) to allow printing.

I find print preview useless for me as what I need is a formatted page.

Thanks

leonchin
01-19-2009, 03:30 PM
anyone else has the same requirements or found the solution? any help would be great

:(

twenty1
01-20-2009, 05:00 PM
Never had a requirement just offering something to try. Try adding this javascript to the generated blank footer.php file. <A HREF="javascript:window.print()">Print This</A>

Ant-c
05-17-2009, 12:20 PM
Hi
I am trying to set up a print of detail view only. I have placed the script that you list and it prints the whole page which is ok but I really would like the whole detail view and not the table as well. Anyone got around this yet?

Anthony

jpaulo
09-02-2009, 12:16 PM
Hi
i like to do that.
help

Lana
09-02-2009, 04:19 PM
Try adding the JavaScript mentioned above to the bottom of the relevant tablename_templateDV.HTML file.

jpaulo
09-03-2009, 07:06 PM
I try this .
but print all the page.

one solution is to select the option to hide table view.
after this i can print only the detail view.

but i loose the option to search data.
i only can input new record.

someone have any solution to this ?


report generator can solve this problem ?

SusanH
09-04-2009, 05:37 AM
Create a filter (http://www.websitedatabases.com/filters.html)...

KimS
01-12-2010, 12:48 PM
I do not want the table view to print - just the detail view - creating a filter leaves the table view at the top - help please!

twenty1
01-12-2010, 06:57 PM
Why not create another table view file that contains all the fileds you want to print, search the record and then print the record. You can search a unique piece of information from each record. Record id field or whatever then print it...

lisae3
01-14-2010, 09:56 AM
Hi, I know what you're talking about, you wish to print the record specifically and not the table veiw above it. (Esp., if you entered more than 10 records to display)
What I have done is replaced the print button with code:
< a href="newpage.php?recordID=NameOfPrimaryField" > Click Here to Print </a>
On the new page I then just copy and paste the code for the table view only; removing the code for the form elements and making it read only.
But in the header you must so a sql select
$printRec = "SELECT * FROM table WHERE primaryFieldName = $_REQUEST['$primaryFieldName']";
$recPrint = mysql_select($printRec);
While -blah blah blah...
There is no real way to make the program do this; it does not have the aiblity; however with a little hand coding and copy and paste you can build your own print preview. Just remember to put the results in a table that does not exceed 615 pixels - this way it won't go past the margins.