Forums

Show a table in TCPDF

Ogui3 17 Jul, 2023
Good evening, I want to display a table in a pdf document generated by TCPDF but I can't.

I have a standalone page group with options to see the list of my contracts.

From this list, I can display a contract. In this visualization page, I display the contract which contains a table which returns the dates of the missions and a button allowing to send the contract in pdf.

The TCPDF function is in a sequential page group. For everything concerning the display of the clauses of the contract, no problem, everything is in my pdf document. On the other hand, I cannot report my table with the dates of the missions in the pdf.

How do I take the table and display it directly in my pdf?

There is only this table which refuses to be posted and I do not find any source in the forum allowing me to do it.

Thanks for your help.

----------------------------------------------------------------------------------------------------------------------------------------

Bonsoir, je souhaite afficher un tableau dans un document pdf généré par TCPDF mais je n'y arrive pas.

J'ai un groupe de pages autonome avec des options pour voir la liste de mes contrats.

A partir de cette liste, je peux afficher un contrat. Dans cette page de visualisation, j'affiche le contrat qui contient un tableau qui renvoie les dates des missions et un bouton permettant d'envoyer le contrat en pdf.

La fonction TCPDF se trouve dans un groupe de pages séquentielles. Pour tout ce qui concerne l'affichage des clauses du contrat, pas de problème, tout est dans mon document pdf. Par contre, je ne peux pas reporter mon tableau avec les dates des missions dans le pdf.

Comment prendre le tableau et l'afficher directement dans mon pdf ?

Il n'y a que ce tableau qui refuse d'être affiché et je ne trouve aucune source dans le forum me permettant de le faire.

Merci pour votre aide.
Max_admin 18 Jul, 2023
build the table again in the same page where you call the PDF then get its content in the PDF using {view:table_view_name}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Ogui3 18 Jul, 2023
Thanks Max but I have an error :
"0 Call to a member function view(0) on null"

Do you know what is the problem ?
Admiral 09 Aug, 2023
I am having the same issue, were you able to resolve this?

Admiral
Admiral 18 Aug, 2023
Hey Max,
Do you have a solution for the "0 Call to a member function view(0) on null" error when trying to add a table to a PDF? Perhaps {view:table_view_name} is not enough? Is there additional detail that needs to be added to the PDF?
Max_admin 18 Aug, 2023
Could you please post a screenshot of your form event with the TCPDF action ? you can upload it somewhere online and post the link here.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Admiral 27 Sep, 2023
Max,
{view:table_view_name} is not in the list of shortcodes for Chronoforms 7 FAQ. Nor is it on the cheatsheet list inside the program itself. Perhaps it is not implemented in CF7? Could this be the reason it is not working?

-Admiral
Max_admin 28 Sep, 2023
It should work as long as this view was processed in the same page before calling the shortcode {view:123}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Ogui3 03 Feb, 2024
Hello Max,

I'm coming back to this subject because it is still not resolved and I really don't understand how to display a table with the data it contains in my pdf via tcpdf.
I tried the {view:table_name} function but I still got the same error: "0 Call to a member function view(0) on null"

Do you have a step-by-step solution for me?

This form is used to establish contracts and it is extremely inconvenient.

Sincerely.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Bonjour Max,

Je reviens sur ce sujet car il n'est toujours pas résolu et je ne comprends vraiment pas comment faire pour afficher un tableau avec les données qu'il contient dans mon pdf via tcpdf.
J'ai tenté la fonction {view:table_name} mais j'ai toujours la même erreur : "0 Call to a member function view(0) on null"

Auriez-vous une solution pas-à-pas à me communiquer ?

Ce formulaire sert à établir des contrats et c'est extrêmement gênant.

Cordialement.
Admiral 17 May, 2024

Hey Max wondering if you could take another look at this issue of   "0 Call to a member function view(0) on null" Perhaps provide a demo TCPDF including a table?

Thanks!

-Admiral

Max_admin 21 May, 2024
Answer

Hi Admiral

This feature is implemented in v8.0.21 so please install the latest v8 on your website (this does not affect v7) then you can try to call any of your form views (your table view) in your TCPDF content using this syntax:

{view.output:view_name}

The view name is as shown here:

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Admiral 24 May, 2024

Thanks for this Max, I am sure it will help others! For me v8 requires more coding than I am able to perform. I miss the buttons in the behaviors the version 7 has that need to be coded manually in v8 (the table links for one...), so must stay with v7. 

Hopefully v7 will last a while yet before it is obsolete in Joomla! 5 because there really is nothing that can compare to Chronoforms7/Chronoconnectivity 7 !!

Admiral

Max_admin 24 May, 2024

writing the link yourself lets you customize it the way you want, you can add more parameters...etc, making v8 simpler was necessary because many users found v7 very complex compared to v6, you can browse the forums to find how many users wanted to keep using v6

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
bart99.hermans266 26 Dec, 2024

Dear Max,I was trying this solution, but couldn't get it to work. It gives this error:

This is how I configured it. I have a table (the ID disappeared after editing, but it is table58). For testing, it takes the data from a database table directly and I show only 1 column.

The table is shown correctly if I remove the TCPDF. (There is only 1 line in the database for testing purposes.)

Is there something I do wrong?

Best regards,

Bart

Max_admin 27 Dec, 2024

Hi Bart

in v8 you should use {view:table58}, does that work ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 27 Dec, 2024
1 Likes

a new action "Output buffer" coming in the next update should be used to do this:

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.