Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using AccPac VewFinders in Delphi 2

Status
Not open for further replies.

gregologist

Programmer
Sep 14, 2010
3
AU
I need to add the ability to use the Customer Lookup screen from ACCPAC AR3100 Receipts UI (5.5)

Normally I do the old "Create the macro and they will come" idea but I have had little joy.

Any Ideas would be appreciated.

Gregologist
 
Are you wanting to duplicate the blue triangle lookup or the finder?
 
Thanks for Replying DjangMan

I need the actual Finder itself. As you are probably aware, Delphi doesn't like to import the Accpac UIs as ActiveX so I normally import the Type Library, use the XAPI or COMAPI and create my own screens.

This time, I really need the AccPac "Look and Feel" :)

Any Ideas ?
 
I've never tried invoking the finder through Delphi. After banging my head on an order entry screen I gave up.

I have built my own finder that I use for my non-VB apps. It runs a SQL query and displays the results. For large datasets (1000s of records) it's not the greatest performer but most of the time I adjust my queries carefully.

I did study the Accpac finder and noticed that for MSSQL it generates a database cursor every time the user scrolls down or up the finder window. For Pervasive it wouldn't be that hard to navigate since it runs fast as a transaction database.

Another option which I've used is to create a VB application that you can either use the SendMessage API to communicate with or DDE or a text file. The application's main form can remain invisible and it will invoke the Accpac finder. Kind of cheesy but might do in a pinch.
 
Hi

I perservered and managed the code below (Delphi 7 or Embar 2010). Many thanks for your ideas

procedure TfrmARHeader.SpeedButton1Click(Sender: TObject);
var ReturnArray:Array [0..3] of Variant;
Finder:IViewFinder;
Begin
Try
Finder:=coViewFinder.Create;
Finder.Session:= DBLink.Session;
Finder.ViewID := 'AR0024';
Finder.ReturnFieldIDs := vararrayof([1,2]); //IDCust, NameCust
Finder.Filter :='';
if Finder.Finder()
then begin
showmessage(finder.ReturnFieldValues[0]+':'+finder.ReturnFieldValues[1]);
end;
Finally
Finder:=Nil;
end;//Try
end;//Proc

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top