| View previous topic :: View next topic |
| Author |
Message |
Scott Kent-Collins Guest
|
Posted: Sat Feb 19, 2005 10:47 am Post subject: VCL Formula Access Violation. |
|
|
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
|
Posted: Sat Feb 19, 2005 1:58 pm Post subject: Re: VCL Formula Access Violation. |
|
|
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
|
Posted: Sun Feb 20, 2005 10:54 pm Post subject: Re: VCL Formula Access Violation. |
|
|
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
|
Posted: Mon Feb 21, 2005 2:56 pm Post subject: Re: VCL Formula Access Violation. |
|
|
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 |
|
 |
|