Incorrect Excel file, correct PDF and print files
Hi Nico Cizik,
I have a very disturbing problem.
I'm using Delphi 2010 with RB 11.06.
I have a plain report that prints a list of articles with their contents.
The article number is unique the contents are not.
If I print the report in PDF or on the printer it looks fine.
If I export the file to Excel the articlenumbers (first field in the line)
sometime are duplicated from other lines.
The rest of the fields on the line are send to XLS correctly.
Example (faked in text to explain) how it shows on the printer
Article Description Quantity
102030 LightBulb 10
102040 Screw 20
102050 Hammer 10
102060 Scissors 12
102070 Nails 100
102080 Saw 2
102090 Tweezers 5
Example how it shows in excel
Article Description Quantity
102030 LightBulb 10
102030 Screw 20
102050 Hammer 10
102060 Scissors 12
102030 Nails 100
102080 Saw 2
102080 Tweezers 5
What can I send you to look at this problem ?
I propose, a PDF, corresponding XLS file and the RTM file.
You might want these files but how and where should I send this ?
However there's another important thing to know.... the same program
compiled with Delphi 2007 and RB11.05 did NOT produce a problem and sends
the correct lines to excel.
Please advise what to do or what to send.
Kind regards,
Erik.
I have a very disturbing problem.
I'm using Delphi 2010 with RB 11.06.
I have a plain report that prints a list of articles with their contents.
The article number is unique the contents are not.
If I print the report in PDF or on the printer it looks fine.
If I export the file to Excel the articlenumbers (first field in the line)
sometime are duplicated from other lines.
The rest of the fields on the line are send to XLS correctly.
Example (faked in text to explain) how it shows on the printer
Article Description Quantity
102030 LightBulb 10
102040 Screw 20
102050 Hammer 10
102060 Scissors 12
102070 Nails 100
102080 Saw 2
102090 Tweezers 5
Example how it shows in excel
Article Description Quantity
102030 LightBulb 10
102030 Screw 20
102050 Hammer 10
102060 Scissors 12
102030 Nails 100
102080 Saw 2
102080 Tweezers 5
What can I send you to look at this problem ?
I propose, a PDF, corresponding XLS file and the RTM file.
You might want these files but how and where should I send this ?
However there's another important thing to know.... the same program
compiled with Delphi 2007 and RB11.05 did NOT produce a problem and sends
the correct lines to excel.
Please advise what to do or what to send.
Kind regards,
Erik.
This discussion has been closed.
Comments
I've added Waler's TExtra devices now.
If I print to Quattro or Lotus through their software it comes out fine as
well...
Excel keeps being wrong, I can't select between their our your excel type as
far as I can see.
Erik.
ReportBuilder currently does not support Excel export. The devices natively
included with ReportBuilder are Text, Report Text, Archive, PDF, and HTML
(server only). If you are using TExtraDevices, you will need to contact
their support for help with Excel exporting.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I thought Excel was included because it already shows Excel as an option
before I put the Textradevices component on the form.
However if anywhere in the project the Textradevices component is used it
already shows Excel as an option, my mistake.
I hope Waler gets an official 2010 version ready soon.
Erik.
If you turn the excel option in textradevices for autoconvert to numbers off
everything works fine again.
Still if you want the autoconvert option, we will have to wait until that's
fixed.
Erik.
Also use delphi 2010 an reportbuilder 11.06 and rebuild extradevices for
d2010
changed one uses list with delphi 2010 version and added delphi 2010 in
txdefs
But after turning autoconert numbers to false still corrupted excel files
What do you hav different
Regards
Rene Leerdam
I found out that on every form where you use the Reportbuilder report you
also have to put the textradevices component.
In the properties of that component you have to set autoconvert to off.
Just setting it up correct in one place does not seem to work.
I still hope Waler has the time and possibility to look at this problem.
I have had no response to my emails yet.
Met vriendelijke groeten,
Erik van Putten.
I did some debuging by myselft and on the TxAll.pas file
Search for the expression "AutoConvertToNumber" it will occour just once on
the entire file.
I did the following changes around line 3217.
if (Txt.DataType in [rdtInteger, rdtFloat]) or (not Txt.IsMemo and
IsNumber(Txt.Text, FOptions.FormatChars) and FOptions.AutoConvertToNumber)
then
begin
if Trim(Txt.Text) <> '' then
begin
Comment Line // Stream(AnsiChar(3) + AnsiChar(2) + LotWord(14) +
LotWord(FRow) + LotWord(FCol) + XFIndex(Txt, True) + TextToIEEE(Txt.Text));
Add Line Text := Txt.Text;
Add Line Stream(AnsiChar(4) + AnsiChar(2) +
LotWord(Length(Text) + 8) + LotWord(FRow) + LotWord(FCol) + XFIndex(Txt,
False) + LotWord(Length(Text)) + Text);
end;
I can get my excel files ok now.
I hope It can help the communit .
Abel F. de Angelis
abel@afa.inf.br
Waler officially released version 3.0 of Textradevices for Delphi 2010
yesterday.