Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Delphi 2009 & Crystal XI


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 42 - Last Post: Apr 14, 2016 1:35 AM Last Post By: Mark Stoker
Andrew Bobby

Posts: 3
Registered: 9/16/07
Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2008 11:08 AM
Hi
I added the crystal vcl . I attempted to open a report with just a text field,
(No Database Conn)

Crpe.name = cr

This is my code on a vcl form (On button click)

Procedure Tform2.button1click(Sender:Tobject);
Begin
cr.Clear;
cr.Printjobs(1);
cr.ReportName:= 'C:\Temp\Report1.rpt';
cr.output := toprinter;
cr.execute;
End;
End.

When I run this I get a warning popup

Error 507

OpenPrintJob <PEOpenPrintJob>

Please help!!!

Drew Whitehead

Posts: 3
Registered: 6/19/03
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 30, 2009 3:52 PM   in response to: Andrew Bobby in response to: Andrew Bobby
I've got the same problem. Did you find a solution?

Andrew Bobby wrote:
Hi
I added the crystal vcl . I attempted to open a report with just a text field,
(No Database Conn)

Crpe.name = cr

This is my code on a vcl form (On button click)

Procedure Tform2.button1click(Sender:Tobject);
Begin
cr.Clear;
cr.Printjobs(1);
cr.ReportName:= 'C:\Temp\Report1.rpt';
cr.output := toprinter;
cr.execute;
End;
End.

When I run this I get a warning popup

Error 507

OpenPrintJob <PEOpenPrintJob>

Please help!!!

Kimberly Erickson

Posts: 4
Registered: 10/9/99
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2009 10:41 AM   in response to: Drew Whitehead in response to: Drew Whitehead
Did anyone find a resolution to this problem? I have Delphi 2009 and Crystal XI with the same problem.

Zoltek Inc. President wrote:
I've got the same problem. Did you find a solution?

Andrew Bobby wrote:
Hi
I added the crystal vcl . I attempted to open a report with just a text field,
(No Database Conn)

Crpe.name = cr

This is my code on a vcl form (On button click)

Procedure Tform2.button1click(Sender:Tobject);
Begin
cr.Clear;
cr.Printjobs(1);
cr.ReportName:= 'C:\Temp\Report1.rpt';
cr.output := toprinter;
cr.execute;
End;
End.

When I run this I get a warning popup

Error 507

OpenPrintJob <PEOpenPrintJob>

Please help!!!

Kimberly Erickson

Posts: 4
Registered: 10/9/99
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2009 5:34 AM   in response to: Kimberly Erickson in response to: Kimberly Erickson
Hello,

I ended up fixing this by converting the Crystal reports vcl files to use AnsiString, AnsiChar, etc instead of String, Char, etc. Now reports work.

Kimberly
Heine Mann

Posts: 2
Registered: 3/1/02
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 12, 2009 2:37 AM   in response to: Kimberly Erickson in response to: Kimberly Erickson
Kimberly Erickson wrote:
Hello,

I ended up fixing this by converting the Crystal reports vcl files to use AnsiString, AnsiChar, etc instead of String, Char, etc. Now reports work.

Kimberly

Hi Kimberly

How did you exactly do this?

Replaced all instances of string with ansistring in all the .pas files or what?

Would really like to get this working.

Kind Regards

Edited by: Heine Mann on Aug 12, 2009 11:59 PM
Alan Hartmann

Posts: 17
Registered: 2/21/08
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 18, 2009 5:47 AM   in response to: Kimberly Erickson in response to: Kimberly Erickson
Kimberly Erickson wrote:
Hello,

I ended up fixing this by converting the Crystal reports vcl files to use AnsiString, AnsiChar, etc instead of String, Char, etc. Now reports work.

Kimberly

Any chance you'd be willing to share your updated source code?
Sandro Adad

Posts: 3
Registered: 1/19/09
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 4, 2009 5:09 AM   in response to: Kimberly Erickson in response to: Kimberly Erickson
I have the same problem, can you please send this vcl to me?

Thank you very much,

Sandro.

email: sandroadad at terra dot com dot br

Kimberly Erickson wrote:
Hello,

