rsr
Posts: 27
Joined: Wed May 06, 2009 10:03 pm

Postby rsr » Sat Aug 15, 2009 3:31 am

I wanted to find out if you had any ideas or recommendations on combining Workpad Channel Reports to create a complete combined report.

I was able to create a final Awasu report by combining all the reports generated by each Awasu Channel Report into one html report.

However, we are having some difficulty with editing this Awasu generated report with WYSIWYG HTML editors.

The reason for the problems is as follows:
Because my final html report file in Awasu was created in this manner, the WYSIWYG html editors are unable to determine where the end of the combined report actually is ( Since each report in the combined report contain beginning and ending <html> and <body> tags ). Therefore the html editors stop displaying the remainder of the file after the end of the first report is reached.

Do you have any suggestions for generating combined Channel Reports in Awasu that will overcome this problem?

One possibility is that I can create an application that can strip the unwanted tags in the final report generated by Awasu. Also, is there any possibly to trigger such an application from within Awasu after generating the report.

Any suggestions on this issue would be greatly appreciated.

Below in an sample of my final report template that glues the Channel Reports together:
<body>
{%INCLUDE% includes/FinalReport.include}
{%INCLUDE% includes/ContentFinalReport.include}

<Include>
{%INCLUDE% ../../Reports/rsr/Topics.html}
{%INCLUDE% ../../Reports/rsr/Develop.html}
{%INCLUDE% ../../Reports/rsr/SummaryDevelop.html}
...
...
etc.

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Sat Aug 15, 2009 4:13 am

The obvious solution would be to take the <tt><html></tt> and <tt><body></tt> tags out of the templates you're using to generate the Topics, Develop, SummaryDevelop, etc. reports :-) I'm guessing you want to publish each of these as individual reports in their own right but most browsers should be forgiving enough to ignore the absence of these tags.

An alternative would be to generate these individual reports as HTML fragments, not complete pages, then have a process that takes these fragments and (1) generates each individual report as a complete page and (2) glues them together into a single big report.

There will be a feature in the next release that will let you run a program after a report has been generated that you could use to do this but in the meantime, you could set up a dummy plugin channel that ran every five minutes that did it for you. Or since 2.4.1 lets you run reports at specific times, you could generate the report fragments, then afterwards run another report that generated each individual report as a complete page (by <tt>{%INCLUDE%}</tt>'ing the report fragment into a template that describes the desired whole page) and another one that did the same thing to generate the combined report.

Using Awasu to run cron jobs; when will the madness ever end...? :roll:

User avatar
kevotheclone
Posts: 239
Joined: Mon Sep 08, 2008 7:16 pm
Location: Elk Grove, California

Postby kevotheclone » Sat Aug 15, 2009 7:17 am

One of the simplest solutions to combining files is often overlooked (or forgotten), the "DOS" Copy command. The Copy command can take multiple files and combine them into the output file; just type a plus sign between the files being concatenated.

So whether you need the individual reports or not, you can write a simple batch file in a few minutes, by leaving header and footer out of the Channel Report Templates and concatenating them via the batch file.

Code: Select all

REM Build individual reports...
Copy Header1.txt+ChanRpt1.txt+Footer1.txt ChannelReport1.html
Copy Header2.txt+ChanRpt2.txt+Footer2.txt ChannelReport2.html

REM Build combined report...
Copy CombinedHeader.txt+ChanRpt1.txt+ChanRpt2.txt+CombinedFooter.txt CombinedChannelReport.html

REM If needed, delete any files that you don't need
REM and don't want hanging around until the Channel Reports are run again.

rsr
Posts: 27
Joined: Wed May 06, 2009 10:03 pm

Postby rsr » Sat Aug 15, 2009 12:53 pm

Thank you very much for all your suggestion. Very useful information!!

Base on one of your suggestions, the solution turned out easier that expected. :lol: I modified my individual Awasu Channel Report Templates by removing the <html> and <body> tags and left these tags in the Channel Reports that combines them. Voila!! worked like a charm.

The combined report can now be viewed and edited with the WYSIWYG editors

And you were correct IE was very forgiving (in this case) after striping out the tags. It still was able to display the reports as a genuine html file. Haven't tested on other Browsers as yet.

Thank you both again for your suggestions!!

rsr
Posts: 27
Joined: Wed May 06, 2009 10:03 pm

Postby rsr » Sun Aug 23, 2009 2:25 pm

There will be a feature in the next release that will let you run a program after a report has been generated that you could use to do this


This would be an extremely useful feature! 8) .

