Customizing Printable Report function and FDF Module

59 views
Skip to first unread message

ss

unread,
Aug 4, 2016, 8:48:42 PM8/4/16
to Xataface
Hello,

I apologize but I am kind of stuck on customizing where I want to include the button to create a PDF report for a record. I currently have created a duplicate edit page, where I wish to include the button to generate a PDF report without disturbing the data that is already in the database. Basically, I hope to create another edit form where users can change the information to be printed out onto the PDF report without having to touch the information that is stored in the database. Stack vs heap, if you will. I have currently created the separate edit page; however, I am stuck on how to combine that with the FDF module. Any pointers will be greatly appreciated.

A separate question: I found a PHP file on how to export content to an MS Word document; however, when I try to include this code into the Printable Report tutorial, it does not work. The code was found here: http://jiansenlu.blogspot.ca/2014/01/php-export-content-to-ms-word-document.html If someone can point me in the right direction in how to incorporate this code, that would be amazing. Also, if anyone has any idea how to incorporate this code so the "FDF Module" can be used to create an MS Word document instead of a PDF document, I would greatly appreciate it. Thank you.

Steve Hannah

unread,
Aug 4, 2016, 8:56:49 PM8/4/16
to xata...@googlegroups.com
It would probably be easier just to create a real "dummy" table to do your "heap" editing and work off of that.  This will hook into all of Xataface's functionality better.  The FDF module assumes that the data is coming from an actual table.

However, to answer your question of where to place the button, you can add the button anywhere you like.  Just add a custom entry in your app's actions.ini file, with the url pointing to your action.


The "category" directive is the one the tells the action where to be placed in the UI.

See the xataface actions.ini file and the g2 module actions.ini file for examples of supported categories:

Steve




--
You received this message because you are subscribed to the Google Groups "Xataface" group.
Visit this group at https://groups.google.com/group/xataface.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/04f282d3-7623-4cf2-82ae-014bad2a30ac%40googlegroups.com.



--
Steve Hannah
Web Lite Solutions Corp.

ss

unread,
Aug 4, 2016, 10:01:28 PM8/4/16
to Xataface
Thank you for getting back to me so quickly! Sorry, I just want to make sure I completely understand the actions.ini file. My current actions.ini entry for my fdf_report action is this: 
[fdf_report]
category="record_actions"
label="Print PDF Report"
description="Print Form"
condition="$record and $record->getURL('-action=edit_printable_report')"
url="{$record->getURL('-action=fdf_report')}&--pdf-template=ThirdTest.pdf&--single=1"
url_condition="$record"
icon="{$dataface_url}/images/print_icon.gif"
target="_blank"
order=100

where "edit_printable_report" is the action for which I have a button that I press and after which I want the "fdf_report" button to appear on the resulting page; however, the fdf_report button is still appearing on the view page instead of the edit page. Could you please let me know what I am doing incorrectly? Thank you.
Reply all
Reply to author
Forward
0 new messages