I ended up fixing this by converting the Crystal reports vcl files to use AnsiString, AnsiChar, etc instead of String, Char, etc. Now reports work.

Kimberly
Suga Sofyan

Posts: 2
Registered: 10/7/09
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 6, 2009 9:21 PM   in response to: Kimberly Erickson in response to: Kimberly Erickson
Kimberly Erickson wrote:
Hello,

I ended up fixing this by converting the Crystal reports vcl files to use AnsiString, AnsiChar, etc instead of String, Char, etc. Now reports work.

Kimberly

Hi Kimberly

How to fixed the VCL, please tell step by step for fixed this VCL

Thank's
Suga
Steven Somer

Posts: 7
Registered: 8/15/08
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2009 1:16 AM   in response to: Kimberly Erickson in response to: Kimberly Erickson
Kimberly Erickson wrote:
I ended up fixing this by converting the Crystal reports vcl files to use AnsiString, AnsiChar, etc instead of String, Char, etc. Now reports work.

Indeed, I am now doing the same thing for Crystal Reports XI R2. After some research I found out that Crystal Reports 2008 cannot be used this way because it no longer supports COM/RDM. No matter what I tried, I could not load the library crpe32.dll. Detail: cpre32.dll version 11.x is 8 MB while the version 12.x is just over 1 MB so stuff got moved/removed.

So one step back to Crystal Reports XI.

I actually have the Print working just fine now. The trick is that the API expects PAnsiChar, and Delphi2009 interprets the PChar in the VCL as a PWideChar (unicode). Before I continue converting the VCL to use AnsiChar, does anyone know if the crpe32.dll perhaps also supports Unicode calls?

For example: In CRDynamic.pas, function PEGetHandleString uses 'PEGetHandleString', based on PAnsiChar. But is there a 'PEGetHandleStringW' to use with PWideChar????? That would be sweet :)

