Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Transaction Patterns » Output2 - Options / 90° cell rotation
Output2 - Options / 90° cell rotation [message #7361] Mon, 30 September 2019 09:55 Go to next message
htManager is currently offline  htManager
Messages: 217
Registered: May 2014
Senior Member
Can I rotate the cell values? I try to explain it with the next lines:

........| | | | | |
Line 1 x x x o x o
Line 2 x o x x x o
...

The pipes are the headings 90° rotated. So I could generate my (Pivot-table) report on one page.

[Updated on: Mon, 30 September 2019 09:55]

Report message to a moderator

Re: Output2 - Options / 90° cell rotation [message #7362 is a reply to message #7361] Tue, 01 October 2019 04:42 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2154
Registered: April 2006
Location: Surrey, UK
Senior Member
Not at present, but I will look into it.

Re: Output2 - Options / 90° cell rotation [message #7364 is a reply to message #7362] Tue, 01 October 2019 09:49 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2154
Registered: April 2006
Location: Surrey, UK
Senior Member
I cannot see any option for this is the TCPDF library, so I'm afraid that you are out of luck.

Re: Output2 - Options / 90° cell rotation [message #7365 is a reply to message #7364] Wed, 02 October 2019 05:33 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 217
Registered: May 2014
Senior Member
What a pity. Thank you for looking for an option. Do you have any idea how I could solve this problem in a different way?
Re: Output2 - Options / 90° cell rotation [message #7366 is a reply to message #7365] Thu, 03 October 2019 05:26 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2154
Registered: April 2006
Location: Surrey, UK
Senior Member
If you look at https://www.tonymarston.net/php-mysql/output-to-pdf.html#col umn.widths.list you will see that it is possible for column labels to overflow onto the next line if the text is too wide for the cell width. It is also possible to insert the "\n" (newline) character between each letter to force it to overflow. Unfortunately I cannot see a way to rotate the text through 90 degrees, so you will still read it vertically.

Re: Output2 - Options / 90° cell rotation [message #7369 is a reply to message #7366] Fri, 04 October 2019 05:11 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 217
Registered: May 2014
Senior Member
Thank you. I will try this out.
Re: Output2 - Options / 90° cell rotation [message #7370 is a reply to message #7369] Sat, 05 October 2019 11:51 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 217
Registered: May 2014
Senior Member
In which method can I place best my code to modify the output? I want to show a 'x' for true and an '' for false. So I can see which player was present at a match.
In my pdf the 0 is always the presence of the first player in the first match. I think that I have to correct my SQL query in the controller script. Where can I dump the query result best?
Re: Output2 - Options / 90° cell rotation [message #7371 is a reply to message #7370] Sun, 06 October 2019 03:51 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2154
Registered: April 2006
Location: Surrey, UK
Senior Member
You can use the _cm_formatData() method which is the last method to be called before the data is passed to the PDF processor.

Re: Output2 - Options / 90° cell rotation [message #7377 is a reply to message #7371] Fri, 18 October 2019 12:38 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 217
Registered: May 2014
Senior Member
At the moment I think I have found a way to generate my Pivot table but I need some further information from you.

1. In the _cm_initialise() method I query my table to find all relevant players and insert these as an array in $GLOBALS['']
2. In the _cm_formatData() method I now can investigate if the player was present or not present at the match. I do this with x or blank.

What I do not know is where to place best the code for the 90° heading variables as you told me with the "\n" character. I have seen that I can create the headings with variables like $structure['body']['fields'][] = array('spiele_anwesenheit_status_ausgabe' => $GLOBALS['Spielername01']);

The problem is that obviously the report structure file is called before the _cm_initialise() method so that the variable $GLOBALS['Spielername01'] is empty. The UML diagrams don't show the output pattern sequences. Can you tell me how I can solve this problem?
Re: Output2 - Options / 90° cell rotation [message #7378 is a reply to message #7377] Sat, 19 October 2019 04:21 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2154
Registered: April 2006
Location: Surrey, UK
Senior Member
Are these labels static or dynamic? If they are static you can define them with "\n" characters in the report.inc file. If they are dynamic then they need to be defined as fields instead of labels so that the contents of each field can be set in your code and not in the report.inc file. This is explained in https://www.tonymarston.net/php-mysql/output-to-pdf.html#tit le.contents - scroll down until you see you see the keyword "<text>" and the option for "%%<text>".

Re: Output2 - Options / 90° cell rotation [message #7379 is a reply to message #7378] Sat, 19 October 2019 08:21 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 217
Registered: May 2014
Senior Member
The labels are dynamic. The number of colums can be different. But I think I have found a solution.

In my controller script I first call a method in one of my library inc files and there I run the query to get the number of colums and there I can create the labels. All this data I write to §GLOBALS so that I can read in the values in the report structure file.
Re: Output2 - Options / 90° cell rotation [message #7381 is a reply to message #7379] Sun, 20 October 2019 05:02 Go to previous message
AJM is currently offline  AJM
Messages: 2154
Registered: April 2006
Location: Surrey, UK
Senior Member
I'm glad you found a solution.

Previous Topic: Output2 - SQL
Next Topic: Introduction to Transaction Patterns within Radicore
Goto Forum:
  


Current Time: Sun Oct 20 08:38:13 EDT 2019

Total time taken to generate the page: 0.01378 seconds