Skip to content

[error] <pre>content</pre>  #476

Open

Description

@Jacyking

image

Activity

  1. Jacyking commented on Dec 26, 2024

    @Jacyking
    Author

    image
    maybe it can not auto start new page ?

  2. fralx commented on Dec 27, 2024

    @fralx
    Owner

    Hi! If I'm being honest, I don't fully understand what the problem is.
    If you want the component to be split into parts and moved to another page, the DataBand it needs to be splitable.
    startNewPage starts rendering the band from a new page.
    startFromNewPage breaks the DataBand and ReportHeader, without setting this flag, the ReportHeader will be on the same page.

  3. Jacyking commented on Dec 30, 2024

    @Jacyking
    Author

    image
    maybe rect calculation error?
    QString(R"(<td style='padding-right: 50px; padding-bottom: 10px; white-space: pre;'>%1</td>)").arg(text)
    the databand should not be on the page footer

  4. Jacyking commented on Feb 8, 2025

    @Jacyking
    Author

    Hi! If I'm being honest, I don't fully understand what the problem is. If you want the component to be split into parts and moved to another page, the DataBand it needs to be splitable. startNewPage starts rendering the band from a new page. startFromNewPage breaks the DataBand and ReportHeader, without setting this flag, the ReportHeader will be on the same page.

    the databand should not be on the page footer

  5. fralx commented on Feb 8, 2025

    @fralx
    Owner

    Hi! Could You send me an example ( report template with data ) ?

  6. Jacyking commented on Feb 10, 2025

    @Jacyking
    Author

    run with limereport:
    Image

    1.zip
    auto report = std::make_unique<LimeReport::ReportEngine>(); report->loadFromFile(":/template/1.lrxml"); auto ds = report->dataManager()->createCallbackDatasource("datas"); connect(ds, &LimeReport::ICallbackDatasource::getCallbackData, [](LimeReport::CallbackInfo info, QVariant& value) { switch (info.dataType) { case LimeReport::CallbackInfo::RowCount: value = 5; break; case LimeReport::CallbackInfo::ColumnData: if (info.index == 0) { value = R"(<table border='1'><tr><th>Date and Time</th><th>Time(h)</th><th>User</th><th>Group</th><th>Action and Reason</th></tr>)"; } else { value = R"(<tr><td>2024-12-16 19:20:18</td><td>0.0000</td><td>ABC</td><td>DEF</td><td>text</td></tr>)"; if (info.index == 4) { value = value.toString() + "</table>"; } } break; case LimeReport::CallbackInfo::ColumnCount: value = 1; break; case LimeReport::CallbackInfo::ColumnHeaderData: value = "data"; break; default: break; } }); report->dataManager()->setReportVariable("Batch", "batch"); report->dataManager()->setReportVariable("Title", "title"); report->dataManager()->setReportVariable("Report_By", "report_by"); report->dataManager()->setReportVariable("Report_Time", "report_time"); report->dataManager()->setReportVariable( "Items", QStringList({"<div>a: 1</div>", "<div>b: 2</div>"}).join("\n")); report->dataManager()->setReportVariable( "Company", QString(R"(<a href='%1' style='color: inherit; text-decoration: none;'>%2</a>)") .arg("https://github.com/fralx/LimeReport") .arg("LimeReport")); report->previewReport();

  7. Jacyking commented on Feb 10, 2025

    @Jacyking
    Author

    run with limereport:
    Image

    1.zip
    auto report = std::make_unique<LimeReport::ReportEngine>(); report->loadFromFile(":/template/1.lrxml"); auto ds = report->dataManager()->createCallbackDatasource("datas"); connect(ds, &LimeReport::ICallbackDatasource::getCallbackData, [](LimeReport::CallbackInfo info, QVariant& value) { switch (info.dataType) { case LimeReport::CallbackInfo::RowCount: value = 5; break; case LimeReport::CallbackInfo::ColumnData: if (info.index == 0) { value = R"(<table border='1'><tr><th>Date and Time</th><th>Time(h)</th><th>User</th><th>Group</th><th>Action and Reason</th></tr>)"; } else { value = R"(<tr><td>2024-12-16 19:20:18</td><td>0.0000</td><td>ABC</td><td>DEF</td><td>text</td></tr>)"; if (info.index == 4) { value = value.toString() + "</table>"; } } break; case LimeReport::CallbackInfo::ColumnCount: value = 1; break; case LimeReport::CallbackInfo::ColumnHeaderData: value = "data"; break; default: break; } }); report->dataManager()->setReportVariable("Batch", "batch"); report->dataManager()->setReportVariable("Title", "title"); report->dataManager()->setReportVariable("Report_By", "report_by"); report->dataManager()->setReportVariable("Report_Time", "report_time"); report->dataManager()->setReportVariable( "Items", QStringList({"<div>a: 1</div>", "<div>b: 2</div>"}).join("\n")); report->dataManager()->setReportVariable( "Company", QString(R"(<a href='%1' style='color: inherit; text-decoration: none;'>%2</a>)") .arg("https://github.com/fralx/LimeReport") .arg("LimeReport")); report->previewReport();

    run with web:
    Image

  8. Jacyking commented on Feb 11, 2025

    @Jacyking
    Author

    Hi! Could You send me an example ( report template with data ) ?

    I encountered a new (above) problem when I tried to reproduce the bug
    (maybe i didn't use datasources before)

  9. Jacyking commented on Feb 11, 2025

    @Jacyking
    Author

    run with limereport:
    Image
    1.zip
    auto report = std::make_unique<LimeReport::ReportEngine>(); report->loadFromFile(":/template/1.lrxml"); auto ds = report->dataManager()->createCallbackDatasource("datas"); connect(ds, &LimeReport::ICallbackDatasource::getCallbackData, [](LimeReport::CallbackInfo info, QVariant& value) { switch (info.dataType) { case LimeReport::CallbackInfo::RowCount: value = 5; break; case LimeReport::CallbackInfo::ColumnData: if (info.index == 0) { value = R"(<table border='1'><tr><th>Date and Time</th><th>Time(h)</th><th>User</th><th>Group</th><th>Action and Reason</th></tr>)"; } else { value = R"(<tr><td>2024-12-16 19:20:18</td><td>0.0000</td><td>ABC</td><td>DEF</td><td>text</td></tr>)"; if (info.index == 4) { value = value.toString() + "</table>"; } } break; case LimeReport::CallbackInfo::ColumnCount: value = 1; break; case LimeReport::CallbackInfo::ColumnHeaderData: value = "data"; break; default: break; } }); report->dataManager()->setReportVariable("Batch", "batch"); report->dataManager()->setReportVariable("Title", "title"); report->dataManager()->setReportVariable("Report_By", "report_by"); report->dataManager()->setReportVariable("Report_Time", "report_time"); report->dataManager()->setReportVariable( "Items", QStringList({"<div>a: 1</div>", "<div>b: 2</div>"}).join("\n")); report->dataManager()->setReportVariable( "Company", QString(R"(<a href='%1' style='color: inherit; text-decoration: none;'>%2</a>)") .arg("https://github.com/fralx/LimeReport") .arg("LimeReport")); report->previewReport();

    run with web:
    Image

    run with limereport:
    Image

    reproduce the bug when the row count is 1.
    Image

  10. Jacyking commented on Feb 11, 2025

    @Jacyking
    Author

    so if i don't know the column count, i should how to do ?

  11. fralx commented on Feb 20, 2025

    @fralx
    Owner

    It seems that you have a misunderstanding about how LimeReport generates reports.
    A report consists of individual independent elements within which you can use HTML to format the text of that specific element.

  12. fralx commented on Feb 20, 2025

    @fralx
    Owner

    so if i don't know the column count, i should how to do ?

    At the moment there is no easy way to solve that issue

  13. Jacyking commented on Jun 25, 2025

    @Jacyking
    Author

    so if i don't know the column count, i should how to do ?

    At the moment there is no easy way to solve that issue

    So now i solve it by more template, it is too ....~~more more more!!
    Do you plan to support that ? like QTableView, I can set the column count.

  14. fralx commented on Jun 25, 2025

    @fralx
    Owner

    I had many plans for improving LimeReport, but unfortunately, since it doesn’t bring me any income, I had to put its development on hold until better times :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions