Posted 11 January 2021, 6:17 am EST
Hello,
In AR14, I am not able to export report with barcodes into excel. In “Excel” version barcodes are not readable with scanner.
I used the very same report in AR6 and it worked like a charm.
Any idea?
Forums Home / ActiveReports / ActiveReports v7+
Posted by: petr on 11 January 2021, 6:17 am EST
Posted 11 January 2021, 6:17 am EST
Hello,
In AR14, I am not able to export report with barcodes into excel. In “Excel” version barcodes are not readable with scanner.
I used the very same report in AR6 and it worked like a charm.
Any idea?
Posted 12 January 2021, 3:42 am EST
Hello,
Could you please share which barcode type are you using? if possible, could you please share the stripped down report with dummy DB. So that I can replicate the issue at my end.
Thanks,
Mohit
Posted 14 January 2021, 4:40 am EST
Hello,
I am using barcode with style = “Code_128auto”. You can replicate the issue from attached project.
It is just VS2019 / “create new project” / “Activereports 14 page Report Appliacation”. My target framework is .NET Framework 4.8. Then, on “pageReport1.rdlx” is only one control - barcode control of course. Barcode1.value is hardcoded to something like ‘psx|K8523|U4556’ (similar codes we use in production environment), so I do not need a database at all.
If I start project, barcode is displayed and optionally printed. Scanning is Ok.
part 2 - basically taken from https://www.grapecity.com/activereportsnet/docs/v14/online/exporting-reports.html -you can see in form1_load
Excel export is created, but it can not be scanned. I tried page reports and section reports - no luck.
Posted 20 January 2021, 2:06 am EST
Hello,
Thanks for the project. I am able to reproduce the issue at my end. I have escalated the issue to the development team(AR-25870) and will inform you once I get any information from them.
Thanks,
Mohit
Thanks,
Mohit
Posted 20 February 2021, 6:06 pm EST
Hello,
I am glad to tell you that issue get fixed in the following build:
http://cdn.grapecity.com/ActiveReports/AR14/Hotfixes/ActiveReports-v14.2.20820.msi
Thanks,
Mohit
Posted 11 March 2021, 9:20 pm EST
Hello,
I came to know that your issue is still not fixed in the build shared. Can you please check after increasing the height of the barcode in the report like(1.54cm)
Thanks,
Mohit
Posted 11 March 2021, 9:46 pm EST
Still no luck. I have attached a little sample (printed from report, printed from excel, scanned to pdf).
Even after printing and scanning I am able to capture “original” barcode with my scanner, but excel version is still bad.
Posted 12 March 2021, 1:27 am EST
Hello,
Could you please check with the attached file and share the result with us.
Thanks,
MohitNew folder.zip
Posted 12 March 2021, 3:02 am EST
Of course. I tried your report definition, and
Sample attached: barcode.zip
Posted 14 March 2021, 2:41 pm EST
Hello,
Could you please check with attached xlsx file. I just exported your page report to Excel format and then print it in the PDF file.
After that scan the barcode using the following site:
https://online-barcode-reader.inliteresearch.com/
you can also try with the latest build of AR14:
http://cdn.grapecity.com/ActiveReports/AR14/Hotfixes/ActiveReports-v14.2.20842.msi
Thanks,
Mohit
ActiveReports.zip
Posted 14 March 2021, 6:25 pm EST
Even with 14.2.20842 I am not able to produce readable xlsx output. Using online service you suggested (https://online-barcode-reader.inliteresearch.com/) result is “No barcodes found on this page for the following selected barcode types:”.wrong_barcode.zip
Posted 15 March 2021, 2:41 am EST
Hello,
There is something problem in the Exporting code. Could you please share the application so that I can use the exact code to export the report.
Thanks,
Mohit
Posted 15 March 2021, 2:54 am EST
Of course … PageReportApplication1.zip
Posted 15 March 2021, 2:55 am EST
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Viewer1.LoadDocument(Application.StartupPath + "\..\..\PageReport1.rdlx")
'then export, see https://www.grapecity.com/activereportsnet/docs/v14/online/exporting-reports.html
Dim rpt As New GrapeCity.ActiveReports.PageReport()
rpt.Load(New System.IO.FileInfo(Application.StartupPath + "\..\..\PageReport1.rdlx"))
Dim MyDocument As New GrapeCity.ActiveReports.Document.PageDocument(rpt)
Dim XlsExport1 As New GrapeCity.ActiveReports.Export.Excel.Section.XlsExport()
XlsExport1.FileFormat = GrapeCity.ActiveReports.Export.Excel.Section.FileFormat.Xlsx
XlsExport1.Export(MyDocument, Application.StartupPath + "\wrong_barcode.xlsx")
' Export the report in PDF format.
Dim PdfExport1 As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport()
PdfExport1.Export(MyDocument, Application.StartupPath + "\PDFExpt.pdf")
End Sub
Posted 15 March 2021, 2:29 pm EST
Hello,
XlsExport is used to export the SectionReport not PageReport. Please use the following line of code to export the PageReport:
Dim report As New GrapeCity.ActiveReports.PageReport()
Dim reportDocument As New GrapeCity.ActiveReports.Document.PageDocument(report)
' Create an output directory.
Dim outputDirectory As New System.IO.DirectoryInfo("C:\MyExcel")
outputDirectory.Create()
' Provide settings for your rendering output.
Dim excelSetting As New GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtensionSettings()
excelSetting.FileFormat = GrapeCity.ActiveReports.Export.Excel.Page.FileFormat.Xls
Dim setting As GrapeCity.ActiveReports.Extensibility.Rendering.ISettings = excelSetting
' Set the rendering extension and render the report.
Dim excelRenderingExtension As New GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtension()
Dim outputProvider As New GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name))
' Overwrite output file if it already exists.
outputProvider.OverwriteOutputFile = True
reportDocument.Render(excelRenderingExtension, outputProvider, setting.GetSettings())
Thanks,
Mohit
Posted 15 March 2021, 4:31 pm EST
Hello,
I tried your approach and again, it does not work. Excel file is created, I can export excel file to pdf, but it is not readable (you can try https://online-barcode-reader.inliteresearch.com/).
My project, xls and pdf are attached.
Project: project.zip
Results: results.zip
Posted 15 March 2021, 8:46 pm EST
Hello,
Can you please change the code
excelSetting.FileFormat = GrapeCity.ActiveReports.Export.Excel.Page.FileFormat.Xlsx
Thanks,
Mohit
Posted 15 March 2021, 8:54 pm EST
Yes, I can. And it does not work. does-not-work.zip
Posted 16 March 2021, 1:04 am EST
Hello,
I think there is version issue. Could you please check with the attached application.
Thanks,
Mohit
PageReportApplication1.zip
Posted 16 March 2021, 1:58 am EST
Hello,
no version issue. Your version works exactly same way as my code. Moreover, I compared “your” and “my” packages.config and they are the same. Your code produces excel file, and barcode in this file is not readable with scanner (and is not recognised on https://online-barcode-reader.inliteresearch.com/ as valid barcode ).
I was able to extract png file containing barcode from xlsx file, attached. image.zip
Posted 16 March 2021, 3:44 pm EST
Hello Peter,
Request to please confirm are you able to scan the result with the file I shared with you or not?
Please share the result with both:
1: Attached PDF File.
2:Printing the attached Excel File in PDF format.
Thanks,
Mohit
testedbarcode.zip