Delphi 2007 Formula5 ActiveX

After following the instructions received shown below

File’New’Package
Save package as Crystal.dproj in some useful place
Component|Import Component
Choose VCL for Delphi Win32, then Import a Type Library 
Scroll to  Crystal Reports 9 ActiveX Designer Run Time Library (Version 9.0)
Click Next, then check Generate component wrappers, then Next
Choose Add unit to Crystal.dproj 
Click Finish 
Component|Install Component
Choose VCL for Delphi Win32, then Import ActiveX control 
Crystal Report Viewer Control 9 (Version 9.2)
Click Next, then check Generate component wrappers. Click Next
Choose Add unit to Crystal.dproj 
Click Finish 
Right click Crystal.dproj in Project Manager, choose Install

I get errors in lines

Property ColWidth[ncol: integer]: smaiiint read Get_ColWidth write Set_Colwidth
Property RowHeight[ncol: integer]: smaiiint read Get_RiwHeight write Set_RowHeight

Any Help please


KevinfeeningAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ziolkoCommented:
Property ColWidth[ncol: integer]: smaiiint
shouldn't be

Property ColWidth[ncol: integer]: SmallInt ?

ziolko.
0
KevinfeeningAuthor Commented:
Sorry Its spelt correctly in the program
0
ziolkoCommented:
ok so what's the error message in those lines?

ziolko.
0
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

KevinfeeningAuthor Commented:
I don't know why but it compiled to day and installed

