Jump to content

AutoIt3's future: Embedded ActiveX !


SvenP
 Share

Recommended Posts

  • Replies 71
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Is the ALPHA version already capable of adding the Crystal Reports ActiveX viewer control ?

This will open up great reporting possibilities to AutoIT.

Since there millions of licences sold of Crystal Reports, there must be a huge audiance which would be thrilled to see this.

I would be eager test this.

Link to comment
Share on other sites

Link to comment
Share on other sites

SvenP

I downloaded your AutoIt_Forms2.0.au3 script to run it as a test.

But it gave an error 'Function unknown'

I tested it running the Alpha verion 3.1.1.42

Is this still a valid script to test with ?

<{POST_SNAPBACK}>

Hi ptrex,

When Sven states his Alpha. That is not the alpha that JPM released.

ActiveX has not yet been released, for AutoIt users.

So currently, the ActiveX script shown, is only for display purposes.

Edited by MHz
Link to comment
Share on other sites

Link to comment
Share on other sites

Hi MHz

THanks for the clear answer. I should be patient than.

Anyway like I stated before, once it is available I will be candidate to test the

CR ActiveX report viewer.

And Feedback the results to you all.

<{POST_SNAPBACK}>

Preliminary ActiveX support is now added in 3.1.1.47. See function GUICtrlCreateObj() and the included test files in tests\ActiveX (only in the ZIP file AutoIt3.1.1.47.ZIP) .

However it's BUGware.

It should crash on most systems. If it doesn't crash on yours, please let me know ;-)

Programming code to support embedded ActiveX control is not an easy job.

First rule: If an ActiveX control doesn't work in VB, then forget about it in AutoIt3.

Second rule: If an ActiveX control works in VB, there is no guarantee that it will work in AutoIt3.

Anyways, have fun with Microsoft's blue screens and Error Reports you might get on this one....

Regards,

-Sven

Link to comment
Share on other sites

Cool guys! Let's see... I went to google.com, worked great, I searched some stuff, worked great! So, then I went back, forward, home, and it all worked! No crashes!!!! I'm running Windows XP Home Edition with SP2... This is awesome! :( Keep up the great work.

PS, I only got the 'custom' COM error when there was no site to go back too, but that could be easily avoided with a few lines of AutoIt code. Nothing to do with the C++... :(

FootbaG
Link to comment
Share on other sites

Cool guys! Let's see... I went to google.com, worked great, I searched some stuff, worked great! So, then I went back, forward, home, and it all worked! No crashes!!!! I'm running Windows XP Home Edition with SP2... This is awesome! :( Keep up the great work.

PS, I only got the 'custom' COM error when there was no site to go back too, but that could be easily avoided with a few lines of AutoIt code. Nothing to do with the C++... :(

<{POST_SNAPBACK}>

The Internet Explorer control is not so picky like other controls. e.g. MS-Word completely refuses to be contained inside a GUI. A Mediaplayer control shows itself, but it doesn't always obey the boundaries set. A Microsoft Excel control doesn't quite know how to place it's menu bars.

Even the Internet Explorer control has problems with resizing within the GUI. I can't get the control smaller without those annoying scroll bars on each side.

I have a loong way to go...

Regards,

-Sven

Link to comment
Share on other sites

exel kept running as a proccess after i closed your example.

forum design crached on closing. (tell microsoft)

both word exampels refuse to run in a GUI.

WIN XP HOME SP 2

word & excel XP

other then that the 'tests' "work".

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

@SvenP

Impatient as I was I started testing to add the Crystal Reports Viewer.

First I added the CRViewer control to the ToolBox (as a custom control)

Than I added the control to the Form Designer.

Worked OK so Far.

Now I wanted to show it on the GUI, but not success.

Error is Invalid Class String.

Please see attached document for more info and print screens.

Could you give me a hint on what is wrong.

PS: Most of the other tests works fine. Great stuff !!

Link to comment
Share on other sites

...

Error is Invalid Class String.

Please see attached document for more info and print screens.

Could you give me a hint on what is wrong.

PS: Most of the other tests works fine. Great stuff !!

<{POST_SNAPBACK}>

Hello ptrex,

The correct class string for the Crystal Reports Viewer is "CRViewer.CRViewer".

However, you dont have to use Microsoft Forms to include the CRViewer in your GUI. You can put it directy using this (pseudo) code:

$oCRViewer = ObjCreate("CRViewer.CRViewer"); Create a Crystal Reports Viewer control
;..do something here to initialize the control with the report data...

$oCRViewer.ReportSource = $YourSourceHere   ; Link the viewer with the report

;..create your GUI...
$GUI_ActiveX    = GUICtrlCreateObj( $oCRViewer, 10, 10 , 400 , 400 )

;...etc..

I have attached a full example. However, the line with $oCRViewerEvt = ObjEvent($oCRViewer,"CRViewerEvent_") does currently NOT work, because the Viewer does not contain a 'version 1.0 Type Library'.

You need the next beta release to support Events (probably AutoIt beta V3.1.1.48).

Regards,

-Sven

TestXCrystal.au3

Link to comment
Share on other sites

@SvenP

I will give it a try.

Can you explain how you found out that the Class Name was CRViewer.CRViewer ?

<{POST_SNAPBACK}>

ptrex,

You can find it in the registry. Just look up "Crystal Report Viewer Control" in HKEY_CLASSES_ROOT. Another handy tool to lookup information about objects/controls is the OLEVIEW.EXE which is included in the MS SDKs (like in Visual Studio, etc.).

Regards,

-Sven

Link to comment
Share on other sites

@SvenP

Sven in this thread I attachted a working sample opening a CR Report file in a GUI.

All based on your help. (Thanks a lot by the way).

http://www.autoitscript.com/forum/index.ph...t=0entry87637

But I wanted also to add this to the Form disign like I showed you before.

Using the Toolbox (adding the custom control CRViewer) to it.

I used the code mentioned in the previous thread. But still it comes with the same error "Error is Invalid Class String"

Even when I used "CRViewer.CRViewer" it does not accept it.

Is this because the is a CUSTOM CONTROL and not a standard Windows Control.

Than again I couldn' t find anything refering to a custom control name.

But maybe I am looking in the wrong place in the registry ?

Help would be appriciated.

Link to comment
Share on other sites

@SvenP

.....

Than again I couldn' t find anything refering to a custom control name.

But maybe I am looking in the wrong place in the registry ?

Help would be appriciated.

<{POST_SNAPBACK}>

Hello ptrex,

This is an issue inside Forms 2.0. I tried myself adding other controls than a Forms-control to an existing Form using the 'Add()' method. But he refused them all.

Currently I couldn't find documentation about how to add a 'custom' control to a Forms 2.0 form.

You can add 'custom' controls in the 'design' mode, but you can't 'save' the design that you made (because the 'design' needs to be converted back into AutoIt3 script commands, and that's not possible).

Regards,

-Sven

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...