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)
Using Iserver Report Scheduler from an external applicaiton
walnash
Find more posts tagged with
Comments
RSiegler
Avinash,<br />
<br />
You can use the Information Delivery API for the iServer in order to make and send calls to the iServer and receive information back.<br />
<br />
This can be found by the web address of <your_server>:<SOAP_Port>/wsdl/<br />
(An example would be <a class='bbc_url' href='
http://myserver:8000/wsdl/v11/net/all/'>http://myserver:8000/wsdl/v11/net/all/</a>
; for your web service)<br />
<br />
From there you can choose the version and language you prefer to code with from the available options.<br />
The default SOAP Port is 8000.<br />
<br />
The process would likely use the SubmitJob, and JobScheduleDetail classes at a minimum.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'walnash'" data-cid="114764" data-time="1362401528" data-date="04 March 2013 - 05:52 AM"><p>
walnash
Hi,
Thanks for the reply. It was helpful. But i could not find the class JobScheduleDetail. I could find SubmitJob.
Also there is no description about these classes regarding the parameters they are expecting. The document 'Programming with Actuate iServer APIs' is not available at the BIRT document site. (
http://www.birt-exchange.com/be/downloads/documentation/#actuate11sp2docs)
.
Can you please guide me to the details of these APIs or if i can get that document.
Thanks,
Avinash
RSiegler
Avinash,
The document 'Using BIRT iServer Integration Technology' should provide more information that you require in that list of BIRT iServer 11 Service Pack 2 documentation.
Alternatively, you could open up a case with Actuate Support.
walnash
Hi,
I got the document mentioned
.
I have written a code which uses submitjob class for scheduling a job and sending email notification to the user. i have set these parameters as below:
job.SendEmailForSuccess = true;
job.SendEmailForFailure = true;
job.SendSuccessNotice = true;
job.OverrideRecipientPref = true;
I am able to submit the job, but the email notification is not received. In the informaiton console, under details of the job, notification settings, 'Send me an email notification' is showing as 'No'. Please see the attached screenshot.
What is the mistake i am making here?
Thanks
Avinash
RSiegler
Avinash,<br />
<br />
I will try the same on a test system I have in house here with IDAPI and let you know my results.<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'walnash'" data-cid="115020" data-time="1363177657" data-date="13 March 2013 - 05:27 AM"><p>
Hi,<br />
<br />
I got the document mentioned
.<br />
<br />
I have written a code which uses submitjob class for scheduling a job and sending email notification to the user. i have set these parameters as below:<br />
job.SendEmailForSuccess = true;<br />
job.SendEmailForFailure = true;<br />
job.SendSuccessNotice = true;<br />
job.OverrideRecipientPref = true;<br />
<br />
I am able to submit the job, but the email notification is not received. In the informaiton console, under details of the job, notification settings, 'Send me an email notification' is showing as 'No'. Please see the attached screenshot.<br />
<br />
What is the mistake i am making here? <br />
<br />
Thanks<br />
Avinash<br /></p></blockquote>
walnash
Hi,
Sending email issue is fixed. The problem was with the SMTP server. I used a different SMTP server and it worked.
Now i have a different problem. When i schedule a job from iHub information console and sets it to send an email with report as attachment, everything works fine and i get the report as attachment in the mail. But when i try to do the same thing through the IDAPI class, as i mentioned previously, setting all parameters and email format as 'PDF', i only get a mail with the link to the report but not the actual report as attachment. I am not sure this time it's the problem with SMTP server, as i am getting the mail and attachment when report is scheduled from information console. I have been breaking my head over it for some time and have not found any solution for it. I have tried different things as mentioned in the document 'Using BIRT iServer Integration Technology' but i have had no luck. Can anyone please help me with this?
Thanks,
Avinash
RSiegler
Avinash,
Are you setting the "AttachReportInEmail" to true?
In java this would be 'SubmitJob.setAttachReportInEmail(Boolean.TRUE)'.
walnash
Hi Ryan,
I have set that parameter to true as well. In fact i also tried by setting all the possible parameter to true as below:
var job = new SubmitJob();
job.OverrideRecipientPref = true;
job.EmailFormat = "PDF";
job.SendEmailForSuccess = true;
job.SendEmailForFailure = true;
job.SendSuccessNotice = true;
job.SendEmailForFailureSpecified = true;
job.SendEmailForSuccessSpecified = true;
job.SendFailureNoticeSpecified = true;
job.SendFailureNotice = true;
job.SendSuccessNoticeSpecified = true;
job.AttachReportInEmail = true;
job.AttachReportInEmailSpecified = true;
Even this has not worked
. I only get an email with link to the report with no attachment.
Avinash.
walnash
Got the attachment
. I had to check the 'attach document' check box in the management console - users - jobs. This solves my immediate problem. But i still have a question, according to the document on IDAPI, if the parameter OverrideRecipientPref is set to true and AttachReportInEmail also true, user should get the email with the attachment, irrespective of its settings. Why did this not work??
Avinash
RSiegler
Avinash,<br />
<br />
Looking at the code, there is one situation that I can think of that would not allow the user to get the output, and that is if the user does not have proper permissions to the document in the encyclopedia.<br />
<br />
For your SubmitJob() job, are you setting the permissions for users?<br />
If so, what permissions are you providing to the user not receiving the email?<br />
<br />
<blockquote class='ipsBlockquote' data-author="'walnash'" data-cid="115429" data-time="1364356956" data-date="26 March 2013 - 09:02 PM"><p>
Hi Ryan,<br />
<br />
I have set that parameter to true as well. In fact i also tried by setting all the possible parameter to true as below:<br />
<br />
var job = new SubmitJob();<br />
job.OverrideRecipientPref = true; <br />
job.EmailFormat = "PDF";<br />
job.SendEmailForSuccess = true;<br />
job.SendEmailForFailure = true; <br />
job.SendSuccessNotice = true;<br />
job.SendEmailForFailureSpecified = true;<br />
job.SendEmailForSuccessSpecified = true;<br />
job.SendFailureNoticeSpecified = true;<br />
job.SendFailureNotice = true;<br />
job.SendSuccessNoticeSpecified = true;<br />
job.AttachReportInEmail = true;<br />
job.AttachReportInEmailSpecified = true;<br />
<br />
Even this has not worked
. I only get an email with link to the report with no attachment.<br />
<br />
Avinash.<br /></p></blockquote>
walnash
Hi Ryan,
I am not providing any permission for submitjob. I cant find any way to provide permission through submitjob. However i did provide the user all the permission from the management console but still this did not work. In fact in management console, in job detail i can see that it says 'do not override recipient preferences' even though i have set job.OverrideRecipientPref = true. See the attachment.
I also have another problem now:
Using the submitjob class in IDAPI from the my .net app, I am able to submit a job and get email to the user whose credential is used for submitting the job (only when receive email is checked in management console).
I am able to send email to users who have been created in the iServer. The problem is that i want to send email to users and groups of users who are not there in iServer (external users). My application will have many users and groups and they get added everyday, so i cant keep creating users in the server every time. The below is what should happen from my app:
The user logs in to the .net app ( he is not a user in the iServer), goes to the report page, clicks on the report to view it ( report is rendered from iServer). He clicks on subscription, provides necessary details and mentions a group of users who will receive the email notification. This user will not be present in the iServer. This user, and other users and groups is present in my application DB which is a SQL server2008.
The IDAPI submitjob class and other classes in IDAPI are sending emails to users that are created in iServer. How can i send emails to users who are not in iServer?
Avinash
RSiegler
Avinash,
With regards to not being able to set permissions:
This is done by applying a PermissionArray object filled with an array of Permission objects as the ACL of the NewFile created.
Java equivalent would be:
Permission[] perm = new Permission[1];
ArrayOfPermissions aop = new ArrayOfPermissions(perm); //PermissionArray object
perm[0] = new Permission();
perm[0].setUserName("User1");
perm[0].setAccessRight("VREW");
NewFile file = new NewFile();
file.setName("MyTestFile.rptdocument");
file.setACL(aop);
With regards to emailing reports to email addresses not tied to iServer users:
This is not a supported function. In order to receive the email attachment, the user needs permissions to the object in the Encyclopedia. The iServer sends emails to its users by means of the associated email address for that user record.
With regards to Override Preferences not showing up properly:
Are you using VB to write your code? I cannot duplicate by using my sample Java application but want to make sure I test in the exact same fashion that you are.
walnash
Hi Ryan,
I am writing my code in C#.
Regarding sending email to users not tied to iServer:
Is there any other way this can be implemented. I was reading about RSSE application. I have not gone through this completely, but will this help me? And is it possible at all in iServer, to send email to anonymous email IDs which does not belong to any users? For eg: while creating subscription can i enter recipient email ids on the fly?
Avinash
RSiegler
<blockquote class='ipsBlockquote' data-author="'walnash'" data-cid="115588" data-time="1364820300" data-date="01 April 2013 - 05:45 AM"><p>
Hi Ryan,<br />
<br />
I am writing my code in C#.<br />
<br />
Regarding sending email to users not tied to iServer: <br />
Is there any other way this can be implemented. I was reading about RSSE application. I have not gone through this completely, but will this help me? And is it possible at all in iServer, to send email to anonymous email IDs which does not belong to any users? For eg: while creating subscription can i enter recipient email ids on the fly?<br />
<br />
Avinash<br /></p></blockquote>
<br />
Avinash,<br />
<br />
I will run some tests in house with writing the code in C# to see if I can duplicate in some fashion the results you are obtaining.<br />
<br />
With regards to email:<br />
There are not ways to send to an anonymous email address.<br />
The best way would be to add users to the RSSE as users to the system and then you could send emails to those users. There would not be any other supported method.
walnash
Thanks Ryan. While doing some more research on emailing, i have come across another problem.
Our application is cloud based, and the user of our application see separate instance of our application which applies to them. Each of the user configures their own SMTP server for sending report notification. Our application while submitting the subscription to the report server(SSRS), configures this SMTP server in our report server. So, basically we do not have a fixed SMTP server configured in our report server and SMTP server configuration to the server is done on the fly through an API. Is something similar possible in iServer? Is there an API which can be used to configure SMTP server in iServer?
Avinash
RSiegler
<blockquote class='ipsBlockquote' data-author="'walnash'" data-cid="115666" data-time="1364992678" data-date="03 April 2013 - 05:37 AM"><p>
Thanks Ryan. While doing some more research on emailing, i have come across another problem. <br />
<br />
Our application is cloud based, and the user of our application see separate instance of our application which applies to them. Each of the user configures their own SMTP server for sending report notification. Our application while submitting the subscription to the report server(SSRS), configures this SMTP server in our report server. So, basically we do not have a fixed SMTP server configured in our report server and SMTP server configuration to the server is done on the fly through an API. Is something similar possible in iServer? Is there an API which can be used to configure SMTP server in iServer?<br />
<br />
Avinash<br /></p></blockquote>
<br />
Avinash,<br />
<br />
I believe that adding or modifying SMTP servers like that requires a system restart.<br />
The system is designed to use SMTP connections in a first come first serve basis and not create and destroy on the fly.
walnash
Hi,<br />
<br />
I am trying to solve that users issue by creating users during subscription. I wrote below code:<br />
<br />
CreateUser l_createUser = new CreateUser();<br />
l_createUser.IgnoreDup = true;<br />
l_createUser.IgnoreDupSpecified = true;<br />
l_createUser.User = new User();<br />
l_createUser.User.Name = "Tester1";<br />
l_createUser.User.Password = "Tester1";<br />
l_createUser.User.HomeFolder = "Tester1"; <br />
l_createUser.User.ViewPreference = UserViewPreference.DHTML;<br />
l_createUser.User.ViewPreferenceSpecified = true;<br />
<span style='color: #FF0000'>l_createUser.User.SendEmailForSuccess = true;<br />
l_createUser.User.SendNoticeForSuccessSpecified = true;<br />
l_createUser.User.AttachReportInEmail = true;</span><br />
l_createUser.User.EmailAddress = "tester1@gmail.com";<br />
<br />
AdminOperation l_createUserOpt = new AdminOperation();<br />
AdminOperation[] l_adminopt = new AdminOperation[1];<br />
l_createUserOpt.Item = l_createUser;<br />
l_adminopt[0] = l_createUserOpt;<br />
client.administrate(header, l_adminopt);<br />
<br />
This created the user in the iServer, but the jobs settings were not applied. I mean even though i set these parameter as true ( see in red above), these settings were not checked in iserver ( see attachment). what could be the problem here?<br />
<br />
Avinash
RSiegler
Avinash,
In my test in house using similar code, I received proper result of the user having their preference on emails to receive emails and to attach the document.
Below is my code used:
User user = new User();
CreateUser cu = new CreateUser();
cu.IgnoreDup = true;
cu.IgnoreDupSpecified = true;
cu.User = user;
user.AttachReportInEmail = true;
user.AttachReportInEmailSpecified = true;
user.EmailAddress = "mymail@donotemail.com";
user.Name = "CSharpTest";
user.Password = "";
user.SendEmailForSuccess = true;
user.SendEmailForSuccessSpecified = true;
AdminOperation ao = new AdminOperation();
AdminOperation[] aoa = new AdminOperation[1];
aoa[0] = new AdminOperation();
ao.Item = cu;
aoa[0] = ao;
AdministrateResponse resp = l_proxy.administrate(aoa);