(To bad Embarcadero switched to Rave Reports without providing the engineers a way to move their already designed Crystal Reports to Rave so I'll just have to keep Crystal going for a few years...)

Regards,

Steven Somer
Alan Hartmann

Posts: 17
Registered: 2/21/08
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 30, 2009 6:22 PM   in response to: Andrew Bobby in response to: Andrew Bobby
Andrew Bobby wrote:
Hi
I added the crystal vcl .

Where did you find the VCL for Crystal XI?

Alan
Ludek Uher

Posts: 2
Registered: 6/20/09
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 28, 2009 12:18 PM   in response to: Alan Hartmann in response to: Alan Hartmann
Scott Stanek

Posts: 4
Registered: 3/2/00
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2009 11:58 AM   in response to: Ludek Uher in response to: Ludek Uher

This didn't help as much as I'd hoped. The problem is that I'd already had a working copy of the vcl above that runs in d2007 vs crXI, but get errors rebuilding it to work in d2009
(and assuming d2010).

In UCrpe32.pas

case ReportOptions.convertDateTimeType of
PE_RPTOPT_CVTDATETIMETOSTR : FConvertDateTimeType := ToString;

throws this error
[DCC Error] UCrpe32.pas(15692): E2010 Incompatible types: 'TCrDateTimeType' and 'string'

FConvertDateTimeType : TCrDateTimeType;
TCrDateTimeType = (ToString, ToDate, ToDateTime);

All that said, can you post some of the code you have that works with d2009 on?
Sean Ouckama

Posts: 1
Registered: 12/20/04
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2009 8:18 PM   in response to: Scott Stanek in response to: Scott Stanek
Scott Stanek wrote:

This didn't help as much as I'd hoped. The problem is that I'd already had a working copy of the vcl above that runs in d2007 vs crXI, but get errors rebuilding it to work in d2009
(and assuming d2010).

In UCrpe32.pas

case ReportOptions.convertDateTimeType of
PE_RPTOPT_CVTDATETIMETOSTR : FConvertDateTimeType := ToString;

change it to
PE_RPTOPT_CVTDATETIMETOSTR : FConvertDateTimeType := UCrpe32.ToString;

this will let you compile and install it but still get error when open a report


throws this error
[DCC Error] UCrpe32.pas(15692): E2010 Incompatible types: 'TCrDateTimeType' and 'string'

FConvertDateTimeType : TCrDateTimeType;
TCrDateTimeType = (ToString, ToDate, ToDateTime);

All that said, can you post some of the code you have that works with d2009 on?


i am getting the 507 error it comes about because
FCrpeEngine.PEOpenPrintJob
seems to always return 0 regardless of what is passed to it
i tryied to change pchar to PAnsiChar as described above but it did not seem to have any real effect

Edited by: Sean Ouckama on Sep 22, 2009 8:28 PM

Steven Somer

Posts: 7
Registered: 8/15/08
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 23, 2009 12:32 AM   in response to: Sean Ouckama in response to: Sean Ouckama
Sean Ouckama wrote:

i am getting the 507 error it comes about because
FCrpeEngine.PEOpenPrintJob
seems to always return 0 regardless of what is passed to it
i tryied to change pchar to PAnsiChar as described above but it did not seem to have any real effect

Hi,

I have fixed the exact same thing in the following way:

The CRPE32.DLL supports both Normal as WideChar functions. In D2009 Char has become WideChar instead of AnsiChar in D2007. Change the CRPE procedure names in CRDynamic. Originally it calls GetProcAddress(CRDEngine, 'PEOpenPrintJob'), but use GetProcAddress(CRDEngine, 'PEOpenPrintJobW') instead.

With any dll viewer you can very simply see what functions have a WideChar variant. You will find that these are the procedures that handle PChars or text lengths..
I now have a VCL port that exports and prints reports ok in the combination D2009, Crystal Reports XI R2 (and SQL server 2008 Express for that matter)

If anyone has a public FTP I will share the code there.

Note it might not be finished, but for me it does the job.

Regards Steven Somer
John van der Aa

Posts: 2
Registered: 12/3/04
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2009 1:55 AM   in response to: Steven Somer in response to: Steven Somer
Hi Steven,

I am having the same 507 error when using Delphi 2009, could you send me your modified code? My e-mail is, j dot vdaa at gmail dot com.

Thanks in advance,
John.
Steven Somer wrote:
Sean Ouckama wrote:

i am getting the 507 error it comes about because
FCrpeEngine.PEOpenPrintJob
seems to always return 0 regardless of what is passed to it
i tryied to change pchar to PAnsiChar as described above but it did not seem to have any real effect

Hi,

I have fixed the exact same thing in the following way:

The CRPE32.DLL supports both Normal as WideChar functions. In D2009 Char has become WideChar instead of AnsiChar in D2007. Change the CRPE procedure names in CRDynamic. Originally it calls GetProcAddress(CRDEngine, 'PEOpenPrintJob'), but use GetProcAddress(CRDEngine, 'PEOpenPrintJobW') instead.

With any dll viewer you can very simply see what functions have a WideChar variant. You will find that these are the procedures that handle PChars or text lengths..
I now have a VCL port that exports and prints reports ok in the combination D2009, Crystal Reports XI R2 (and SQL server 2008 Express for that matter)

If anyone has a public FTP I will share the code there.

Note it might not be finished, but for me it does the job.

Regards Steven Somer
Steven Somer

Posts: 7
Registered: 8/15/08
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2009 3:05 AM   in response to: John van der Aa in response to: John van der Aa
Hi John,

Unfortunately your mail address does not work: j dot vdaa at gmail dot com

I'll send you when I have the right address

Regards

Steven

John van der Aa wrote:
Hi Steven,

I am having the same 507 error when using Delphi 2009, could you send me your modified code? My e-mail is, j dot vdaa at gmail dot com.

Thanks in advance,
John.
Guest
Re: Delphi 2009 & Crystal XI
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2009 7:41 AM   in response to: Steven Somer in response to: Steven Somer
Steven Somer wrote:
Hi John,

Unfortunately your mail address does not work: j dot vdaa at gmail dot com

I'll send you when I have the right address

Regards

Steven

John van der Aa wrote:
Hi Steven,

I am having the same 507 error when using Delphi 2009, could you send me your modified code? My e-mail is, j dot vdaa at gmail dot com.

Thanks in advance,
John.

Hi Steven,

please could you provide me your working Crystal XI r2 VCL for Delphi 2009, I've got one but I've lot of problems with input paper bin...
Hope your version could help on this point.

Best regards,

David
dbargaud@ggh.ch
John van der Aa

Posts: 2
Registered: 12/3/04
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 8, 2009 4:33 AM   in response to: Steven Somer in response to: Steven Somer
Hi Steven,

Sorry forgot one character in my e-mail adres, the correct one is jp dot vdaa at gmail dot com.

Regards,
John

Steven Somer wrote:
Hi John,

Unfortunately your mail address does not work: j dot vdaa at gmail dot com

I'll send you when I have the right address

Regards

Steven

John van der Aa wrote:
Hi Steven,

I am having the same 507 error when using Delphi 2009, could you send me your modified code? My e-mail is, j dot vdaa at gmail dot com.

Thanks in advance,
John.
Scott Stanek

Posts: 4
Registered: 3/2/00
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2009 9:00 AM   in response to: Steven Somer in response to: Steven Somer
Steve, could I also get a copy of the code?
Send to sstanek at am-cc.com
(mixed my emails together. this is corrected one...)

If anyone has a public FTP I will share the code there.

Note it might not be finished, but for me it does the job.

Regards Steven Somer

Edited by: Scott Stanek on Oct 27, 2009 9:00 AM
Steven Somer

Posts: 7
Registered: 8/15/08
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2009 1:00 AM   in response to: Scott Stanek in response to: Scott Stanek
You've got mail

Edited by: Steven Somer on Oct 28, 2009 1:01 AM
Scott Stanek

Posts: 4
Registered: 3/2/00
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 28, 2009 8:03 AM   in response to: Steven Somer in response to: Steven Somer
Steven Somer wrote:
You've got mail

Edited by: Steven Somer on Oct 28, 2009 1:01 AM

Thanks (Publicly) for the code.

For anyone who gets the code Steven worked out, just check your version of the runtime.(ie regedit and search in HKEY_LOCAL_MACHINE for 'SOFTWARE\Business Objects')
I have the older 11.0 version from cr XI not 11.5 form cr XI R2 so I had to mod the code to look there as well:

function GetCommonFilesPath : string;
var
regKey : TRegistry;
s : string;
begin
regKey := TRegistry.Create(KEY_READ);
try
regKey.RootKey := HKEY_LOCAL_MACHINE;
//regKey.OpenKey('SOFTWARE\Crystal Decisions\10.0\Crystal Reports', False);
//regKey.OpenKey('SOFTWARE\Business Objects\Suite 11.5\Crystal Reports', False)) ;
if( regKey.OpenKey('SOFTWARE\Business Objects\Suite 11.5\Crystal Reports', False)) = False
then
regKey.OpenKey('SOFTWARE\Business Objects\Suite 11.0\Crystal Reports', False);
s := regKey.ReadString('CommonFiles');
Result := AddBackslash(s);
finally
regKey.Free;
end;
end;
Guest
Re: Delphi 2009 & Crystal XI
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2009 3:49 AM   in response to: Steven Somer in response to: Steven Somer
Steven,

could you provide the code please :)

