Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Thu Jan 11, 2018 11:34 am

Hi,
I want to convert a DBF file to a PDF file. I use Spire.Export what works well. I only have a problem with the Dbf cells without value. In the PDF, this gives the value "Null". I know that in a database "Null" meanse no value. Is there a possibility that the cell without value remains empty in the PDF?
This is the code that I used:
Code: Select all
        using (OleDbDataAdapter da = new OleDbDataAdapter(oleDbCommand))
         {
                DataTable dt = new DataTable();

                da.Fill(dt);
                Spire.DataExport.PDF.PDFExport PDFExport = new Spire.DataExport.PDF.PDFExport();

                PDFExport.DataSource = Spire.DataExport.Common.ExportSource.DataTable;

                PDFExport.PDFOptions.PageOptions.MarginLeft = 0.5;
                PDFExport.PDFOptions.PageOptions.MarginTop = 0.5;
                PDFExport.PDFOptions.PageOptions.MarginBottom = 0.5;

                PDFExport.PDFOptions.PageOptions.Orientation =
                Spire.DataExport.Common.PageOrientation.Landscape;

                PDFExport.DataTable = dt as DataTable;

                PDFExport.SaveToFile(GlobalVar.Pdffilename);
       {

ArjanLagemaat
 
Posts: 4
Joined: Fri Dec 15, 2017 10:47 am

Fri Jan 12, 2018 2:28 am

Hello,

Thanks for your inquiry.
Please download the latest version(Spire.DataExport for .NET (Hot Fix) Version:3.5.86) and use the below code to set the null value to be displayed as empty string.
Code: Select all
PDFExport.DataFormats.NullString = string.Empty;


Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Fri Jan 12, 2018 6:47 am

Hello,

Thanks for the support!
This is where we're looking for.

ArjanLagemaat
 
Posts: 4
Joined: Fri Dec 15, 2017 10:47 am

Fri Jan 12, 2018 7:09 am

Hi ArjanLagemaat,

Glad to hear that.
Please feel free to contact us if you need any assistance.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.DataExport

cron