But if I add  Active X to a form and a button with the following on click event
F1Book1.EntryRC[1,2] := 'Test';
I Get an error
EOLeSysErrpr with message Parameter not Optional
I Click Break on the error and it displays
procedure TF1Book.Set_EntryRC(nRow: Integer; nCol: Integer; const Param3: WideString);
  { Warning: The property EntryRC has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  InterfaceVariant.EntryRC := Param3;
end;

Also how do I rename the F1Book1 to Formula51

in delphi 5 it shows in the code as
type
  TForm1 = class(TForm)
    Formula51: Formula5;
  private

in Delphi 2007it shows in the code astype
  TForm1 = class(TForm)
    F1Book1:TF1Book;
  private
0
ziolkoCommented:
>>Also how do I rename the F1Book1 to Formula51

go to your object inspector select book object and change name

>>EOLeSysErrpr with message Parameter not Optional
you can try this:
procedure TF1Book.Set_EntryRC(nRow: Integer; nCol: Integer; const Param3: WideString);
  { Warning: The property EntryRC has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  InterfaceVariant.EntryRC[nRow, nCol] := Param3;
end;

but this is just a guess, post some code with definition of interface or at least EntryRC definition

ziolko.
0
KevinfeeningAuthor Commented:
Thanks again I tried what you suggested but got more errors so I uninstalled and started again It is now erroring again when you try to install or compile on the following lines in the VCF1250_TBL

Property ColWidth[ncol: integer]: smallint read Get_ColWidth write Set_Colwidth
Property RowHeight[ncol: integer]: smallint read Get_RiwHeight write Set_RowHeight

the error is
[DCC Warning] VCF150_TBL.pas(2940): W1009 Redeclaration of 'Repaint' hides a member in the Bass Class
[DCC Error] VCF150_TBL.pas(3713): E2008 Incompatible Types

I Have attached a copy of the VCF_150.TBL as a txt File

Hope you can help
VCF150-TLB.txt
0
ziolkoCommented:
did you generated _TLB automatically or someone made conversion from C header file?

here's version that compiles but if it works you have to check yourself:)

ziolko.
VCF150-TLB.txt
0
KevinfeeningAuthor Commented:
Thanks again for you patience (If there is any option to increase the pointsfor the support tell me)
I pasted the file and it compiled and installed
I created a new form and added the ActiveX but when I compiled the project the attached screen dump shows the error that came up
I you can help again thanks

Kevin
Formula51.bmp
0
ziolkoCommented:
I can't find Set_FormattedTextRC and Set_DefinedNameByIndex in vcl150_tlb you posted.
In file that I have FormattesTextRC and DefinedNameByIndex properties are read only and have only getters but no setters

ziolko.
0
KevinfeeningAuthor Commented:
I copied the file you posted previously
may be I did something wrong

What should I do with the VCL150-TBL.txt file after I copied it from you

Thanks
0
ziolkoCommented:
use file that I gave you and make sure you don't have other copies of file with same name somwhere on disk.

also recompile and rebuild package containing this file then try it on new blank project.

ziolko.
0
KevinfeeningAuthor Commented:
I deleted the origional component and tried to start again
I went through the same procedure

File’New’Package
Save package as Crystal.dproj in some useful place
Component|Import Component
Choose VCL for Delphi Win32, then Import a Type Library 
Scroll to  Crystal Reports 9 ActiveX Designer Run Time Library (Version 9.0)
Click Next, then check Generate component wrappers, then Next
Choose Add unit to Crystal.dproj 
Click Finish 
Component|Install Component
Choose VCL for Delphi Win32, then Import ActiveX control 
Crystal Report Viewer Control 9 (Version 9.2)
Click Next, then check Generate component wrappers. Click Next
Choose Add unit to Crystal.dproj 
Click Finish  ************************   THIS IS WHER I CUT AND PASTE YOUR FILE
Right click Crystal.dproj in Project Manager, choose Install

then I still get errors in lines

Property ColWidth[ncol: integer]: smallt read Get_ColWidth write Set_Colwidth
Property RowHeight[ncol: integer]: smalint read Get_RiwHeight write Set_RowHeight

even if I cut and paste you filer into VCF150-TBL

I know I am going over the same problem but I must be missing something
0
ziolkoCommented:
>>I deleted the origional component and tried to start again

remove your original _TLB file and use only the one I gave you, then rebuild your package start new project and try to use it

ziolko.
0
KevinfeeningAuthor Commented:
did that and installed

Created new project added ActiveX and tButton

in the click event added

procedure TForm3.Button1Click(Sender: TObject);
begin
f1book1.EntryRC[3,3] := 'Hello';
end;

Error "Invalid number of paramaters" click Break and the system stops here in the VCF150_TLB

procedure TF1Book.Set_EntryRC(nRow: Integer; nCol: Integer; const Param3: WideString);
  { Warning: The property EntryRC has a setter and a getter whose
    types do not match. Delphi was unable to generate a property of
    this sort and so is using a Variant as a passthrough. }
var
  InterfaceVariant: OleVariant;
begin
  InterfaceVariant := DefaultInterface;
  InterfaceVariant.EntryRC := Param3;
end;

Kevin

0
ziolkoCommented:
change it this way:

procedure TF1Book.Set_EntryRC(nRow: Integer; nCol: Integer; const Param3: WideString);
var
  InterfaceVariant: OleVariant;
begin
  DefaultInterface.EntryRC[nRow, nCol] := Param3;
end;

hmm just looked at this file again, you'll probably have a few more errors like this one you can fix them in simliar way

and remember that every time you change this _TLB file you must
remove component from form and close project
rebuild package
open up project put component back on form and rebuild

ziolko.
0
KevinfeeningAuthor Commented:
Absolute Genious so far it works can I give you more points than 500

Last Question in Delphi 5 when I add the ActiveX to the form

it add this

TForm1 = class(TForm)
    Formula51: Formula5;

In Delphi 2007 it shows this

TForm1 = class(TForm)
    F1Book1:TF1Book;

how do I change it to be the same as Delphi 5 so I don't have to change all the
Progs I created in Delphi 5

You previously said to rename it in BOOK but I cannlt find it
0
ziolkoCommented:
ahh I see that it's not only name changed but also type, that's strange I've never seen this I'll take a look but in case I fail you can create this component in runtime instead droping it on form in design time.

ziolko.
0
ziolkoCommented:
are you usibg same _TLB files in both D5 and D2007? in file you posted there's no definition of type: Formula5

ziolko.
0
KevinfeeningAuthor Commented:
Mate you done a brilliant job thanks for all your help from here on in its my problem to sort out the delphi 5 programs

Kevin
0
ziolkoCommented:
glad I could help:)

ziolko.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.