dbargaud(at)ggh(dot)ch

Thank you for your help.

Brgds.

Steven Somer wrote:
You've got mail

Edited by: Steven Somer on Oct 28, 2009 1:01 AM
Steven Somer

Posts: 7
Registered: 8/15/08
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2009 4:06 AM   in response to: Steven Somer in response to: Steven Somer
Hi All,

I'll make life a little easier. Here is a public download:

crystalvcld2009cr11_5.zip

Please note it is written for Crystal Reports XI R2, so it checks for version number 11.5. If you want to use it with older versions of Crystal Reports XI you will have to adapt the GetCommonFilesPath as suggested by Scott Stanek.

Good luck with it and tell me if you had to make changes, so I can keep the version up to date.

Regards

Steven Somer
Guest
Re: Delphi 2009 & Crystal XI
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2009 7:15 AM   in response to: Steven Somer in response to: Steven Somer
Hi Steven,

I've made a little fix based on the one provided by Scott Stanek, this way it will works with Crystal Reports versions 11 and 11.5.
Could you perhaps integrate them in your archive this way it won't be necessary to modify the source for each version I allready provide.

See below for the code :

function GetCommonFilesPath : string;
var
regKey : TRegistry;
s : string;
begin
regKey := TRegistry.Create(KEY_READ);
try
regKey.RootKey := HKEY_LOCAL_MACHINE;
if not regKey.OpenKey('SOFTWARE\Business Objects\Suite 11.5\Crystal Reports', False) then
regKey.OpenKey('SOFTWARE\Business Objects\Suite 11.0\Crystal Reports', False);
s := regKey.ReadString('CommonFiles');
Result := AddBackslash(s);
finally
regKey.Free;
end;
end;


