Specifications Formletters: Difference between revisions
Line 11: | Line 11: | ||
These are also not so easy to be edited by untrained staff (need to know HTML, but not all HTML features are supported by our own HTML2Print/PDF renderer), but at least easier for us developers. We could offer services to help offices get the initial version of their html template... | These are also not so easy to be edited by untrained staff (need to know HTML, but not all HTML features are supported by our own HTML2Print/PDF renderer), but at least easier for us developers. We could offer services to help offices get the initial version of their html template... | ||
One thing to mention: especially for the application forms for TeenStreet, we had to print application forms for 4 or 5 different types of people, for 20 countries. The name of the file includes the conference role and country identifier. | |||
=== Examples === | === Examples === | ||
Line 19: | Line 21: | ||
* printing some lists: https://github.com/tpokorra/openpetragit/blob/master/demodata/formletters/MedicalReport.html | * printing some lists: https://github.com/tpokorra/openpetragit/blob/master/demodata/formletters/MedicalReport.html | ||
=== formletters | === Central Class for formletters with HTML templates === | ||
* the code is implemented here: | * the code is implemented here: | ||
https://github.com/tpokorra/openpetragit/blob/master/csharp/ICT/Common/Printing/FormLetters.cs | https://github.com/tpokorra/openpetragit/blob/master/csharp/ICT/Common/Printing/FormLetters.cs |
Revision as of 12:51, 30 Mayıs 2013
Intro
This is about formletters, also known as Mail Merge, etc
You want to send a letter to a donor, generated from data which is stored in OpenPetra
Old Petra 2.x
Formletters were stored in several database tables, and assembled from there. Quite complicated to edit for the user, and difficult to see what you are doing. Eg the annual gift receipts was a nightmare.
OpenPetra initial steps
At the moment, we have routines to print letters from HTML templates.
These are also not so easy to be edited by untrained staff (need to know HTML, but not all HTML features are supported by our own HTML2Print/PDF renderer), but at least easier for us developers. We could offer services to help offices get the initial version of their html template...
One thing to mention: especially for the application forms for TeenStreet, we had to print application forms for 4 or 5 different types of people, for 20 countries. The name of the file includes the conference role and country identifier.
Examples
Examples for such templates are visible here:
- annual gift receipt: https://github.com/tpokorra/openpetragit/blob/master/demodata/formletters/AnnualReceipt.html
- application form for a conference: https://github.com/tpokorra/openpetragit/blob/master/demodata/formletters/ApplicationPDF.en-US.html
- mail merge letter: https://github.com/tpokorra/openpetragit/blob/master/demodata/formletters/NewDonorSubscriptionLetter.html
- printing some lists: https://github.com/tpokorra/openpetragit/blob/master/demodata/formletters/MedicalReport.html
Central Class for formletters with HTML templates
- the code is implemented here:
https://github.com/tpokorra/openpetragit/blob/master/csharp/ICT/Common/Printing/FormLetters.cs
annual gift receipts
print application form to PDF
mail merge letter
- client side: https://github.com/tpokorra/openpetragit/blob/master/csharp/ICT/Petra/Client/MFinance/Gui/Gift/GiftNewDonorLetter.ManualCode.cs#L101
- server side: https://github.com/tpokorra/openpetragit/blob/master/csharp/ICT/Petra/Server/lib/MFinance/Gift/Gift.NewDonorSubscription.cs#L166