I have another application that could use this feature as we speak. Do you have a trial of this version with this feature that i can test?

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Mon Aug 24, 2009 8:09 am

rsr wrote:Do you have a trial of this version with this feature that i can
test?

Yah, yah, I can take a hint :-) I'll get something out to you shortly... :whip:

User avatar
kevotheclone
Posts: 239
Joined: Mon Sep 08, 2008 7:16 pm
Location: Elk Grove, California

Postby kevotheclone » Tue Sep 15, 2009 7:33 am

I am little late posting this but "life" has gotten in the way lately. :|

I begged, borrowed and stole to get a copy of this update, I don't know if rsr has actually tested it yet but I took it for a test spin and it's impressive.

As we have come to expect, with Taka/Awasu, you can "expect the unexpected" and I mean that in a good way. :D

I was expecting a simple run this program and maybe Awasu might provide the file path where the Channel Report was saved, silly me. :oops:

Yes Awasu will pass in the file path, the Report Name, the Report Description and the Template name. In addition Awasu will pass in the source of the Channel Report's data, either the Channel Filter's Name, the Workpad's name or a delimited list of Folder names. And if you've defined any Template Parameters, Awasu will pass those to your program too.

Instead of a Config file like Channel Hooks, all these parameters are passed similar to Send to and User Tools, where you specify which parameters you want on the command line:
MyApp.exe {%REPORT-FILENAME%} {%REPORT-NAME%}, etc.

You can also specify a directory to run the program in, a timeout period as well as some options how how or whether to deal with your program return code.

Very impressive, considering Taka put all this together very quickly. :clap:

The only problem I encountered was with the Template Parameters, they didn't seem to get passed into my simple "echo"-style test app, but this is a pre-pre-pre-release feature.

If Taka gets Template Parameters working correctly, this could have some interesting options... You could define Template Parameters that aren't actually used in your Channel Report Template, but are passed on to your post-processing program, altering it's behavior in some way on a report-by-report basis. :coolthumb:

rsr, if you've gotten a chance to test this feature let us know the results.

User avatar
support
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Postby support » Tue Sep 15, 2009 8:23 am

kevotheclone wrote:The only problem I encountered was with the Template Parameters, they didn't seem to get passed into my simple "echo"-style test app, but this is a pre-pre-pre-release feature.

Meh, doesn't make any difference, it should still work :| And it works fine for me :roll:

The template parameter name should match exactly what you've defined in the report e.g. if you have a parameter called <tt>foo</tt>, then you get its value by using <tt>{%foo%}</tt>. Global parameters are also available.

kevotheclone wrote:You could define Template Parameters that aren't actually used in your Channel Report Template, but are passed on to your post-processing program, altering it's behavior in some way on a report-by-report basis.

Yup, that was the intent :-)

User avatar
kevotheclone
Posts: 239
Joined: Mon Sep 08, 2008 7:16 pm
Location: Elk Grove, California

Postby kevotheclone » Wed Sep 16, 2009 12:22 am

You're right! :oops:

I tested it again and it works as advertized. I even tested to see if it was originally a case-sensitivity problem, but it wasn't. Channel Report Template Parameters appear to be case-insensitive, so who knows what I did to cause it to not work.:lost:

I hope you don't flip the "bozo bit" on me. :wink:


Return to “Awasu - General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest