I'm working on creating a sales report using Stimulsoft Reports.JS. The report should display data from my company's sales database, including product names, quantities sold, and total revenue for each product. I've successfully connected to the database and can see the data in the report designer. However, when I preview or export the report, the product names are not displaying correctly. Instead, they appear as blank or show only the first character.
Code: Select all
// Assuming you're using data binding with a field named "ProductName"
var dataSource = {
// ... other data source properties
data: [
{ ProductName: "Widget", Quantity: 10, TotalRevenue: 100 },
{ ProductName: "Long-Named Gadget", Quantity: 5, TotalRevenue: 75 },
// ... other data objects
]
};
// Binding the "ProductName" field to a text element in the report
report.getReportElement("productNameText").text = dataSource.data[i].ProductName;
I've tried adjusting the font size and text wrapping settings in the report designer, but the product names are still getting cut off. Is there a specific way to handle long product names in Stimulsoft Reports.JS to ensure they display fully in the report?