on 08-12-2014 7:13 PM
Hello Friends,
I am able to schedule Webi and Crystal reports to BI Launch pad INBOX, now I am trying to send/ copy reports from BI Launch pad to some Server.
How can it be done? Do we have any examples?
Please let me know.
Regards,
Rakhy.
I don't think it can be done automatically with reports in the Inbox. However, if you include the option to "Keep an instance in the history" as part of your schedule to inbox, you could potentially open the instance from History in code.
If you're scheduling to a PDF format, you could just download the file and save it. If it's not in PDF format you would have to have two separate code paths for the export - one for Webi reports that uses the RESTful web service to get a PDF export of the report and another for Crystal reports that loads the instance into a ReportDocument and exports it.
The other option is to schedule the report twice - once to Inbox and once to a File destination.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rakhy,
There are multiple ways how you can do it. Let me explain the steps below
1. Login to enterprise
2. Query to infostore to get the inbox id for a user.
3. Again query the infostore to retrieve the pdf instance from the user inbox.
4. Use IFiles interface to send/export the instance to disk.
Below is the snippet code
================================================
IInfoObjects instances = iStore.query("select * from ci_infoobjects where si_id=<report id in the inbox> and SI_KIND='PDF'");
for (int i = 0; i < instances.size(); i++)
{
IInfoObject iReport=(IInfoObject)instances.get(i);
IFiles files = (IFiles)iReport.getFiles();
IStreamingDownloadFile iStream = ((IRemoteFile)files.get(0)).getStreamingDownloadFile(0);
iStream.openFile();
BufferedOutputStream pw = new BufferedOutputStream(new FileOutputStream("C:\\Sample.pdf",false));
while(iStream.hasNextChunk())
{
pw.write(iStream.nextChunk());
}
pw.flush();
pw.close();
iStream.closeFile();
out.print("<br>done");
}
=====================================================
Thanks,
Prithvi
Rakhy,
You might want to try running a couple of queries in QueryBuilder to see if there's an obvious property available for this.
1. Get the SI_ID value of a user's Inbox (in the CMC, find the inbox, righ-click on it, and go to Properties) where you know that there are both read and unread items.
2. Run the following query:
Select * from CI_INFOOBJECTS where SI_PARENTID = <the SI_ID value from step 1>
Look through all of the properties to see if there's something there that will indicate whether the report has been read. I don't guarantee that it's there, but this is the type of process I follow when I'm looking for various properties. In your code, you'll include this field in the CMS query and you'll most likely have to access it through the properties of the IInfoObject.
-Dell
Hi Prithvi and Dell,
I found another solution to check if the report is read or not in INBOX. This is at query level.
String inboxQuery = "SELECT SI_ID, SI_NAME, SI_FILES, SI_MARKED_AS_READ FROM CI_INFOOBJECTS WHERE SI_PARENTID = " + inboxID +
" AND (SI_MARKED_AS_READ IS NULL OR SI_MARKED_AS_READ = 0) ";
With the above query I will get reports which are unread .
Regards,
Rakhy.
One more question,
As you guys know I am scheduling reports to INBOX, if report fails for some reason I would like to re run the report for couple more times.
InCMC, under Schedule -> Recurrence I see Number of reties allowed field. Can we set value to that field so that report will rerun if it fails?
Please let me know your thoughts on it.
Ragards,
Rakhy.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.