Thank you for all.

Best Regards,

David

Steven Somer wrote:
Hi All,

I'll make life a little easier. Here is a public download:

crystalvcld2009cr11_5.zip

Please note it is written for Crystal Reports XI R2, so it checks for version number 11.5. If you want to use it with older versions of Crystal Reports XI you will have to adapt the GetCommonFilesPath as suggested by Scott Stanek.

Good luck with it and tell me if you had to make changes, so I can keep the version up to date.

Regards

Steven Somer

Edited by: David BARGAUD on Oct 30, 2009 3:15 PM

Edited by: David BARGAUD on Oct 30, 2009 3:20 PM

Edited by: David BARGAUD on Oct 30, 2009 3:21 PM

Edited by: David BARGAUD on Oct 30, 2009 3:43 PM

Edited by: David BARGAUD on Oct 30, 2009 3:44 PM
Romy Schötz

Posts: 1
Registered: 6/16/03
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 13, 2010 2:48 AM   in response to: Steven Somer in response to: Steven Somer
Steven Somer wrote:
Hi All,

I'll make life a little easier. Here is a public download:

crystalvcld2009cr11_5.zip

Please note it is written for Crystal Reports XI R2, so it checks for version number 11.5. If you want to use it with older versions of Crystal Reports XI you will have to adapt the GetCommonFilesPath as suggested by Scott Stanek.

Good luck with it and tell me if you had to make changes, so I can keep the version up to date.

Regards

Steven Somer

Thank you.

I got following error:

function DiskOptions(const Key : TCrExportDestination) : Pointer;
  begin
    Result := nil;
    case Key of
      {Disk}
      toFile :
        begin
          StrPCopy(PEExpOptions.destinationDLLName, 'uxddisk.dll');
          PEExpOptions.destinationType := UXDDiskType;
          UXDDisk.structSize := SizeOf(UXDDiskOptions);
          UXDDisk.filename := PAnsiChar(FFileName);    *HERE incompatible types 'AnsiChar' and 'Char'*          
          Result := Addr(UXDDisk);
        end;
..


How I have to change this?
Thank you for your help.

Romy

Edited by: Romy Hiller on Oct 13, 2010 2:49 AM

Edited by: Romy Hiller on Oct 13, 2010 2:49 AM
Guest
Re: Delphi 2009 & Crystal XI
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2011 7:35 AM   in response to: Romy Schötz in response to: Romy Schötz
Romy Hiller wrote:
Steven Somer wrote:
Hi All,

I'll make life a little easier. Here is a public download:

crystalvcld2009cr11_5.zip

Please note it is written for Crystal Reports XI R2, so it checks for version number 11.5. If you want to use it with older versions of Crystal Reports XI you will have to adapt the GetCommonFilesPath as suggested by Scott Stanek.

Good luck with it and tell me if you had to make changes, so I can keep the version up to date.

Regards

Steven Somer

Thank you.

I got following error:

function DiskOptions(const Key : TCrExportDestination) : Pointer;
  begin
    Result := nil;
    case Key of
      {Disk}
      toFile :
        begin
          StrPCopy(PEExpOptions.destinationDLLName, 'uxddisk.dll');
          PEExpOptions.destinationType := UXDDiskType;
          UXDDisk.structSize := SizeOf(UXDDiskOptions);
          UXDDisk.filename := PAnsiChar(FFileName);    *HERE incompatible types 'AnsiChar' and 'Char'*          
          Result := Addr(UXDDisk);
        end;
