On this page we have gathered some tips and tricks for the report generator.
Got code in bank statement
If you want a FIK code in your bank statement where the customer can pay several invoices at once, simply insert the field:
[DebtorInfo].[FIK Code]
Fields must be inserted in either the PageHeader or PageFooter ribbon.
Show zero VAT on totals
Under the VAT setup, check the VAT code with 0% in the field Show 0,0 on the invoice.
Country name
If you want country names on your standard reports, you should use CountryName and DeliveryCountryName.
They print the country name correctly.
The delivery address/installation comes out 'wrong' on my invoices.
Read in the linked article how to make it work.
The delivery address/installation comes out wrong on my invoice
Currency in the Report Generator (GetExchangeRate())
It is possible to retrieve the currency amount for a specific date in the report generator. This is done via script.
using Uniconta.DataModel;
using Uniconta.Common;
private void label5_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) {
var repObj = (Uniconta.ClientTools.DataModel.IReportScript)reportInstance;
var xrlabel = sender as XRLabel;
if(repObj != null)
{
var exchangeRate = repObj.GetExchangeRate(Currencies.DKK,Currencies.EUR,DateTime.Now);
if(xrlabel != null)
xrlabel.Text = Convert.ToString(exchangeRate);
}
else
xrlabel.Text = "No Conversion";
}
XtraReport reportInstance;
private void Invoice_23052022_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) {
reportInstance = sender as XtraReport;
}
The above script must be created BeforePrint, and in the above case, the code is placed on a label called 'label5' and the result is shown in the red box below.
Updating old reports
If you have an old report where you can't find
f in properties, for example, you can update the bindings in the report.
NOTE! Make a copy of the report and test the copy before making a final update of the report.

Click Convert Bindings and select Yes to continue. If you get the error: 'Conversion faild', simply close your copy and open it again.
If you haven't done too much custom coding, it should fall into place when you open the report again.
Parameters in Multisource reports
If you are using Multisource reports and using parameters, you must specify the name of the table you want to filter on in the parameter name.
Here a parameter has been created on the 'CRMFollowUpClientUser' table. The name therefore contains the table name 'CRMFollowUpClientUser'. You can write: 'prmEmp_' in front of it.

For the parameters to work, a filter must be set on each band for the individual tables selected in the Multisource report.

The filter field is located under the sprocket on the belt.
Translate texts using your own labels
It is possible to use your own labels to translate your own texts in the report generator. However, this requires that you have created labels for all the languages used in the accounts.
An example could be that you want the payment terms in several different languages. This is also possible using fixed texts, using an Iif statement, and can look like the following:
iif([DebtorInfo].[Sprogkode]=1,
FormatString('Terms of payment: {0} - final due date for payment {1:dd-MM-yyyy}', [InvoiceInfo].[PaymentRef].[Navn],[InvoiceInfo].[Forfaldsdato]),
FormatString('Betalingsbetingelser: {0} - betaling senest den {1:dd-MM-yyyy}', [InvoiceInfo].[PaymentRef].[Navn],[InvoiceInfo].[Forfaldsdato]))
The above is manageable with two or three languages, but if you want more languages, you can use labels.
First, you need to create a label for each text and language you need. Read more about
Custom labels here...
In the example above, we need a label containing the text, "Terms of payment: " and one with " - final due date for payment ", and the equivalent in Danish, "Betalingsbetingelser " and " - betaling senest den ".
In the report, you need to insert two Labels where you write the label name, e.g. @Item for item name, or @DueDate for due date.
These labels need to be hidden, i.e. you need to uncheck the Visible box under the Properties menu and Appearance (the two cogs).
You insert another label to be used to write the text you want on your report.
To get the same result as the above code, you need to create the following FormatString() in this field
FormatString('{0} {1} - {2} {3:dd-MM-yyy}', [ReportItems.lblPaymentText].[Text], [InvoiceInfo].[PaymentRef].[Navn], [ReportItems.lblDueDate].[Text], [InvoiceInfo].[Forfaldsdato])
To get the value of a label, use the function ReportItems.[name of the label you want the value of][Text].
Custom fields and tables
In the report generator, it is possible to access custom fields and table fields via Uniconta's own functions.
NOTE: When using custom tables, you must have created a field. You can't just use data in the 'Name' field, which is automatically created when you create a table.
Function |
Description of function |
GetUserFieldByIndex |
The function is used to retrieve data from custom fields or tables. This function uses indexes. |
GetUserFieldByName |
The function is used to retrieve data from user-defined fields or tables. This function uses the name. |
Number2Text |
Translates a number to text.
Number2Text(1) becomes One
Number2Text(2) becomes Two
etc. |
Example of use in a report

