Hi Sahil,
One way to achieve that is to:
- Double-click the CurBal data field in your report > the "Edit Data Binding" window appears
- Click the "fx" button next to the "Expression" field > the "Expression Builder" window appears
- Type + " - " + at the end of the expression, then select the qty field in the bottom section of the dialog from either "Available Data Sets" or "Available Column Bindings"
The expression will now look something similar to this:
dataSetRow["curbal"] + " - " + dataSetRow["qty"]
Each output column from your data set that you drag-n-drop onto the report layout is creating a data element bound to a particular report table and output column; however, data cells are controlled by expressions, so they can be adapted to contain several data elements in one. What the steps above are doing are using JavaScript string concatenation to concatenate the data value from the current balance output column, a hyphen, and the data value from the quantity output column. This implementation assumes that quantity will always have a value; if the quantity is null the output value will show as "undefined". If there are cases where quantity is null, a null check can be added to quantity before being concatenated with the current balance so that if its null, only the current balance is shown.
Please let me know how these steps work out for you.
Regards,
Derek
------------------------------
Derek Steele
Sharptree
------------------------------
Original Message:
Sent: 08-14-2022 15:21
From: Sahil Dutta
Subject: Birt Report Issue
#Reporting
------------------------------
Sahil Dutta
xyz
------------------------------