Crosstab Dynamic columns caption (v2023)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
elonmusk
User
Posts: 48

Crosstab Dynamic columns caption (v2023)

Post by elonmusk »

  1. How to change crosstab report's dynamic columns caption which is from another table value's?

  2. I want one crosstab report like previous 9 months and next 9 months from current month data will be shown in that report how to do this any possibilities ?

    that dynamic header also need to change like what is mentioned above.
    example : I want Dynamic columns for Feb like this
    " May June July August September October November December Jan Feb Mar Apr May June July August September October November "

Thanks anybody replied.


arbei
User
Posts: 9384

Post by arbei »

You may use Page_Render server event to modify $this->Columns. You may var_dump($this->Columns) first and see what to change.


elonmusk
User
Posts: 48

Post by elonmusk »

Can you please show some example to change dynamic column caption.

array(9) { [0]=> array(3) { [0]=> NULL [1]=> NULL [2]=> NULL } [1]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#346 (3) { ["Caption"]=> string(7) "Stage_1" ["Value"]=> string(7) "Stage_1" ["Visible"]=> bool(true) } [2]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#345 (3) { ["Caption"]=> string(7) "Stage_2" ["Value"]=> string(7) "Stage_2" ["Visible"]=> bool(true) } [3]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#344 (3) { ["Caption"]=> string(7) "Stage_3" ["Value"]=> string(7) "Stage_3" ["Visible"]=> bool(true) } [4]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#347 (3) { ["Caption"]=> string(7) "Stage_4" ["Value"]=> string(7) "Stage_4" ["Visible"]=> bool(true) } [5]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#348 (3) { ["Caption"]=> string(7) "Stage_5" ["Value"]=> string(7) "Stage_5" ["Visible"]=> bool(true) } [6]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#349 (3) { ["Caption"]=> string(7) "Stage_6" ["Value"]=> string(7) "Stage_6" ["Visible"]=> bool(true) } [7]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#350 (3) { ["Caption"]=> string(7) "Stage_7" ["Value"]=> string(7) "Stage_7" ["Visible"]=> bool(true) } [8]=> object(PHPMaker2023\PASY_crosstab_v2\CrosstabColumn)#351 (3) { ["Caption"]=> string(7) "Stage_8" ["Value"]=> string(7) "Stage_8" ["Visible"]=> bool(true) } }

Thanks .


arbei
User
Posts: 9384

Post by arbei »

You may try and post your code for discussion. As you can see the captions are there for you to change.


elonmusk
User
Posts: 48

Post by elonmusk »

public function pageRender()
    {
        //Log("Page Render");
	$this->Stage_1->Caption('kitting')
    }

arbei
User
Posts: 9384

Post by arbei »

arbei wrote:

As you can see the captions are there for you to change.

But you did not use $this->Columns at all.


elonmusk
User
Posts: 48

Post by elonmusk »

how to get my need ?
give one example .


mobhar
User
Posts: 11727

Post by mobhar »

Let's say you wanted to change the Caption of first column, then simply put this following code in Page_Render server event of your Crosstab Report:

$this->Columns[1]->Caption = "My New Caption";

elonmusk
User
Posts: 48

Post by elonmusk »

Thanks for your response !


Post Reply