How do I create PDF documents / reports?

Hello everybody,

I am pretty new to suiteCRM. I am busy setting it up not as an original CRM but to maintain our ongoing projects.
The projects are about software and hardware installations on customers’ sites.
Now I want to be able to create (for example) a PDF document, that contains all the customer’s information like address information, contact information and istalled hard- and software, inclduing build, serial and version numbers.
Thus the data should come from different modules of “suite”.

Unfortunately I do not know if that is possible with “suite” anyhow. Can someone please give me a push in the right direction?
Or let me know if my idea even has a chance of success? Any hint is highly appreciated! - Many many many thanks!!! :slight_smile:

Hi Louie,

You can create custom modules or add fields to current modules to store all of the relevant information. You can then use PDF templates to generate a PDF of the information.

Thanks,

Will.

1 Like

Hello Will,

many thanks for the quick and kind response! :slight_smile:
I already built some customized modules and modified existing ones, but where do I find PDF templates and how do I generate actual PDF documents?
Is there a tutorial on this somewhere? I’ve also checked the admin area but can’t find anything. :dry:

Hi Louie,

You need to make a few changes to your module to add in the functionality. Please see this forum post.

Thanks,

Will.

1 Like

Many thanks Will, but I still don’t understand how to add the functionality. :blush:

Hi Louie,

Did you follow the forum posts? Firstly in custom/modules/yourmodulename/metadata/detailviewdefs.php add the button code:


'AOS_GENLET' =>
array (
'customCode' => '<input type="button" class="button" onClick="showPopup();" value="{$APP.LBL_GENERATE_LETTER}">',
),

then in custom/modules/yourmodulename/views create a view.detail.php and add the following:


require_once('modules/AOS_PDF_Templates/formLetter.php');
formLetter::DVPopupHtml('yourcustommodule');

Perform a Quick Repair & Rebuild and clear cache afterwards.

Thanks,

Will.

1 Like

Hello Will,

many many thanks for your quick and kind response! Sorry for the lateness in response!
I’ve been busy trying out to set this up, but did not succeed.
I do have a very little understanding of PHP, but have not been able to add the code to the mentioned file,
without the effect that I receive an error message, as soon as I try to open the according module in suite.

Where exactly do I have to put the code? A little more precisely guidance would be highly appreciated by me,
and surely by other suite users who might come along the same problem. :slight_smile:

In the meantime I keep on trying, but I’m not very confident… :blush: