Long Product Names Cut Off

Stimulsoft Reports.JS discussion
Post Reply
katebishop
Posts: 1
Joined: Fri Jul 12, 2024 2:02 am

Long Product Names Cut Off

Post by katebishop »

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?
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Long Product Names Cut Off

Post by Lech Kulikowski »

Hello,

Please send your mrt file for analysis.

Thank you.
Post Reply