In order to use multi formatted text, Database fields, scripts, Parameters, Calculated Fields within a single Field, Paragraph field is the best option for you. In edit mode, you can implement following features through Paragraph field:
- Type static text.
- Insert a newline by pressing Ctrl+Enter.
- Set font/fore color/back color for any part of the text.
- Insert expressions (like DB field values) within a single field together with the text.
- Press Alt+Enter to open Properties on any Field.
- Right-click any expression and choose 'Edit expression' to open the Expression editor.
To add a Paragraph field in FlexReportDesigner application:
- Create a new FlexReport in C1FlexReportDesigner.
- Bind it with Products Table.
- From the Insert tab, add Paragraph field on the report.
- Double-click the Paragraph field to enter in edit more.
- Type "Product:"
To insert Database fields:
- In edit mode, right-click the Paragraph field and select Insert Expression.
- In the Expression editor, select 'ProductID' from DatabaseFields dropdown.
- Click Done.
- Select "Product:{ProductID}" and set Forecolor as Green from the Ribbon.
To change new line in edit mode:
- In edit mode, press Ctrl+Enter.
- In the next line, type static text "Unit Price is" and insert 'UnitPrice' Database Field using steps above.
- Set {UnitPrice} as Bold.
To insert scripts:
- After the text - "UnitPrice is {UnitPrice}", type - "We have".
- Right-click and select Insert Expression.
- Add following script:
Iif(UnitsInStock > 0, UnitsInStock, "No")
- Click Done.
- After this script expression, type static text - "units in stock."
- Select the script while in edit mode and set it to Bold.
- Press Ctrl+Enter.
- In newline, right-click and select Insert Expression.
- Type following script:
Iif(Discontinued, "This product is no longer available", "")
/
- Click Done.
- Select the above mentioned script and set Highlight color to 'Orange, Accent 6 Lighter 60%' and Forecolor to Red.
- Preview the report.