..


How I have to change this?
Thank you for your help.

Romy

Edited by: Romy Hiller on Oct 13, 2010 2:49 AM

Edited by: Romy Hiller on Oct 13, 2010 2:49 AM

Hi Romy,
just in case....the following worked for me...

=========== ucrpe32.pas

replaced
UXDDisk.filename :=PChar(FFileName);
with
UXDDisk.filename := pansichar(ansistring(FFileName));

and

=========== crdynamic.pas

type

UXDDiskOptions = record
structSize : Word;
replaced
fileName : PChar;
with
fileName : PansiChar;

end;

hope this helps...thanks to previous posters for helping me!!

Gary
Massimiliano Co...

Posts: 3
Registered: 4/15/04
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 21, 2011 12:22 AM   in response to: Steven Somer in response to: Steven Somer
Steven Somer wrote:
Hi All,

I'll make life a little easier. Here is a public download:

crystalvcld2009cr11_5.zip

Please note it is written for Crystal Reports XI R2, so it checks for version number 11.5. If you want to use it with older versions of Crystal Reports XI you will have to adapt the GetCommonFilesPath as suggested by Scott Stanek.

Good luck with it and tell me if you had to make changes, so I can keep the version up to date.

Regards

Steven Somer

Hi the file is not longer available...

Could you repost it?

thank's
Dariusz Młyński

Posts: 2
Registered: 3/6/11
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 21, 2011 9:28 AM   in response to: Steven Somer in response to: Steven Somer
Steven Somer wrote:
Hi All,

I'll make life a little easier. Here is a public download:

crystalvcld2009cr11_5.zip

Please note it is written for Crystal Reports XI R2, so it checks for version number 11.5. If you want to use it with older versions of Crystal Reports XI you will have to adapt the GetCommonFilesPath as suggested by Scott Stanek.

Good luck with it and tell me if you had to make changes, so I can keep the version up to date.

Regards

Steven Somer

Hi the file is not longer available...

Could you repost it?

thank's
Leonard Mann

Posts: 2
Registered: 7/9/04
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 24, 2011 6:21 PM   in response to: Dariusz Młyński in response to: Dariusz Młyński
I had the same problem only I was using Delphi 2010.
I managed to get hold of Steven Somer via email and he was kind enough to email me the zip file.

This version worked perfectly, as is, for Delphi 2010 Crystal XI R2.
In keeping with the Goodwill that Steven has established in this post I am reposting the code to a public download so others can benefit.
So, special thanks to Steven Somer.

http://www.4shared.com/file/9MwFdYfz/crxi2009s.html

Leonard



Hi the file is not longer available...

Could you repost it?

thank's
Francisco Perez

Posts: 1
Registered: 5/16/11
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 25, 2011 11:37 AM   in response to: Leonard Mann in response to: Leonard Mann
Leonard Mann wrote:
I had the same problem only I was using Delphi 2010.
I managed to get hold of Steven Somer via email and he was kind enough to email me the zip file.

This version worked perfectly, as is, for Delphi 2010 Crystal XI R2.
In keeping with the Goodwill that Steven has established in this post I am reposting the code to a public download so others can benefit.
So, special thanks to Steven Somer.

http://www.4shared.com/file/9MwFdYfz/crxi2009s.html

Leonard



Hi the file is not longer available...

Could you repost it?

thank's

Yo intente todas las recomendaciones de esta discusion, la que me resolvio el problema fue bajando el link que publico
Leonard Mann. Tengo Crystal Report 11.5 con Delphi RAD 2010 version 3615 y no podia imprimir por el error 507. Pero con el archivo que aparece en este link cri2009s.html, los reportes corren perfectamente.

Estoy agradecido de todos los que participaron a lo largo de esta discusion, pues sin su ayuda desinteresada, no habria salido a camino tan rapido.
janny pan

Posts: 2
Registered: 4/4/11
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 4, 2011 12:29 AM   in response to: Andrew Bobby in response to: Andrew Bobby
I have the same problem, can you please send this vcl to me?
Buy WoW Gold
WoW Gold
Cheap WoW Gold
MapleStory Mesos
Buy Maplestory Mesos
Leonard Mann