To copy directly
// For tabeller
GetUserFieldByIndex([InvItem].[KodeTabellenRef],0)
GetUserFieldByName([InvItem].[KodeTabellenRef],'tabFldNavn')
// For Brugerdefinerede felter
GetUserFieldByIndex([InvItem],0)
GetUserFieldByName([InvItem],'fldNavn')
- Calls a custom table. Select it via Field List in the report generator to get the correct path. Then set the index to the field you want to use in the report.
- Calls a custom table. Select it via Field List in the report generator to get the correct path. Then set the name of the field you want to use in the report. The name must be in apostrophes.
- Calls a custom field. Select the table or directory in which the field is created. In the example, a field created under the inventory, i.e. the [InvItem] directory, is shown. Then insert the index number for the field.
- Calls a custom field. Select the table or directory in which the field is created. In the example, a field created under the inventory, i.e. the [InvItem] directory, is shown. Then insert the name name of the field.
Custom tables
Custom fields
Hide the value 0.00 in quantity on an invoice report
In this example, the tax module is used on a Diesel surcharge. In some cases, this can result in a 0.00 on the invoice printout, which you want to hide.
You can do this by checking the
Number field on the report. This field is a text field and must first be changed to a number field. You do this by using the function ToDouble()

ToDouble is set around [Quantity] or the English name [FormattedInvoiceQty], as shown in the example below.
Iif(ToDouble([FormattedInvoiceQty])<>0, [FormattedInvoiceQty], '')
Here you test if the
Number field is different from 0, and if it is, the value from
Number is printed on the report.
Item lines shared on the page, at page break
If you have many order lines or long texts on your order lines, you may need more pages in your reports.
If you want to avoid the item lines being split across from one side to the other, set "Keep together" or "Keep together" for the DetailsInvTransaction ribbon
Thousand separator in reports
By default, the special reports use the country from the debtor to define how the thousand separator should be displayed.
Country |
Thousand and decimal separator |
Denmark, Germany, Italy, Netherlands, etc. |
1.234.567,89 |
Sweden, Norway, Finland etc. |
1 234 567,89 |
Great Britain, USA, China etc. |
1,234,567.89 |
Switzerland |
1'234'567.89 |
It is possible to change these settings in the custom reports. For new reports, this is innate, for old reports, you need to open the report and save a copy of the report, which then has the same option.
Open a custom report and select Edit and Set Localization.

You are then given four options
- Default: Will appear as if no localization was selected.
- Debtor language: Will use the language of the debtor to determine how the localization is displayed.
- Debtor country: Will use the country of the debtor to determine how the localization is displayed.
- Company country: Will use the company country to determine how the localization is displayed.
Invoice and MobilePay link in the report
In bank statements, reminders and interest notes, we can insert a link to the invoices listed in these reports as well as a link to MobilePay, so the customer can pay via this.
Note: MobilePay must be created in Company/Company details in the "Mobile Pay" field under the Bank accounts box
The field containing the invoice link is called:
[ ViewInvoiceLink] in English
The field containing the MobilPay link is called:
[Mobilepay link] in English:
[MobilePayLink]
The fields are located under "DebtorInfo/Transactions/" in the "Field List" in the report generator.
These fields contain a link to either invoice or MobilPay.
The new reports will automatically include these links, whereas reports created before version 87 will need to be updated manually.
Create links with logos in old reports
The logos used in the Uniconta reports can be viewed and downloaded below.
Right-click on the logo and select "Save image as..."
Save the image on your PC and these can be used in the reports.

Open the old report, including bank statements.

Use the image component to insert these two images into the "DetailTransactions" ribbon. The images here are 48*48 in size.
Under expressions in properties, select
[Link to invoice] and
[Mobilepay link], respectively, in the "Navigation URL" field - see image below.
To make these icons only appear on items that are invoiced, under expressions in properties, insert the code
Iif(Contains([IsDCInvoice], 'True'), true , false ) in the visible field.
You can also write
Iif(Len([Link to invoice])> 0
, true, false), which means that if the length of the link is greater than 0 characters, the icon will be displayed.

