FastReport icon indicating copy to clipboard operation
FastReport copied to clipboard

CodeAnalysis.Common & CSharp do not work with the latest version

Open JPScerri opened this issue 7 months ago • 15 comments

Getting an issue where FastReport requires CodeAnalysis.CSharp old version. It seems I cannot downgrade my version. Working on version 2025.2.0 When we inject a footer programmatically, it throws the attached error. Seems that it does not work with the latest CodeAnalysis.Common and CodeAnalysis.CSharp

Image

JPScerri avatar Jun 02 '25 06:06 JPScerri

Hello!

Thank you for your request!

Could you please let me know if you have installed the updated CodeAnalysis.Common & CSharp packages explicitly in your application?

Best regards, Bogdan

BogdanStegachev avatar Jun 02 '25 10:06 BogdanStegachev

No, explicitly no, but the ver 4.8.0 is Transitive in various projects.

[cid:14a9f8cd-86f0-46db-9ad5-f50e38f3ea3f]

Regards

[https://ci3.googleusercontent.com/proxy/rsHNHmplT01AuRHPtZZ7tI7Oa-qdZ0ek7KXpWi7xNJuQNf5bfCApZnX3EjFI-30L7bSYWNJcGIlON5wD0dKkBWqJelwq9bBRgEur5fGmzHwXBiozZLcUC4APY0YVwcYoUuzi3-SFFqUy-mil2Ni0Z-rhQCMLAH16xVy3byT1vYd0IW9RdqEFY1W4eA-gqOzkZFk4oMOFQMNxWJWGuTC6EZALdpja2w=s0-d-e1-ft#https://storage.googleapis.com/signaturesatori/customer-C025nw29g/companyLogo/-3a63f093096ebc8ac8fda6418a70a9ce68c3d535f7f37079de4442a83680ab0c]

Jean Pierre Scerri Director @.@.> | +356 79470320 J2 Limited | +356 21559347tel:%2B356%2021559347 www.j2.com.mthttps://www.signaturesatori.com/app/ajax/customer/signature/www.j2.com.mt The Brokerage, Level 2 'A' Triq Sta. Marta Victoria VCT 2551 Gozo Malta

The information contained in this message and in any attachment is confidential and may be legally privileged. It is intended for the recipient(s) to whom it is addressed. If you are not an intended recipient and you have received this message please delete it and any attachment and all copies of it and of any such attachment from your system immediately, destroy any copies in any way whatsoever made and notify the sender. If you are not an intended recipient, you are not authorised to use, distribute, print or copy any part of this message or of any attachment, whether directly or indirectly. This message has been scanned for computer viruses, however we do not accept any liability whatsoever in respect of any potential damage caused by any virus that is not detected.


From: Bogdan Stegachev @.> Sent: 02 June 2025 12:36 To: FastReports/FastReport @.> Cc: Jean Pierre @.>; Author @.> Subject: Re: [FastReports/FastReport] CodeAnalysis.Common & CSharp do not work with the latest version (Issue #758)

[https://avatars.githubusercontent.com/u/46090791?s=20&v=4]BogdanStegachev left a comment (FastReports/FastReport#758)https://github.com/FastReports/FastReport/issues/758#issuecomment-2929952889

Hello!

Thank you for your request!

Could you please let me know if you have installed the updated CodeAnalysis.Common & CSharp packages explicitly in your application?

Best regards, Bogdan

— Reply to this email directly, view it on GitHubhttps://github.com/FastReports/FastReport/issues/758#issuecomment-2929952889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMP53DA3OPEAENTXAPHA7U33BQSLVAVCNFSM6AAAAAB6MED6XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMRZHE2TEOBYHE. You are receiving this because you authored the thread.

JPScerri avatar Jun 02 '25 14:06 JPScerri

Could you please send a problematic application with a reproduction of this issue

Best regards, Bogdan

BogdanStegachev avatar Jun 03 '25 07:06 BogdanStegachev

We're trying to create a new simple solution as the one we're using is massive. If you want, you can connect to my computer via AnyDesk or TeamViewer.

Regards

[https://ci3.googleusercontent.com/proxy/rsHNHmplT01AuRHPtZZ7tI7Oa-qdZ0ek7KXpWi7xNJuQNf5bfCApZnX3EjFI-30L7bSYWNJcGIlON5wD0dKkBWqJelwq9bBRgEur5fGmzHwXBiozZLcUC4APY0YVwcYoUuzi3-SFFqUy-mil2Ni0Z-rhQCMLAH16xVy3byT1vYd0IW9RdqEFY1W4eA-gqOzkZFk4oMOFQMNxWJWGuTC6EZALdpja2w=s0-d-e1-ft#https://storage.googleapis.com/signaturesatori/customer-C025nw29g/companyLogo/-3a63f093096ebc8ac8fda6418a70a9ce68c3d535f7f37079de4442a83680ab0c]

Jean Pierre Scerri Director @.@.> | +356 79470320 J2 Limited | +356 21559347tel:%2B356%2021559347 www.j2.com.mthttps://www.signaturesatori.com/app/ajax/customer/signature/www.j2.com.mt The Brokerage, Level 2 'A' Triq Sta. Marta Victoria VCT 2551 Gozo Malta

The information contained in this message and in any attachment is confidential and may be legally privileged. It is intended for the recipient(s) to whom it is addressed. If you are not an intended recipient and you have received this message please delete it and any attachment and all copies of it and of any such attachment from your system immediately, destroy any copies in any way whatsoever made and notify the sender. If you are not an intended recipient, you are not authorised to use, distribute, print or copy any part of this message or of any attachment, whether directly or indirectly. This message has been scanned for computer viruses, however we do not accept any liability whatsoever in respect of any potential damage caused by any virus that is not detected.


From: Bogdan Stegachev @.> Sent: 03 June 2025 10:00 To: FastReports/FastReport @.> Cc: Jean Pierre @.>; Author @.> Subject: Re: [FastReports/FastReport] CodeAnalysis.Common & CSharp do not work with the latest version (Issue #758)

[https://avatars.githubusercontent.com/u/46090791?s=20&v=4]BogdanStegachev left a comment (FastReports/FastReport#758)https://github.com/FastReports/FastReport/issues/758#issuecomment-2934017737

Could you please send a problematic application with a reproduction of this issue

Best regards, Bogdan

— Reply to this email directly, view it on GitHubhttps://github.com/FastReports/FastReport/issues/758#issuecomment-2934017737, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMP53DEF5O7NROS6QZROTJD3BVIYLAVCNFSM6AAAAAB6MED6XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMZUGAYTONZTG4. You are receiving this because you authored the thread.Message ID: @.***>

JPScerri avatar Jun 03 '25 11:06 JPScerri

We will be waiting for your application, you can send it by mail: [email protected].

Best regards, Bogdan

BogdanStegachev avatar Jun 03 '25 11:06 BogdanStegachev

Found the problem. Had RDLC reports installed too in solution.

When I removed, the versioning problem was solved. But, when I'm trying to generate a blank report and programmatically adding a Data Band and a Footer Band, only the Databand is visible. Sample attached.

protected async Task PrintReport()
{
    oFastReport.Report.Clear();

    // Create a new page
    var page = new ReportPage
    {
        Name = "Page1",
        PaperWidth = 210,
        PaperHeight = 297,
        LeftMargin = 10,
        RightMargin = 10,
        TopMargin = 10,
        BottomMargin = 10
    };
    oFastReport.Report.Pages.Add(page);

    // Register dummy data (required to force page creation)
    var table = new DataTable("Employees");
    table.Columns.Add("EName", typeof(string));
    table.Rows.Add("John Doe");

    oFastReport.RegisterData(table, "Employees");
    oFastReport.GetDataSource("Employees").Enabled = true;

    // Add a dummy databand to force report rendering
    var dataBand = new DataBand
    {
        Name = "DataBand1",
        DataSource = oFastReport.GetDataSource("Employees"),
        Height = Units.Millimeters * 10
    };

    var dataText = new TextObject
    {
        Name = "DataText",
        Bounds = new RectangleF(0, 0, Units.Millimeters * 180, Units.Millimeters * 6),
        Text = "[Employees.EName]",
        Font = new Font("Arial", 10)
    };

    dataBand.Objects.Add(dataText);
    page.Bands.Add(dataBand);

    // Add the footer
    var footer = new PageFooterBand
    {
        Name = "FooterBand",
        Height = Units.Millimeters * 10,
        FillColor = Color.Red,
        Visible = true
    };

    var footerText = new TextObject
    {
        Name = "FooterText",
        Bounds = new RectangleF(0, 0, Units.Millimeters * 190, Units.Millimeters * 6),
        Text = "© Gaudos Tech",
        Font = new Font("Arial", 9),
        HorzAlign = HorzAlign.Center,
        VertAlign = VertAlign.Center,
        FillColor = Color.Red,
        Visible = true
    };

    footer.Objects.Add(footerText);
    page.Bands.Add(footer);

    // Prepare and export
    oFastReport.Prepare();

    using var ms = new MemoryStream();
    var pdfExport = new FastReport.Export.PdfSimple.PDFSimpleExport();
    oFastReport.Export(pdfExport, ms);
    byte[] pdfBytes = ms.ToArray();

    await FileUtil.SaveAs(oJS, "EmployeeDetails.pdf", pdfBytes, "application/pdf");
}

[https://ci3.googleusercontent.com/proxy/rsHNHmplT01AuRHPtZZ7tI7Oa-qdZ0ek7KXpWi7xNJuQNf5bfCApZnX3EjFI-30L7bSYWNJcGIlON5wD0dKkBWqJelwq9bBRgEur5fGmzHwXBiozZLcUC4APY0YVwcYoUuzi3-SFFqUy-mil2Ni0Z-rhQCMLAH16xVy3byT1vYd0IW9RdqEFY1W4eA-gqOzkZFk4oMOFQMNxWJWGuTC6EZALdpja2w=s0-d-e1-ft#https://storage.googleapis.com/signaturesatori/customer-C025nw29g/companyLogo/-3a63f093096ebc8ac8fda6418a70a9ce68c3d535f7f37079de4442a83680ab0c]

Jean Pierre Scerri Director @.@.> | +356 79470320 J2 Limited | +356 21559347tel:%2B356%2021559347 www.j2.com.mthttps://www.signaturesatori.com/app/ajax/customer/signature/www.j2.com.mt The Brokerage, Level 2 'A' Triq Sta. Marta Victoria VCT 2551 Gozo Malta

The information contained in this message and in any attachment is confidential and may be legally privileged. It is intended for the recipient(s) to whom it is addressed. If you are not an intended recipient and you have received this message please delete it and any attachment and all copies of it and of any such attachment from your system immediately, destroy any copies in any way whatsoever made and notify the sender. If you are not an intended recipient, you are not authorised to use, distribute, print or copy any part of this message or of any attachment, whether directly or indirectly. This message has been scanned for computer viruses, however we do not accept any liability whatsoever in respect of any potential damage caused by any virus that is not detected.


From: Bogdan Stegachev @.> Sent: 03 June 2025 13:38 To: FastReports/FastReport @.> Cc: Jean Pierre @.>; Author @.> Subject: Re: [FastReports/FastReport] CodeAnalysis.Common & CSharp do not work with the latest version (Issue #758)

[https://avatars.githubusercontent.com/u/46090791?s=20&v=4]BogdanStegachev left a comment (FastReports/FastReport#758)https://github.com/FastReports/FastReport/issues/758#issuecomment-2934832033

We will be waiting for your application, you can send it by mail: @.@.>.

Best regards, Bogdan

— Reply to this email directly, view it on GitHubhttps://github.com/FastReports/FastReport/issues/758#issuecomment-2934832033, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMP53DD55FR64PSPNZHM2Y33BWCKZAVCNFSM6AAAAAB6MED6XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMZUHAZTEMBTGM. You are receiving this because you authored the thread.Message ID: @.***>

JPScerri avatar Jun 03 '25 14:06 JPScerri

Here is an example of creating code through code:

Report report = new Report();

// register the "Products" table
report.RegisterData(dataSet1.Tables["Products"], "Products");

// enable it to use in a report
report.GetDataSource("Products").Enabled = true;

// create A4 page with all margins set to 1cm
ReportPage page1 = new ReportPage();
page1.Name = "Page1";
report.Pages.Add(page1);

// create ReportTitle band
page1.ReportTitle = new ReportTitleBand();
page1.ReportTitle.Name = "ReportTitle1";

// set its height to 1.5cm
page1.ReportTitle.Height = Units.Centimeters * 1.5f;

// create group header
GroupHeaderBand group1 = new GroupHeaderBand();
group1.Name = "GroupHeader1";
group1.Height = Units.Centimeters * 1;

// set group condition
group1.Condition = "[Products.ProductName].Substring(0, 1)";

// add group to the page.Bands collection
page1.Bands.Add(group1);

// create group footer
group1.GroupFooter = new GroupFooterBand();
group1.GroupFooter.Name = "GroupFooter1";
group1.GroupFooter.Height = Units.Centimeters * 1;

// create DataBand
DataBand data1 = new DataBand();
data1.Name = "Data1";
data1.Height = Units.Centimeters * 0.5f;

// set data source
data1.DataSource = report.GetDataSource("Products");

// connect databand to a group
group1.Data = data1;

// create "Text" objects
// report title
TextObject text1 = new TextObject();
text1.Name = "Text1";

// set bounds
text1.Bounds = new RectangleF(0, 0, Units.Centimeters * 19, Units.Centimeters * 1);

// set text
text1.Text = "PRODUCTS";

// set appearance
text1.HorzAlign = HorzAlign.Center;
text1.Font = new Font("Tahoma", 14, FontStyle.Bold);

// add it to ReportTitle
page1.ReportTitle.Objects.Add(text1);

// group
TextObject text2 = new TextObject();
text2.Name = "Text2";
text2.Bounds = new RectangleF(0, 0, Units.Centimeters * 2, Units.Centimeters * 1);
text2.Text = "[[Products.ProductName].Substring(0, 1)]";
text2.Font = new Font("Tahoma", 10, FontStyle.Bold);

// add it to GroupHeader
group1.Objects.Add(text2);

// data band
TextObject text3 = new TextObject();
text3.Name = "Text3";
text3.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
text3.Text = "[Products.ProductName]";
text3.Font = new Font("Tahoma", 8);

// add it to DataBand
data1.Objects.Add(text3);

// group footer
TextObject text4 = new TextObject();
text4.Name = "Text4";
text4.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
text4.Text = "Count: [CountOfProducts]";
text4.Font = new Font("Tahoma", 8, FontStyle.Bold);

// add it to GroupFooter
group1.GroupFooter.Objects.Add(text4);

// add a total
Total groupTotal = new Total();
groupTotal.Name = "CountOfProducts";
groupTotal.TotalType = TotalType.Count;
groupTotal.Evaluator = data1;
groupTotal.PrintOn = group1.Footer;

// add it to report totals
report.Dictionary.Totals.Add(groupTotal);

// run the report
report.Show();

Best regards, Bogdan

BogdanStegachev avatar Jun 04 '25 15:06 BogdanStegachev

Thanks a lot. Will test it tomorrow morning and let you know.

Regards

[https://ci3.googleusercontent.com/proxy/rsHNHmplT01AuRHPtZZ7tI7Oa-qdZ0ek7KXpWi7xNJuQNf5bfCApZnX3EjFI-30L7bSYWNJcGIlON5wD0dKkBWqJelwq9bBRgEur5fGmzHwXBiozZLcUC4APY0YVwcYoUuzi3-SFFqUy-mil2Ni0Z-rhQCMLAH16xVy3byT1vYd0IW9RdqEFY1W4eA-gqOzkZFk4oMOFQMNxWJWGuTC6EZALdpja2w=s0-d-e1-ft#https://storage.googleapis.com/signaturesatori/customer-C025nw29g/companyLogo/-3a63f093096ebc8ac8fda6418a70a9ce68c3d535f7f37079de4442a83680ab0c]

Jean Pierre Scerri Director @.@.> | +356 79470320 J2 Limited | +356 21559347tel:%2B356%2021559347 www.j2.com.mthttps://www.signaturesatori.com/app/ajax/customer/signature/www.j2.com.mt The Brokerage, Level 2 'A' Triq Sta. Marta Victoria VCT 2551 Gozo Malta

The information contained in this message and in any attachment is confidential and may be legally privileged. It is intended for the recipient(s) to whom it is addressed. If you are not an intended recipient and you have received this message please delete it and any attachment and all copies of it and of any such attachment from your system immediately, destroy any copies in any way whatsoever made and notify the sender. If you are not an intended recipient, you are not authorised to use, distribute, print or copy any part of this message or of any attachment, whether directly or indirectly. This message has been scanned for computer viruses, however we do not accept any liability whatsoever in respect of any potential damage caused by any virus that is not detected.


From: Bogdan Stegachev @.> Sent: 04 June 2025 17:11 To: FastReports/FastReport @.> Cc: Jean Pierre @.>; Author @.> Subject: Re: [FastReports/FastReport] CodeAnalysis.Common & CSharp do not work with the latest version (Issue #758)

[https://avatars.githubusercontent.com/u/46090791?s=20&v=4]BogdanStegachev left a comment (FastReports/FastReport#758)https://github.com/FastReports/FastReport/issues/758#issuecomment-2940411869

Here is an example of creating code through code:

Report report = new Report();

// register the "Products" table report.RegisterData(dataSet1.Tables["Products"], "Products");

// enable it to use in a report report.GetDataSource("Products").Enabled = true;

// create A4 page with all margins set to 1cm ReportPage page1 = new ReportPage(); page1.Name = "Page1"; report.Pages.Add(page1);

// create ReportTitle band page1.ReportTitle = new ReportTitleBand(); page1.ReportTitle.Name = "ReportTitle1";

// set its height to 1.5cm page1.ReportTitle.Height = Units.Centimeters * 1.5f;

// create group header GroupHeaderBand group1 = new GroupHeaderBand(); group1.Name = "GroupHeader1"; group1.Height = Units.Centimeters * 1;

// set group condition group1.Condition = "[Products.ProductName].Substring(0, 1)";

// add group to the page.Bands collection page1.Bands.Add(group1);

// create group footer group1.GroupFooter = new GroupFooterBand(); group1.GroupFooter.Name = "GroupFooter1"; group1.GroupFooter.Height = Units.Centimeters * 1;

// create DataBand DataBand data1 = new DataBand(); data1.Name = "Data1"; data1.Height = Units.Centimeters * 0.5f;

// set data source data1.DataSource = report.GetDataSource("Products");

// connect databand to a group group1.Data = data1;

// create "Text" objects // report title TextObject text1 = new TextObject(); text1.Name = "Text1";

// set bounds text1.Bounds = new RectangleF(0, 0, Units.Centimeters * 19, Units.Centimeters * 1);

// set text text1.Text = "PRODUCTS";

// set appearance text1.HorzAlign = HorzAlign.Center; text1.Font = new Font("Tahoma", 14, FontStyle.Bold);

// add it to ReportTitle page1.ReportTitle.Objects.Add(text1);

// group TextObject text2 = new TextObject(); text2.Name = "Text2"; text2.Bounds = new RectangleF(0, 0, Units.Centimeters * 2, Units.Centimeters * 1); text2.Text = "[[Products.ProductName].Substring(0, 1)]"; text2.Font = new Font("Tahoma", 10, FontStyle.Bold);

// add it to GroupHeader group1.Objects.Add(text2);

// data band TextObject text3 = new TextObject(); text3.Name = "Text3"; text3.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f); text3.Text = "[Products.ProductName]"; text3.Font = new Font("Tahoma", 8);

// add it to DataBand data1.Objects.Add(text3);

// group footer TextObject text4 = new TextObject(); text4.Name = "Text4"; text4.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f); text4.Text = "Count: [CountOfProducts]"; text4.Font = new Font("Tahoma", 8, FontStyle.Bold);

// add it to GroupFooter group1.GroupFooter.Objects.Add(text4);

// add a total Total groupTotal = new Total(); groupTotal.Name = "CountOfProducts"; groupTotal.TotalType = TotalType.Count; groupTotal.Evaluator = data1; groupTotal.PrintOn = group1.Footer;

// add it to report totals report.Dictionary.Totals.Add(groupTotal);

// run the report report.Show();

Best regards, Bogdan

— Reply to this email directly, view it on GitHubhttps://github.com/FastReports/FastReport/issues/758#issuecomment-2940411869, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMP53DH2MPQQPLU5FWJ37H33B4ECJAVCNFSM6AAAAAB6MED6XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNBQGQYTCOBWHE. You are receiving this because you authored the thread.Message ID: @.***>

JPScerri avatar Jun 04 '25 15:06 JPScerri

We will be waiting for your feedback!

Best regards, Bogdan

BogdanStegachev avatar Jun 05 '25 12:06 BogdanStegachev

Hi Bogdan

We have amended the code you sent us as per below, as the report.Show() does not exist. The output is per attached PDF.

It seems that you're creating a group and then adding a header & footer to the group.

What we need that a page header and page footer, where the header it always display at the very top of the page and the footer is always displayed at the very bottom of the page. The footer will be used to contain the page number and copyright, for example, while the header will contain the report name, date printed and by whom.

protected async Task PrintReport()
{
    Report report = new Report();

    // Setup data
    DataTable oDataTable = new DataTable("Products");
    oDataTable.Columns.Add("ProductName", typeof(string));
    oDataTable.Rows.Add("Bikash Paudyal - 1st Product");
    report.RegisterData(oDataTable, "Products");

    //// register the "Products" table
    //report.RegisterData(dataSet1.Tables["Products"], "Products");

    // enable it to use in a report
    report.GetDataSource("Products").Enabled = true;

    // create A4 page with all margins set to 1cm
    ReportPage page1 = new ReportPage();
    page1.Name = "Page1";
    report.Pages.Add(page1);

    // create ReportTitle band
    page1.ReportTitle = new ReportTitleBand();
    page1.ReportTitle.Name = "ReportTitle1";

    // set its height to 1.5cm
    page1.ReportTitle.Height = Units.Centimeters * 1.5f;

    // create group header
    GroupHeaderBand group1 = new GroupHeaderBand();
    group1.Name = "GroupHeader1";
    group1.Height = Units.Centimeters * 1;

    // set group condition
    group1.Condition = "[Products.ProductName].Substring(0, 1)";

    // add group to the page.Bands collection
    page1.Bands.Add(group1);

    // create group footer
    group1.GroupFooter = new GroupFooterBand();
    group1.GroupFooter.Name = "GroupFooter1";
    group1.GroupFooter.Height = Units.Centimeters * 1;

    // create DataBand
    DataBand data1 = new DataBand();
    data1.Name = "Data1";
    data1.Height = Units.Centimeters * 0.5f;

    // set data source
    data1.DataSource = report.GetDataSource("Products");

    // connect databand to a group
    group1.Data = data1;

    // create "Text" objects
    // report title
    TextObject text1 = new TextObject();
    text1.Name = "Text1";

    // set bounds
    text1.Bounds = new RectangleF(0, 0, Units.Centimeters * 19, Units.Centimeters * 1);

    // set text
    text1.Text = "PRODUCTS Header";

    // set appearance
    text1.HorzAlign = HorzAlign.Center;
    text1.Font = new Font("Tahoma", 14, FontStyle.Bold);

    // add it to ReportTitle
    page1.ReportTitle.Objects.Add(text1);

    // group
    TextObject text2 = new TextObject();
    text2.Name = "Text2";
    text2.Bounds = new RectangleF(0, 0, Units.Centimeters * 2, Units.Centimeters * 1);
    text2.Text = "[[Products.ProductName].Substring(0, 1)]";
    text2.Font = new Font("Tahoma", 10, FontStyle.Bold);

    // add it to GroupHeader
    group1.Objects.Add(text2);

    // data band
    TextObject text3 = new TextObject();
    text3.Name = "Text3";
    text3.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
    text3.Text = "[Products.ProductName]";
    text3.Font = new Font("Tahoma", 8);

    // add it to DataBand
    data1.Objects.Add(text3);

    // group footer
    TextObject text4 = new TextObject();
    text4.Name = "Text4";
    text4.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
    text4.Text = "Count (in Footer): [CountOfProducts]";
    text4.Font = new Font("Tahoma", 8, FontStyle.Bold);

    // add it to GroupFooter
    group1.GroupFooter.Objects.Add(text4);

    // add a total
    Total groupTotal = new Total();
    groupTotal.Name = "CountOfProducts";
    groupTotal.TotalType = TotalType.Count;
    groupTotal.Evaluator = data1;
    groupTotal.PrintOn = group1.Footer;

    // add it to report totals
    report.Dictionary.Totals.Add(groupTotal);

    // run the report
    //report.Show();

    // Prepare and export
    report.Prepare();


    using var ms = new MemoryStream();
    var pdfExport = new FastReport.Export.PdfSimple.PDFSimpleExport();
    report.Export(pdfExport, ms);
    byte[] pdfBytes = ms.ToArray();

    await FileUtil.SaveAs(oJS, "Products.pdf", pdfBytes, "application/pdf");

}

Regards

[https://ci3.googleusercontent.com/proxy/rsHNHmplT01AuRHPtZZ7tI7Oa-qdZ0ek7KXpWi7xNJuQNf5bfCApZnX3EjFI-30L7bSYWNJcGIlON5wD0dKkBWqJelwq9bBRgEur5fGmzHwXBiozZLcUC4APY0YVwcYoUuzi3-SFFqUy-mil2Ni0Z-rhQCMLAH16xVy3byT1vYd0IW9RdqEFY1W4eA-gqOzkZFk4oMOFQMNxWJWGuTC6EZALdpja2w=s0-d-e1-ft#https://storage.googleapis.com/signaturesatori/customer-C025nw29g/companyLogo/-3a63f093096ebc8ac8fda6418a70a9ce68c3d535f7f37079de4442a83680ab0c]

Jean Pierre Scerri Director @.@.> | +356 79470320 J2 Limited | +356 21559347tel:%2B356%2021559347 www.j2.com.mthttps://www.signaturesatori.com/app/ajax/customer/signature/www.j2.com.mt The Brokerage, Level 2 'A' Triq Sta. Marta Victoria VCT 2551 Gozo Malta

The information contained in this message and in any attachment is confidential and may be legally privileged. It is intended for the recipient(s) to whom it is addressed. If you are not an intended recipient and you have received this message please delete it and any attachment and all copies of it and of any such attachment from your system immediately, destroy any copies in any way whatsoever made and notify the sender. If you are not an intended recipient, you are not authorised to use, distribute, print or copy any part of this message or of any attachment, whether directly or indirectly. This message has been scanned for computer viruses, however we do not accept any liability whatsoever in respect of any potential damage caused by any virus that is not detected.


From: Bogdan Stegachev @.> Sent: 05 June 2025 14:41 To: FastReports/FastReport @.> Cc: Jean Pierre @.>; Author @.> Subject: Re: [FastReports/FastReport] CodeAnalysis.Common & CSharp do not work with the latest version (Issue #758)

[https://avatars.githubusercontent.com/u/46090791?s=20&v=4]BogdanStegachev left a comment (FastReports/FastReport#758)https://github.com/FastReports/FastReport/issues/758#issuecomment-2944101435

We will be waiting for your feedback!

Best regards, Bogdan

— Reply to this email directly, view it on GitHubhttps://github.com/FastReports/FastReport/issues/758#issuecomment-2944101435, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMP53DAEAPTOV2ZU4BKXYAT3CA3HZAVCNFSM6AAAAAB6MED6XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNBUGEYDCNBTGU. You are receiving this because you authored the thread.

JPScerri avatar Jun 06 '25 06:06 JPScerri

I'm sending you the test application below

FromCode (2).zip

Best regards, Bogdan

BogdanStegachev avatar Jun 06 '25 14:06 BogdanStegachev

Hi Bogdan

Thanks for your sample project. We're now getting the hand of it. We encountered these two small issues, always when programmatically generating the report. We're using the community edition, .net 9 Blazor SSR:

When exporting reports to pdf, the TotalPages evaluates to 0 * Need to print SVG, but seems it does not support it.

Regards

[https://ci3.googleusercontent.com/proxy/rsHNHmplT01AuRHPtZZ7tI7Oa-qdZ0ek7KXpWi7xNJuQNf5bfCApZnX3EjFI-30L7bSYWNJcGIlON5wD0dKkBWqJelwq9bBRgEur5fGmzHwXBiozZLcUC4APY0YVwcYoUuzi3-SFFqUy-mil2Ni0Z-rhQCMLAH16xVy3byT1vYd0IW9RdqEFY1W4eA-gqOzkZFk4oMOFQMNxWJWGuTC6EZALdpja2w=s0-d-e1-ft#https://storage.googleapis.com/signaturesatori/customer-C025nw29g/companyLogo/-3a63f093096ebc8ac8fda6418a70a9ce68c3d535f7f37079de4442a83680ab0c]

Jean Pierre Scerri Director @.@.> | +356 79470320 J2 Limited | +356 21559347tel:%2B356%2021559347 www.j2.com.mthttps://www.signaturesatori.com/app/ajax/customer/signature/www.j2.com.mt The Brokerage, Level 2 'A' Triq Sta. Marta Victoria VCT 2551 Gozo Malta

The information contained in this message and in any attachment is confidential and may be legally privileged. It is intended for the recipient(s) to whom it is addressed. If you are not an intended recipient and you have received this message please delete it and any attachment and all copies of it and of any such attachment from your system immediately, destroy any copies in any way whatsoever made and notify the sender. If you are not an intended recipient, you are not authorised to use, distribute, print or copy any part of this message or of any attachment, whether directly or indirectly. This message has been scanned for computer viruses, however we do not accept any liability whatsoever in respect of any potential damage caused by any virus that is not detected.


From: Bogdan Stegachev @.> Sent: 06 June 2025 16:26 To: FastReports/FastReport @.> Cc: Jean Pierre @.>; Author @.> Subject: Re: [FastReports/FastReport] CodeAnalysis.Common & CSharp do not work with the latest version (Issue #758)

[https://avatars.githubusercontent.com/u/46090791?s=20&v=4]BogdanStegachev left a comment (FastReports/FastReport#758)https://github.com/FastReports/FastReport/issues/758#issuecomment-2949432700

I'm sending you the test application below

FromCode (2).ziphttps://github.com/user-attachments/files/20630051/FromCode.2.zip

Best regards, Bogdan

— Reply to this email directly, view it on GitHubhttps://github.com/FastReports/FastReport/issues/758#issuecomment-2949432700, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMP53DGWX6EWAZLK6PXJXET3CGQJPAVCNFSM6AAAAAB6MED6XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNBZGQZTENZQGA. You are receiving this because you authored the thread.Message ID: @.***>

JPScerri avatar Jun 09 '25 12:06 JPScerri

To solve the problem with TotalPages, you will need to enable the DoublePass property of the Report object.

Do you need to export to SVG? You will be able to test the correctness of this export using FastReprot .NET WinForms Trial product.

Best regards, Bogdan

BogdanStegachev avatar Jun 09 '25 14:06 BogdanStegachev

Hi Bogdan

Thanks for the update. Found the DoublePass property and will test tomorrow. In the meantime, we found TotalPages# and this seems to work too.

As regards to SVG, no we do not need to export to SVG, but display an SVG image inside the report. Can it be done in the community edition for .net 9 core blazor ssr?

Regards

[https://ci3.googleusercontent.com/proxy/rsHNHmplT01AuRHPtZZ7tI7Oa-qdZ0ek7KXpWi7xNJuQNf5bfCApZnX3EjFI-30L7bSYWNJcGIlON5wD0dKkBWqJelwq9bBRgEur5fGmzHwXBiozZLcUC4APY0YVwcYoUuzi3-SFFqUy-mil2Ni0Z-rhQCMLAH16xVy3byT1vYd0IW9RdqEFY1W4eA-gqOzkZFk4oMOFQMNxWJWGuTC6EZALdpja2w=s0-d-e1-ft#https://storage.googleapis.com/signaturesatori/customer-C025nw29g/companyLogo/-3a63f093096ebc8ac8fda6418a70a9ce68c3d535f7f37079de4442a83680ab0c]

Jean Pierre Scerri Director @.@.> | +356 79470320 J2 Limited | +356 21559347tel:%2B356%2021559347 www.j2.com.mthttps://www.signaturesatori.com/app/ajax/customer/signature/www.j2.com.mt The Brokerage, Level 2 'A' Triq Sta. Marta Victoria VCT 2551 Gozo Malta

The information contained in this message and in any attachment is confidential and may be legally privileged. It is intended for the recipient(s) to whom it is addressed. If you are not an intended recipient and you have received this message please delete it and any attachment and all copies of it and of any such attachment from your system immediately, destroy any copies in any way whatsoever made and notify the sender. If you are not an intended recipient, you are not authorised to use, distribute, print or copy any part of this message or of any attachment, whether directly or indirectly. This message has been scanned for computer viruses, however we do not accept any liability whatsoever in respect of any potential damage caused by any virus that is not detected.


From: Bogdan Stegachev @.> Sent: 09 June 2025 16:07 To: FastReports/FastReport @.> Cc: Jean Pierre @.>; Author @.> Subject: Re: [FastReports/FastReport] CodeAnalysis.Common & CSharp do not work with the latest version (Issue #758)

[https://avatars.githubusercontent.com/u/46090791?s=20&v=4]BogdanStegachev left a comment (FastReports/FastReport#758)https://github.com/FastReports/FastReport/issues/758#issuecomment-2955903466

To solve the problem with TotalPages, you will need to enable the DoublePass property of the Report object.

Do you need to export to SVG? You will be able to test the correctness of this export using FastReprot .NET WinForms Trial product.

Best regards, Bogdan

— Reply to this email directly, view it on GitHubhttps://github.com/FastReports/FastReport/issues/758#issuecomment-2955903466, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMP53DBXDLR4ENPL2XPJFTD3CWIJBAVCNFSM6AAAAAB6MED6XKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNJVHEYDGNBWGY. You are receiving this because you authored the thread.Message ID: @.***>

JPScerri avatar Jun 09 '25 16:06 JPScerri

Unfortunately SVGObject is not included in FastReport Community Edition

Best regards, Bogdan

BogdanStegachev avatar Jun 10 '25 07:06 BogdanStegachev