function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Hiding a Page block in print

I have a VF page in that , Save, Cancel and Print Buttons are there.
A page block i der to take the input and save.
What i want to do is... What I saved the record that I need to print.For that i took another pageblock to get the values from the object .
While loading the Vf Page i dont want to display the output page block.
When i click on print button the output pageblock needs to print

Hi Uday, 

You have to create another visualforce page and give / generate print.



Carolina Ruiz MedinaCarolina Ruiz Medina
Hi Uday,
Ashish is correct you will need another VF page in order to create the print format. Or might be you could use the following aproach:
on the <apex:page > tag there is an attribute renderas="{!RendeMyPageAs}" , here you can control the type of rendering you want to use from your controller and in the same whay you car render or not the elements using the attribute on them "rendered" and having a function in the controller again to control when it will render or no.
Hope this little info helps. Good Luck!

Kind Regards,