Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
send eMail notifications: BIRT RCP 4.3.1
shir
<p>Hi,<br>
<br>
I am using BIRT RCP 4.3.1.<br>
<br>
I have a report; which shows the status of various files which we receive from up-stream systems.<br>
<br>
If suppose any particular file is still pending, i need to send a mail notification to the respective up-stream system.</p>
<p> </p>
<p>attached is a sample view of the report</p>
Find more posts tagged with
Comments
kclark
<p>The only way I can think of to do this off hand is to write a PHP script that sits on your server, then call that PHP script with some JavaScript depending on the status, this should be able to be done in a text item. Or you can write a Java class that handles the email, then include this in a text item and take the same approach</p>
<p> </p>
<p>pseudocode</p>
<pre class="_prettyXprint _lang-">
if(data["ROW"] == "Pending") {
eml = new com.someclass.Email();
eml.sendEmail("contents");
}
</pre>
shir
<p>Thanks Kristopher,</p>
<p> </p>
<p>However i am still at a loss, as from where to begin the report.</p>
<p> </p>
<p>If its not too much can you give an example ?</p>
shir
<p>bumping the thread!!</p>
Clement Wong
<p>As far as your requirements, I'm a little confused as whether you would like:</p>
<p> </p>
<p>[A] Report that for all records that in Pending status, email out to the upstream systems.</p>
<p>
Report with buttons that the end user can manually click the mail icon to take action to email to upstream system.</p>
<p> </p>
<p>If it's [A], then within BIRT, you may want to look at this DevShare and tweak the logic to just email for Pending status:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/482-mailing-birt-reports-as-body-of-email'>http://developer.actuate.com/community/forum/index.php?/files/file/482-mailing-birt-reports-as-body-of-email</a></p>
;
<p> </p>
<p>If it's
, then outside of BIRT, the target of the button would be an utility/app such as a servlet. As a example, the servlet would take in various parameters from your row detail and email out to the corresponding person/group. The logic of parsing the parameters, populating the body of the email and sending out of the mail would be handled in the servlet itself.</p>
shir
<p>Hi Clement,</p>
<p> </p>
<p>I am looking to implement option
,</p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">
Report with buttons that the end user can manually click the mail icon to take action to email to upstream system.</span></p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">if this has to be a servlet, is there any way to implement it with BIRT RCP, 4.3.1.</span></p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">If Not then what options do i have to take this forward</span></p>
shir
<p>I have been tinkering around with some HTML , and mailto tag seems to do the job.</p>
<p> </p>
<p>I put in a text element of type HTML, and put the below text/HTML code:</p>
<p> </p>
<div><a href="mailto:<VALUE-OF>row["DataSet_Feed_DL::DL_DETAIL"]</VALUE-OF>?subject=Files to VOLKER Pending&body=Hi%20Team,%0A%0AThe%20file%20<VALUE-OF>row["DataSet_FOFeed_AMEROLA::DataSet_FOFeed_AMER::FEED_NAME"]</VALUE-OF>%20has%20not%20been%20received%20for%20date%20<VALUE-OF>row["DataSet_FOFeed_AMEROLA::DataSet_FOFeed_AMER::BUS_DATE"]</VALUE-OF>.%0A%0APlease%20provide%20us%20with%20the%20ETA%20to%20send%20the%20file.%0A%0A-%20MOTIF team"></div>
<div> send mail</div>
<div></a></div>
<div> </div>
<div>This actually does the job, i am looking for
</div>
<div> </div>
<div>Thanks again for all the help.</div>
shir
<p>Hi All,</p>
<p> </p>
<p>Coming back to the option [A], i.e. send mail at the click of a button.</p>
<p> </p>
<p>Step 1: Users run the report</p>
<p>Step 2: Users pass parameters</p>
<p>Step 3: Report is displayed (this is hosted on a tomcat server)</p>
<p>Step 4: User clicks a button, and the report (web page) being displayed is sent across as a mail to recipients</p>
<p>I have referred to the post <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/482-mailing-birt-reports-as-body-of-email/'>http://developer.actuate.com/community/forum/index.php?/files/file/482-mailing-birt-reports-as-body-of-email/</a>
, </p>
<p>however i was not able to connect the dots as how should we incorporate the .java code to our .rptdesign report.</p>
<p>I am assuming that the the code needs to be placed somewhere during the report initialization.</p>
<p>Upon the button click; some background logic will access to a particular method in the java code, pass parameters and finally send email with the report content.</p>
<p> </p>
<p>Any pointers folks, so that i can try tinkering with my report?</p>
Clement Wong
<p>For your requirements, in Step 4, when a user clicks on a button, the action of the button will need to take place on the server side.</p>
<p> </p>
<p>This would mean that it would need to re-execute the same report. However, you'll add similar code from the DevShare you referenced would be in your report design. You would also add a hidden boolean report parameter, "sendEmail", for example, with a default of false.</p>
<p> </p>
<p>In the button of your report when it re-executes the report, you'll pass in the same parameters, and "sendEmail" to true.</p>
<p> </p>
<p>You won't be able to send the entire report client side using that DevShare example.</p>