Posts: 10
Registered: 8/26/04
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 4, 2011 9:47 AM   in response to: janny pan in response to: janny pan
janny pan wrote:
I have the same problem, can you please send this vcl to me?

You should be able to download the zip file from the link mentioned above.

http://www.4shared.com/file/9MwFdYfz/crxi2009s.html

Leonard
doorman330 door...

Posts: 1
Registered: 11/9/11
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 8, 2011 8:09 PM   in response to: janny pan in response to: janny pan
janny pan wrote:
I have the same problem, can you please send this vcl to me?
Buy WoW Gold
WoW Gold
Cheap WoW Gold
MapleStory Mesos
Buy Maplestory Mesos


Breaking news, Apple's board of directors received the news, Apple's chairman, founder and former CEO Steve Jobs, has died aged 56. Apple said in a brief statement, said the company was extremely sad death of Steve Jobs, Steve Jobs of wisdom, passion and drive is the source of countless innovations, and these innovations greatly enrich and improve each people's lives, because of Steve Jobs, the world has become infinitely better.

[img]http://t3.gstatic.com/images?q=tbn:ANd9GcQLSZhsVePMyN5ZsKthPEmozqqRvJWnRtBsQE78atdPAZkUsxl3m-xyYA[/img]

What do you think about this news ? lets share about your opinions......

_________________________________________________________________________
buy wow gold|Buy Runescape Gold|Buy Maple Story Mesos|Aion Kinah

Juan Pablo Leco...

Posts: 2
Registered: 1/11/01
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 7, 2011 10:00 AM   in response to: Andrew Bobby in response to: Andrew Bobby
Error 507 see pecodes.pdf
PE_ERR_BADFILENAME (507)
There is an error in the file name you specified.

Andrew Bobby wrote:
Hi
I added the crystal vcl . I attempted to open a report with just a text field,
(No Database Conn)

Crpe.name = cr

This is my code on a vcl form (On button click)

Procedure Tform2.button1click(Sender:Tobject);
Begin
cr.Clear;
cr.Printjobs(1);
cr.ReportName:= 'C:\Temp\Report1.rpt';
cr.output := toprinter;
cr.execute;
End;
End.

When I run this I get a warning popup

Error 507

OpenPrintJob <PEOpenPrintJob>

Please help!!!

Gavin Froude

Posts: 3
Registered: 4/29/07
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 18, 2011 7:34 AM   in response to: Juan Pablo Leco... in response to: Juan Pablo Leco...
For anyone who is still having trouble getting the VCL to export/print - in my case to Adobe PDF...

Even though the above changes to ansistring do appear to work, my application would export once but would result in the 507 error on subsequent exports.

I ran a trace through the VCL code, and found PEExpOptions.unicodeFormatOptions and PEExpOptions.unicodeDestinationsOptions was set false on the first run, but true on subsequent runs.

I never even knew these options existed as they are not documented in the VCL help. Anyway, digging further showed that these options are never initialised in the VCL code - and hence are subject to random values.

All you need to do is set them to false before you run the export, they are a member of the ExportOptions Object. Put the following code before you run the export (renaming to your control of course):

CrPE1.ExportOptions.PEExpOptions.unicodeFormatOptions := false;
CrPE1.ExportOptions.PEExpOptions.unicodeDestinationOptions := false;

That should fix it - its possible this is all that was needed all along, but i have not run a test with the unmodified VCL code yet.
janny pan

Posts: 2
Registered: 4/4/11
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 29, 2011 1:30 AM   in response to: Gavin Froude in response to: Gavin Froude
How did you exactly do this?
Tera Online Gold
WOW Gold
Buy Eden Gold
Mark Stoker

Posts: 1
Registered: 4/13/00
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2016 1:35 AM   in response to: Gavin Froude in response to: Gavin Froude
Great solution.
Gavin Froude wrote:
For anyone who is still having trouble getting the VCL to export/print - in my case to Adobe PDF...

Even though the above changes to ansistring do appear to work, my application would export once but would result in the 507 error on subsequent exports.

