You need to sign in to do that
Don't have an account?
Victor Echeverría
Add line brakes inside a Case Text Output
I'm creating a visualforce page that renders as a PDF which uses various Case functions with only text outputs. I want the output to look organized and clean and for that I want to add line breaks inside that output.
Here's a snip of my code. I want a line brake after every sentence but when it renders it shows as a long paragraph without any breaks. Is there any way to do this?
Here's a snip of my code. I want a line brake after every sentence but when it renders it shows as a long paragraph without any breaks. Is there any way to do this?
<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line"> <tr> <td align="center">{!line.PricebookEntry.Name}</td> <td><br/> {!CASE(line.PricebookEntry.Name, "Tracx", "Acceso a una cuenta de Tracx. Set-up personalizado. Actividades ilimitadas. Usuarios ilimitados. Reportes descargables ilimitados. Alertas ilimitadas. Optimización de actividades. Personalización de diccionarios. Creación de usuarios con restricciones en base a solicitud del cliente. Account Manager designado. Capacitación para el equipo que utilizará la herramienta. Feedback e insights de valor. Atención vía email, whatsapp y teléfono.", "TurboAds", "Acceso a una cuenta básica de Turbo 1 usuario. Account Manager designado. Capacitación para el equipo que utilizará la herramienta. Feedback e insights de valor. Atención vía email, whatsapp y teléfono. ", "Shareablee", "Acceso a una cuenta básica de Shareablee de tu industria. Account Manager designado. Capacitación para el equipo que utilizará la herramienta. Feedback e insights de valor. Atención vía email, whatsapp y teléfono.", "")} <br/><br/> </td> <td><apex:OutputField value="{!line.TotalPrice}"/></td> </tr> </apex:repeat>
When I add "<br/>" at the end of each sentence it gives me the following error: Error: Syntax error. Found '>'. Not sure if I'm missing anything or if there is another method to accomplish what I'm trying to do
Do mark my answer as best answer if it helped solve your problem.
I wrote the </br> as you posted but it only gets printed into the PDF Document. It seems that whatever is between " " only gets printed. Putting it with double quotes gives a syntax error. This really shouldn't be that hard... I'm sure there is an easy way to accomplish these
The above code renders as a pdf document that we use for quotes. Each client can have several products and each product comes with it's own terms and conditions. I use a CASE to Identify what products the client wants and write in the quote the corresponding terms and conditions. The thing is I want the terms and conditions to appear in Bullet form:
-Term 1
-Term 2
-Term 3
But havent found a way to replicate the efect of <br/> in the case output so it renders like this:
-Term1 -Term2 -Term3
I hope this explanation helps you understand
This is the entire piece of code that conserns me. The thing is that when it renders this is how it ends up
I want all the text in the middle to appear in bullet form. One Sentence for each bullet.
I'm not sure if <apex:pageBlock> doesn't work correctly when it is rendered as a PDF. It compiles just fine but form some reason it only prints this yellow line. Any ideas as to what could it be?
I removed escape="false" from the tag but still have the same output. The same yellow line continues to appear in the document. Is there anything I can put in the <apex:pageBlock> tag so it doesn't collapse?