BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VCL Formula Access Violation.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Third Party Tools)
View previous topic :: View next topic  
Author Message
Scott Kent-Collins
Guest





PostPosted: Sat Feb 19, 2005 10:47 am    Post subject: VCL Formula Access Violation. Reply with quote



I am using the Crystal Reports v10 VCL component (with C++ Builder 6) to
setup and generate my reports but when I try to set the formulas at run time
using the code samples supplied with the Crystal Reports help I get Access
Violation errors when accessing the Formula Properties. He is an example:


CrpeTest->ReportName = "My Report Name";
CrpeTest->FormulaByName("MyFormulaName")->Formula->Text = "My Formula
Value";
CrpeTest->Execute();

The code generates and ACCESSS VIOLATION when trying to set the formula...
has anyone else seen this and know how to fix it?

Thanks
Scott


Back to top
Viatcheslav V. Vassiliev
Guest





PostPosted: Sat Feb 19, 2005 1:58 pm    Post subject: Re: VCL Formula Access Violation. Reply with quote



If address of AV is close to NULL, check every element to be non-NULL, i.e.
is one of this NULL?

CrpeTest->FormulaByName("MyFormulaName")
CrpeTest->FormulaByName("MyFormulaName")->Formula

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Scott Kent-Collins" <scott.kent-collins (AT) quest (DOT) com.au> сообщил/сообщила в
новостях следующее: news:4217195e (AT) newsgroups (DOT) borland.com...
Quote:
I am using the Crystal Reports v10 VCL component (with C++ Builder 6) to
setup and generate my reports but when I try to set the formulas at run
time using the code samples supplied with the Crystal Reports help I get
Access Violation errors when accessing the Formula Properties. He is an
example:


CrpeTest->ReportName = "My Report Name";
CrpeTest->FormulaByName("MyFormulaName")->Formula->Text = "My Formula
Value";
CrpeTest->Execute();

The code generates and ACCESSS VIOLATION when trying to set the formula...
has anyone else seen this and know how to fix it?

Thanks
Scott




Back to top
Scott Kent-Collins
Guest





PostPosted: Sun Feb 20, 2005 10:54 pm    Post subject: Re: VCL Formula Access Violation. Reply with quote



OK, some further testing shows that the DELPHI version of the code and
Crystal VCL component works fine. It is only the C++ Builder 6 version that
has problems. I think it is because the "UCrpe32.hpp" file that Crystal
supplied is incorrect/corrupted and does match the "UCrpe32.pas" file.

Is there and easy way to regenerate the HPP file based on a PAS file?

Thanks
Scott


"Scott Kent-Collins" <scott.kent-collins (AT) quest (DOT) com.au> wrote

Quote:
I am using the Crystal Reports v10 VCL component (with C++ Builder 6) to
setup and generate my reports but when I try to set the formulas at run
time using the code samples supplied with the Crystal Reports help I get
Access Violation errors when accessing the Formula Properties. He is an
example:


CrpeTest->ReportName = "My Report Name";
CrpeTest->FormulaByName("MyFormulaName")->Formula->Text = "My Formula
Value";
CrpeTest->Execute();

The code generates and ACCESSS VIOLATION when trying to set the formula...
has anyone else seen this and know how to fix it?

Thanks
Scott




Back to top
Viatcheslav V. Vassiliev
Guest





PostPosted: Mon Feb 21, 2005 2:56 pm    Post subject: Re: VCL Formula Access Violation. Reply with quote

Create empty project, copy UCrpe32.pas into its directory and add to
project, as well as files UCrpe32.pas depends on (look its uses ...).
Compile project, .hpp will be auto-generated. Or just copy UCrpe32.pas to
directory where UCrpe32.hpp is, backup and delete UCrpe32.hpp and add
UCrpe32.pas to project. Then recompile.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Scott Kent-Collins" <scott.kent-collins (AT) quest (DOT) com.au> сообщил/сообщила в
новостях следующее: news:4219150b (AT) newsgroups (DOT) borland.com...
Quote:
OK, some further testing shows that the DELPHI version of the code and
Crystal VCL component works fine. It is only the C++ Builder 6 version
that
has problems. I think it is because the "UCrpe32.hpp" file that Crystal
supplied is incorrect/corrupted and does match the "UCrpe32.pas" file.

Is there and easy way to regenerate the HPP file based on a PAS file?

Thanks
Scott


"Scott Kent-Collins" <scott.kent-collins (AT) quest (DOT) com.au> wrote in message
news:4217195e (AT) newsgroups (DOT) borland.com...
I am using the Crystal Reports v10 VCL component (with C++ Builder 6) to
setup and generate my reports but when I try to set the formulas at run
time using the code samples supplied with the Crystal Reports help I get
Access Violation errors when accessing the Formula Properties. He is an
example:


CrpeTest->ReportName = "My Report Name";
CrpeTest->FormulaByName("MyFormulaName")->Formula->Text = "My Formula
Value";
CrpeTest->Execute();

The code generates and ACCESSS VIOLATION when trying to set the
formula... has anyone else seen this and know how to fix it?

Thanks
Scott






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Third Party Tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.