Scheduled Reports Problem

Discussions about design and architecture principles, including native JADE systems and JADE interoperating with other technologies
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:28 am

by Glen Richards >> Mon, 4 Aug 2003 5:26:27 GMT

We use a scheduler in our JADE application; at the moment it handles scheduled online backups. We want to add the ability to schedule 'e-mail reports'. I've come across a problem where our scheduler (a non-GUI app that is run as a server application) causes an exception (14182) when trying the create the report object - this is expected as the scheduler is non-GUI (although we will never display this report on the screen).

I've played around with a few tricks to try & get around this: I tried getting the scheduler app to start another 'GUI-no forms' app or 'GUI' app to create the report - but this is not allowed.

Has anyone got any ideas or tricks that will help me around this problem? Any help appreciated.


Glen
Encos

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:28 am

by cnwjhp1 >> Mon, 4 Aug 2003 5:33:24 GMT

Why can't you start a GUI-no forms app from a non-GUI? We do that all the time. Why not make your scheduler GUI-no forms? That's what we did, but for other reasons.

Cheers,
John P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:28 am

by Glen Richards >> Mon, 4 Aug 2003 21:43:37 GMT

Your right - but if the non-GUI app is a 'server application' as well then you can't start a GUI-no forms app from it.

We can make the scheduler GUI-no forms but then we wouldn't be able to make it a 'server application' - I'm looking into the implications of this.

Thanks for your ideas,


Glen

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:29 am

by allistar >> Mon, 4 Aug 2003 21:49:27 GMT

Hi Glen,
See my other post. You can start a jade.exe which runs a GUI-no forms application from within a server application when the database server is running as a service. The only catch is that you must make sure you shut down the new jade.exe before closing the database server. We send out a notification to do this.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:29 am

by Glen Richards >> Mon, 4 Aug 2003 23:18:44 GMT

Hi Allistar,

Your suggestion seems the best option - thanks for the tips.

Obviously the server will have to be Windows based for this to work which cuts Linux/AIX out - but I'm doomed which ever way I go :)

Cheers,


Glen

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:29 am

by allistar >> Tue, 5 Aug 2003 2:46:56 GMT

Hi Glen,
Yes, it's an unfortunate but underdtandable restriction that server application must be non-gui only.

We have a C++ application that (using the JOMAPI) connects to the database to fire a notification to all processes which causes them to "terminate". The nice thing about this application is that it doesn't give an error if the database server is not actually running, so it is safe to run at any time. If you would like the souce for it let me know and I can make it available.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:29 am

by Glen Richards >> Wed, 6 Aug 2003 0:09:36 GMT

Allistar,

I've got the server app starting a GUI-no forms app which can in turn create the report object, great!

Now I'm trying to pass parameters to the app by specifying them after the "endJade" parameter but I'm having some trouble. My initialize method for the GUI-no forms app is as follows:

initializeSchedulerReport(initializeParameter: Object);begin

if initializeParameter <> null then
// do stuff with HugeStringArray.
endif;
end;

initializeParameter is null but I've specified an endJade parameter & then some other parameters after that - what am I doing wrong?

I've also tried calling jadclient.exe instead of jade.exe but I get an 1205 error message.

Any help appreciated,


Cheers,


Glen
Encos

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:29 am

by Allistar Melville >> Wed, 6 Aug 2003 2:33:03 GMT

Hi Glen,
To get the optional parameters specified on the command line you need to make an external function like this:

getCommandLine():String is GetCommandLineA in kernel32;

I could not find a Jade method to do this, but the above should work.

Regards,
Allistar.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:29 am

by cnwrwm1 >> Thu, 7 Aug 2003 0:54:24 GMT

In JADE 6.0, you can use Node::getCommandLine

Richard

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Scheduled Reports Problem

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:29 am

by Allistar Melville >> Mon, 4 Aug 2003 5:47:15 GMT

Hi Glen,
The way we get around this is by starting up a new jade.exe and pass in the appropriate path=, app=, schema= and ini= parameters. This can start up your GUI or GUI-No forms application. You can also pass parameters to this as you desire (make sure you use the endJade parameter in the application command line).

Regards,
Allistar.


Return to “Design and Architecture”

Who is online

Users browsing this forum: No registered users and 4 guests