I ran a trace through the VCL code, and found PEExpOptions.unicodeFormatOptions and PEExpOptions.unicodeDestinationsOptions was set false on the first run, but true on subsequent runs.

I never even knew these options existed as they are not documented in the VCL help. Anyway, digging further showed that these options are never initialised in the VCL code - and hence are subject to random values.

All you need to do is set them to false before you run the export, they are a member of the ExportOptions Object. Put the following code before you run the export (renaming to your control of course):

CrPE1.ExportOptions.PEExpOptions.unicodeFormatOptions := false;
CrPE1.ExportOptions.PEExpOptions.unicodeDestinationOptions := false;

That should fix it - its possible this is all that was needed all along, but i have not run a test with the unmodified VCL code yet.
maroun atmeh

Posts: 2
Registered: 3/6/12
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 6, 2012 9:21 AM   in response to: Andrew Bobby in response to: Andrew Bobby
Andrew Bobby wrote:
Hi
I added the crystal vcl . I attempted to open a report with just a text field,
(No Database Conn)

Crpe.name = cr

This is my code on a vcl form (On button click)

Procedure Tform2.button1click(Sender:Tobject);
Begin
cr.Clear;
cr.Printjobs(1);
cr.ReportName:= 'C:\Temp\Report1.rpt';
cr.output := toprinter;
cr.execute;
End;
End.

When I run this I get a warning popup

Error 507

OpenPrintJob <PEOpenPrintJob>

Please help!!!

maroun atmeh

Posts: 2
Registered: 3/6/12
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 6, 2012 9:23 AM   in response to: Andrew Bobby in response to: Andrew Bobby
i have crystal reports 2008(XII) and delphi 2006 can anyone tellme how to add vcl and from where?

Edited by: maroun atmeh on Feb 6, 2012 9:30 AM
Benny Chan

Posts: 4
Registered: 6/30/12
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2012 2:45 AM   in response to: maroun atmeh in response to: maroun atmeh
maroun atmeh wrote:
i have crystal reports 2008(XII) and delphi 2006 can anyone tellme how to add vcl and from where?

Edited by: maroun atmeh on Feb 6, 2012 9:30 AM

Seems to me no valid vcl support Crystal reports 2008. Latest one is CR-X! or CR-X! R2 ?
GARCIA David

Posts: 2
Registered: 9/8/02
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 21, 2012 12:25 AM   in response to: Andrew Bobby in response to: Andrew Bobby
Hi,

can someone give me a valid link to
crystalvcld2009cr11_5.zip

Thanks

David
Benny Chan

Posts: 4
Registered: 6/30/12
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2012 2:43 AM   in response to: GARCIA David in response to: GARCIA David
GARCIA David wrote:
Hi,

can someone give me a valid link to
crystalvcld2009cr11_5.zip

Thanks

David

Didn't you try this link http://www.4shared.com/file/9MwFdYfz/crxi2009s.html
Jeff Burhans

Posts: 1
Registered: 8/16/01
Re: Delphi 2009 & Crystal XI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2014 3:29 PM   in response to: Andrew Bobby in response to: Andrew Bobby
I am also having troubles using Steven Somer's wonderful patched VCL (thank you for the work you did for us!)

I'm using Delphi XE2 and Crystal Reports XI but even with that new VCL, I'm still getting the dreaded Error 507: OpenPrintJob <PEOpenPrintJob> when I attempt to call Crpe1.Print.

I'm not exporting, but I set the two export variables as suggested as well, just in case. The report does exist and is a valid report in a valid location. The project is a very simple single button, single Crpe object, button just sets the two variables and calls print.

I'm running in a Virtual Machine under VMware, Windows 7 and it won't read the registry for some reason so I had to force the return of s in GetCommonFilesPath to be the directory to my crpe32.dll but no big deal there.

Any suggestions for how to get this bad boy to run?

Modification to GetCommonFilesPath:
    regKey.OpenKey('SOFTWARE\Business Objects\Suite 11.5\Crystal Reports', False);
    s := regKey.ReadString('CommonFiles');
    s := 'C:\Program Files (x86)\Common Files\Business Objects\3.0\bin';


Thanks in advance for any help!

Orion
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02