Save the report and test it by sending a bank statement to yourself.
Printer setup in reports
It is possible to set up a fixed printer on a report. Open the report and select the gray area around the report.
Then select Page setup in Properties. Here it is possible to select a printer.
Custom fonts in reports
Our server has the standard fonts installed on a Windows server installation.
If you want to use your own purchased fonts, they can only be used if you send your reports via Outlook. The PDF is then generated on the local PC and the font is used in it.
Product name groups in reports
Item name groups are only supported in "Special reports"
In special reports such as invoices, texts and item numbers are automatically translated if you use item name groups on your products.
If you need to write both the item name group data and the item's own information, the item's own information is retrieved from InvItem.
Report version layout is outdated
If you get the message "Report version layout is outdated", you are trying to open a report generated in a newer version of Uniconta.
Update Uniconta to the current version to resolve these issues.
Maximum file size has been exceeded
If you get the message "Maximum file size exceeded", your report most likely has a large image embedded in the report.
A report may not contain images larger than 500KB in total.

One idea could be to place the image externally on a server, website or webshop where you can retrieve the image from, so it does not take up space in the report.
Why can't other users see my updates?
Other users must exit Uniconta and start again.
If it's custom fields and they have saved a layout, then they have saved a layout without your fields and they need to delete their layout and open again.
How do I align the fields neatly?
To adjust the fields/labels in the report generator, you can use the Layout menu
First select the controlling box, then the others and then select "Left align" (1)

If you want the fields to be the same length and height, click "Make same width/height" (2)
And if you want equal or no space between the lines, click "Remove vertical spacing" (3)
My invoice only shows the first line?
If you've changed your layout and your invoice or other type of report only shows one line instead of all of them, your tape may have lost the data connection.
To solve this, right-click on the ribbon in Report Explorer, or DetailReport, and its properties will be highlighted just below:

Data Source/Data Source must be filled in for an invoice, as shown in the image above.
How do I format a price with more than two decimal places?
By default, all real numbers are formatted with two decimal places "{0:n2}". If you need more decimals, you can change the format on your label from "{0:n2}" to {0:#,###,##0.00###} as shown in the image below.
Color change in moldings
You can make color shifts in your lists, invoices, etc. so that every other line becomes a different color.
Click on images...
Insert product images in reports
- Insert an image on the report e.g. under the item lines on an invoice
- Assign the image component the image value from the inventory
- Select the small arrow next to the image
- In the Expression field, select PhotoBuffer
How do you control the size of images?
- Insert an image on the report
- Select the small arrow next to the image
- Select one of the sizing methods at the bottom of the menu that pops up
- See examples of the different sizes here: https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XRPictureBox
Insert item links in the report
If you have created and selected images, links or documents on your product, you can insert these into your reports using links.
On the product card, there are three fields;
Photo,
URL and
Attachment
These fields are named as follows in the report generator: [Photo link], [URL link] and [Attatchment link]
If you insert these fields under your item line on an invoice, for example, you can see links to the created elements on the item.
If you also want them to be 'linkable', select the fields one by one and for each field select Expressions, under properties (icon as an f), and in the Navigation URL field, select e.g. [Photo link] to make the link active on the document.
VAT on invoice layout
Lines with second-hand VAT on the invoice must be highlighted
It must be clear on the invoice which lines are covered by the second-hand VAT rules.
Therefore, add a field that shows an asterisk on the lines if the VAT on the lines is second-hand VAT.
Iif([Moms]='Unused','*' ,''' )
Info on invoices for VAT on second-hand goods
On invoices with VAT on second-hand goods, the buyer must be made aware that purchase VAT cannot be deducted.
Below is an example of the text/code snippet that can be added to the invoice layout.
Note! The code must be adapted so that the word Unused corresponds to the name of the VAT code the company uses for second-hand VAT.
Iif([InvoiceInfo].[VAT]='Unused','Items marked with * are sold according to the special rules for used goods. The buyer can therefore not deduct the VAT included in the price.' ,[InvoiceInfo].[VAT 2]='Unused','Unused','Items marked with * are sold under the special rules for used goods. Therefore, the buyer cannot deduct the VAT included in the price.','''',''' )
VAT must be hidden
The VAT amount must not appear on the invoice and must therefore be hidden.
In the panel with the VAT line, the following code must be inserted under the menu item Visible.
Note! The name Unused must be replaced by the code of the company's used VAT code.
[Moms]!='Unused'
