Save webi report as pdf programmatically

Does anyone has any SDK code sample or can point me to the location of code sample on how to save a webi report as PDF file programmatically? Also, is the ReportEngineSDK is sufficient for this task or I need some other SDK?
We are running XIr2 SP1 on Windows Server 2003, with Tomcat as web container.
Any help will be very much appreciated.

Hi,
I think Using ReportEngine SDK you would not be able to save the webi report in PDF format.However it could be possible if you schedule a webi report to PDF format to unmanaged disk.
You can refer the following tutorials given in developer library's BusinessObjects Enterprise SDKs. You can either use .NET or Java SDKs.
How to schedule a report to a destination (FTP, SMTP, Disk, Printer, Inbox)
How to schedule and view Web Intelligence documents
Here is the link for developer library:
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
Thanks,
Swati

Similar Messages

  • Save the report in PDF format on the server: is it possible?

    Hi all,
    Is it possible to save the report in PDF format on the server?
    In other words, in a web application:
    1) the user requests a report
    2) the report produced in PDF format, is saved on the server, where is the Java Reporting Component
    3) the report, in PDF format, is sent to the client's user
    Thanks a lot

    PrintOutputController.export, get the byte stream, save on server.
    Sincerely,
    Ted Ueda

  • In oracle 2.5 version report builder how to add option to generate/save the report as pdf file?

    I am working with reports of 2.5 version and i got a requirement for adding an option to save the report in pdf format. Can anybody please help me on this asap
    Thanks & Regards

    Are u sure about  the report version.
    Please do upgrade  while  even in oracle  they almost stopped for new version -Developer suite

  • Unable to save webi report in excel format

    Hi All,
    I have a question. I recently upgrsded my internet explorer from IE 7 to IE 8.
    Previously, i was able to save webi reports in excel format without any issues.Even after upgrading to IE version8, i was able to save webi reoprts to excel without any issues for 2 weeks.
    Suddenly I am unable to save Webi reports in excel format now.When I select the Save to my computer as Excel option the saving dialog box appears and hangs forever.
    Can someone please advise me on this??
    Please hel as it is very urgent.

    Hi All,
    Trying to replicate WEBI Excel Download issue.
    Operating system : Windows 7
    Internet Explorer : IE8 Version 8.0.7600.16385CO.
    Jre Version : 1.6_ greater than 1.8 version.
    If anybody having above specifications in your machines Please try to save a webi reports to excel format and send me the results.

  • Save Web page into PDF in Windows 7 32 bit for Adobe 7

    When security under Internet options in Internet Explorer runs with "Enable Protected Mode" checked, can not save web page into PDF. The version of Adobe is 7.
    Nazir

    Are you saying you cannot print to the Adobe PDF printer or what. You have to be more complete in your description since AA7 will not fully work in Win7. You will have to use workarounds, but knowing what steps you are using is important to giving any help. Just saying save does not help. Of course, you might be able to use the MS plugin for creating PDFs as an alternative if you only have AA7. One thing that you find with AA7 is that PDF Maker will likely not work and also the printer will have to be a print to file, followed with a use of Distiller to complete the PDF creation. The AA7 version of AcroTray that does a lot of the work in the background should not be expected to work with Win 7, thus the need for workarounds.

  • Download web reports to pdf

    Hi,
    I'm starting investigations to see if we can download web reports to pdf files as well as just excel. I would like to know if any knows of this being done before and any ideas of how this could be done.
    Just investigating at the moment so any comments are most welcome
    Thanks
    Ian

    Hi Ian Walker,
      There is a document available in
    http://service.sap.com/bw and then
    Media library --> HOW TO ... Guides --> Guide List  SAP BW 3.0B/BW 3.1 Content
    File  : How to convert web application into .pdf format.zip
    Check this out you will have answer.
    Assign points if you consider this usefull.
    Hope this helps
    arun
    Message was edited by: Arun Prasad

  • Is there an ipad app that let's u save web articles as PDFs?

    Is there an ipad app that let's u save web articles as PDFs?

    The screen capture is not a good solution because most articles are longer than the screen and require scrolling. I don't know of any way to do this at present. Some web articles have a "print" option which optimizes the article's format for printing, at which point instead of printing, you can opt to save the article as a pdf. But for now, this is only doable on a desktop. Perhaps if printing becomes available for the iPad, this might work.

  • Error "Session Timed Out" When saving  webi report as PDF

    Hi,
    I am getting below error when saving  report as PDF
    The Session Timed Out.The document *.wid has been auto saved  in the Favorites~WebIntelligence Folder..Click Restore to retrieve it.
    (ERROR : WIJ600001).
    I get above error in PROD  but works fine in DEV.
    Version :  BOE 3.1 SP7 (DEV & PROD).
    Session Time out  set as  one hour.
    Report runs for 3 minutes .once I get the data if I try to save it as PDF immediately I get the above mentioned Error.

    The default Webi auto-save is every 600 seconds, which is 10 minutes.  You could increase it to 3600 seconds (1 hour) in CMC -> Applications > Web Intelligence > Properties > Auto-save Settings on "Auto-save time delay".
    See KB 1297132 - Error: WIJ 60001 after the Web Intelligence Java Report Panel is left inactive some time on http://service.sap.com/sap/support/notes/1297132.
    Hope this helps,
    Jin-Chong

  • Save SSRS Report as pdf using Reporting Services

    I've been trying to convert a SSRS Report to PDF and save to
    my local drive using the Reporting Web Services. Though I'm able to
    generate the corresponding pdf file but the contents of the file are
    missing. I've checked that the report I'm trying to convert is not an
    empty one. Only the header section is present there within the generated
    pdf files. Below is the code I'm using:
    protected void GeneratePDFFromReport(object sender, EventArgs e)
    RS2005.ReportingService2005 rs;
    RE2005.ReportExecutionService rsExec;
    // Create a new proxy to the web service
    rs = new RS2005.ReportingService2005();
    rsExec = new RE2005.ReportExecutionService();
    // Authenticate to the Web service using Windows credentials
    rs.Credentials = new System.Net.NetworkCredential("username", "password", "domain");
    rsExec.Credentials = new System.Net.NetworkCredential("username", "password", "domain");
    //rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
    rs.Url = "http://servername/reportserver/reportservice2005.asmx";
    rsExec.Url = "http://servername/reportserver/reportexecution2005.asmx";
    string historyID = null;
    string deviceInfo = null;
    string format = "PDF";
    Byte[] results;
    string encoding = String.Empty;
    string mimeType = "application/pdf";
    string extension = String.Empty;
    RE2005.Warning[] warnings = null;
    string[] streamIDs = null;
    // Path of the Report - XLS, PDF etc.
    string fileName = @"C:\Report\MemberReport.pdf";
    // Name of the report - Please note this is not the RDL file.
    string _reportName = @"/ReportFolder/ReportName";
    string _historyID = null;
    bool _forRendering = false;
    RS2005.ParameterValue[] _values = null;
    RS2005.DataSourceCredentials[] _credentials = null;
    RS2005.ReportParameter[] _parameters = null;
    try
    _parameters = rs.GetReportParameters(_reportName, _historyID, _forRendering, _values, _credentials);
    RE2005.ExecutionInfo ei = rsExec.LoadReport(_reportName, historyID);
    results = rsExec.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);
    Guid siteID = SPContext.Current.Site.ID;
    GuidwebID = SPContext.Current.Site.OpenWeb().ID;
    stringbudgetName = string.Empty;
    try
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using(SPSitesite = newSPSite(siteID))
    using(SPWebweb = site.OpenWeb(webID))
    web.AllowUnsafeUpdates = true;
    web.Files.Add(web.Url + "/Shared Documents/SharepointMemberExpenseReport_" + DateTime.Now.ToShortDateString().Replace('/','-') + ".pdf", results, true);
    web.AllowUnsafeUpdates = false;
    catch{ }
    try
    FileStream stream = File.Create(fileName, results.Length);
    stream.Write(results, 0, results.Length);
    stream.Close();
    catch { }
    results = null;
    catch (Exception ex)
    throw ex;
    Any help would highly be appreciated. Thanks.

    use this code, save the byte array into format of pdf
    public static byte[] ExportReportInPDF(ReportViewer ReportViewerCompetency)
    Warning[] warnings;
    string[] streamids;
    string mimeType;
    string encoding;
    string filenameExtension;
    byte[] bytes;
    if (ReportViewerCompetency.ProcessingMode == ProcessingMode.Local)
    bytes = ReportViewerCompetency.LocalReport.Render("PDF", null, out mimeType,
    out encoding, out filenameExtension, out streamids, out warnings);
    else
    bytes = ReportViewerCompetency.ServerReport.Render("PDF", null, out mimeType,
    out encoding, out filenameExtension, out streamids, out warnings);
    return bytes;
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • How to save WEBI report in CSV format on file system

    Hi
    I am trying to save a WEBI report from BO server in CSV format through java / BO SDK. Iam able to save report in html , pdf and xls format. Please provide a code snippet if available.
    I know for pdf and xls we directly use doc, binary view and for html there is HTMLVIEW. But iam not able to save it using CSV OutputFormatType
    thanks

    Hi,
    Just in case, I think that Shawn wanted to send the following link showing the different formats:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RE_SDK/resdk_dg_doc/doc/resdk_java_CustoWebI_dg/ewucw_053.html#1037054
    Cheers

  • How to save webi report created using InfoView into my local PC

    Hi Experts,
    I am creating a Web Intelligence document using infoview and once the report is ready, i want to save it in my local PC for later refresh.  How can i save that using Infoview ? I don't want to save the report in the server(repository).
    Regards,
    Suresh

    After saving WebI reports to Local PC also, one can't see them COZ of .wid extension, to view them again we need WebI installed.
    You can Save them to Excel or PDF or CSV to your local PC and Schedule them to get latest data as well.
    Thank You!!

  • I use iMac desktop. I can't save web pages as PDF file by using Firefox, but by Safari is fine.

    I'm using Mac OS X 10.6.4. Today, I tried to save my email content as a PDF file. However, I only got a PDF file that have partial content of email. Then I adjust the printer setting and did it again, then I only got a blank PDF file. There was nothing inside. Then I tried to save email as a PDF file by using Safari browser. And I got a complete and sucessful PDF file. I usually save web pages or web mail, online receipt as PDF file by use Firefox. But since I have updated to the new version, there were many problems with my Firefox. I tried to restore all my application and made Firefox in the old 3.6.3 version which I used to have no problem. But now still not working.

    I solved it for myself: it was my HP smart-web printer crap that was a plug in and add on for firefox that somehow automatically got installed when I upgraded to 5. I disabled both in the add-ons manager, and voila, printing is working.
    It seems there are many things, like this and the Google toolbar, that were screwed by the oddly fast update to 5. Looks like Mozilla didn't give anybody any notice! Must've been some really bad security hole.

  • I use iMac desktop. I can't save web pages to PDF file by using Firefox, but by Safari is fine.

    I'm using Mac OS X 10.6.4. Today, I tried to save my email content as a PDF file. However, I only got a PDF file that have partial content of email. Then I adjust the printer setting and did it again, then I only got a blank PDF file. There was nothing inside. Then I tried to save email as a PDF file by using Safari browser. And I got a complete and sucessful PDF file. I usually save web pages or web mail, online receipt as PDF file by use Firefox. But since I have updated to the new version, there were many problems with my Firefox. I tried to restore all my application and made Firefox in the old 3.6.3 version which I used to have no problem. But now still not working.
    ''Duplicate post, continue [https://support.mozilla.com/en-US/questions/746583 here]''

    hello jlzibell, please go through the troubleshooting steps described at [[Websites say cookies are blocked - Unblock them]].

  • Convert a web report into pdf and print (in BW 3.5)

    Hello gurus,
    i have few web reports ( created using WAD). i am looking for a possibility to convert a web report (viewed in a browser by a user) into pdf and print them and this should be done by pressing a button.
    Is it possible in BW 3.5 version?.
    could anyone please help me?
    Any how to docs. would be really helpful.
    thanks and regards
    kumar

    Here it is
    <HTML>
    <!-- BW data source object tags -->
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_DATA_PROVIDER"/>
             <param name="NAME" value="DATAPROVIDER_1"/>
             <param name="DATA_PROVIDER_ID" value=""/>
             DATA_PROVIDER:             DATAPROVIDER_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_PROPERTIES"/>
             <param name="TEMPLATE_ID" value="ZPD_ADHOC_PAGE"/>
             <param name="MENU_BACK" value=""/>
             <param name="MENU_BACK_TO_START" value=""/>
             <param name="SUPPRESS_WARNINGS" value="X"/>
             <param name="MENU_FILTER" value=""/>
             <param name="MENU_FILTER_ON_AXIS" value=""/>
             <param name="MENU_SELECT_FILTER" value=""/>
             <param name="MENU_FILTER_ON_AXIS_CHART" value=""/>
             <param name="MENU_FILTER_CHART" value=""/>
             <param name="MENU_FILTER_DRILL_DOWN" value=""/>
             <param name="MENU_DRILL_UP_GIS" value=""/>
             <param name="MENU_DRILL_DOWN" value=""/>
             <param name="MENU_EXCHANGE_OBJECTS" value=""/>
             <param name="MENU_REMOVE_DRILL_DOWN" value=""/>
             <param name="MENU_SWITCH_AXIS" value=""/>
             <param name="MENU_HIERARCHY_NODE_DRILL" value=""/>
             <param name="MENU_HIERARCHY_DRILL" value=""/>
             <param name="MENU_HIERARCHY_STATE" value=""/>
             <param name="MENU_SORT" value=""/>
             <param name="MENU_CALCULATE_RESULT" value=""/>
             <param name="MENU_CALCULATE_VALUE" value=""/>
             <param name="MENU_CUMULATE_VALUE" value=""/>
             <param name="MENU_DISPLAY_DOCUMENTS" value=""/>
             <param name="MENU_DOCUMENT_CREATE" value=""/>
             <param name="MENU_DISPLAY_DOCUMENT_PROP" value=""/>
             <param name="MENU_DISPLAY_DOCUMENT_SELEC" value=""/>
             <param name="MENU_RRI" value=""/>
             <param name="MENU_EXPORT_TO_CSV" value=""/>
             <param name="MENU_EXPORT_TO_XLS" value=""/>
             <param name="MENU_BOOKMARK" value=""/>
             <param name="MENU_CHARACTERISTIC_PROPERTIES" value=""/>
             <param name="MENU_VALUE_PROPERTIES" value=""/>
             <param name="MENU_QUERY_PROPERTIES" value=""/>
             <param name="MENU_VARIABLE_SCREEN" value=""/>
             <param name="MENU_CURRENCY_CONVERSION" value=""/>
             <param name="MENU_ENHANCED" value=""/>
             TEMPLATE PROPERTIES
    </object>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
    <TITLE>SAP BW Reporting Print Page</TITLE>
    <link href="/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>
    <script type"text/javascript">
    <!--
    //   Global Variable Definition
    var dataTable = "";
    var pageRowCnt = 0;
    var prevPage = 0;
    var ColumnCnt = 0;
    var PrintDateTimeStamp = new Date();
    var rptWidth = 0;
    //DATE STAMP FUNCTION
    function datestamp(){
               var Today = new Date()
               document.write(Today);
    function getReportTitle() {
                    var myQueryString = window.location.search;
                    var startOfRptTitle = myQueryString.indexOf("QTITLE=");
                    if (startOfRptTitle != -1)
                         var endOfRptTitle = myQueryString.indexOf("&", startOfRptTitle + 7);
                         var myTitle = unescape(myQueryString.substring(startOfRptTitle + 7, endOfRptTitle));
                         var rpttitle = "";
                         for(i=0;i<myTitle.length;i++){
                             if (myTitle.substring(i,i+1) == "+"){
                                 rpttitle = rpttitle + ' ';
                             else
                                 rpttitle = rpttitle + (myTitle.substring(i,i+1));
                    else
                         var rpttitle =  "Unspecified Query Title";
                    return rpttitle;
    queryTitle=getReportTitle();
    function getHeading2() {
                    var myQueryString = window.location.search;
                    var startOfHdr2 = myQueryString.indexOf("HDR2=");
                    if (startOfHdr2 != -1)
                         var endOfHdr2 = myQueryString.indexOf("&", startOfHdr2 + 5);
                         var myHdr2 = unescape(myQueryString.substring(startOfHdr2 + 5, endOfHdr2));
                         var hdr2 = "";
                         for(i=0;i<myHdr2.length;i++){
                             if (myHdr2.substring(i,i+1) == "+"){
                                 hdr2 = hdr2 + ' ';
                             else
                                 hdr2 = hdr2 + (myHdr2.substring(i,i+1));
                    else
                         var hdr2 =  "#";
                    return hdr2;
    header2=getHeading2();
    function getHeading3() {
                    var myQueryString = window.location.search;
                    var startOfHdr3 = myQueryString.indexOf("HDR3=");
                    if (startOfHdr3 != -1)
                         var endOfHdr3 = myQueryString.indexOf("&", startOfHdr3 + 5);
                         var myHdr3 = unescape(myQueryString.substring(startOfHdr3 + 5, endOfHdr3));
                         var hdr3 = "";
                         for(i=0;i<myHdr3.length;i++){
                             if (myHdr3.substring(i,i+1) == "+"){
                                 hdr3 = hdr3 + ' ';
                             else
                                 hdr3 = hdr3 + (myHdr3.substring(i,i+1));
                    else
                         var hdr3 =  "#";
                    return hdr3;
    header3=getHeading3();
    function getAsOfDate() {
                    var myQueryString = window.location.search;
                    var startOfRelevance = myQueryString.indexOf("ASOFDATE=");
                    if (startOfRelevance != -1)
                         var endOfRelevance = myQueryString.indexOf("&", startOfRelevance + 9);
                         var myRelevance = unescape(myQueryString.substring(startOfRelevance + 9, endOfRelevance));
                         var asof = "";
                         for(i=0;i<myRelevance.length;i++){
                             if (myRelevance.substring(i,i+1) == "+"){
                                 asof = asof + ' ';
                             else
                                 asof = asof + (myRelevance.substring(i,i+1));
                    else
                         var asof =  "";
                    return asof;
    asofDateTime=getAsOfDate();
    function getPaperSize() {
                    var myQueryString = window.location.search;
                    var startOfPaperSize = myQueryString.indexOf("PSIZE=");
                    if (startOfPaperSize != -1)
                         var endOfPaperSize = myQueryString.indexOf("&", startOfPaperSize + 6);
                         var myPaperSize = unescape(myQueryString.substring(startOfPaperSize + 6, endOfPaperSize));
                         var psize = "";
                         for(i=0;i<myPaperSize.length;i++){
                                 psize = psize + (myPaperSize.substring(i,i+1));
                    else
                         var psize =  "0";    // default if none supplied  (normal 8x11)
                    return psize;
    varPaperSize=getPaperSize();
    var PaperSizeParamString='&PSIZE=' + escape(varPaperSize);
       switch(varPaperSize){
            case "0":    // Landscape - Letter
                           var WidthMax = 910;
                           var RowsPerPageMax = 38;
                           break;
            case "1":    // Landscape - Legal
                           var WidthMax = 1190;
                           var RowsPerPageMax = 38;
                           break;
            case "2":    // Portrait - Letter
                           var WidthMax = 660;
                           var RowsPerPageMax = 54;
                           break;
    function getTotalColumns() {
       var myHTML = dataTable.rows[1].innerHTML;
       var TotalTDs = 0;
       var nextTD = 0;
       for (i=0;i<myHTML.length;i++) {
           nextTD =  myHTML.indexOf("<TD", i);
           if (nextTD != -1) {
              i=nextTD;
              TotalTDs++;
           else break;
       return TotalTDs;
    function GetPageHeadings() {
       var headingHTM = "";
       var leftspancnt = 0;
       var rightspancnt = 0;
       var headingspancnt = 2;
       if (header2 != '#') headingspancnt = headingspancnt + 1;   // adjust for extra headings
       if (header3 != '#') headingspancnt = headingspancnt + 1;  
       if (currPage > 1) {
          headingHTM += '<TR style="page-break-before:always; display:none; visibility:hidden; "><TD Colspan="' + ColumnCnt + '"></td></tr>';
       else {
          headingHTM += '<TABLE  id="THEREPORT" name="MYREPORT" cellSpacing=0 cellPadding=0 width=' + WidthMax + ' border=0>';
       if (ColumnCnt == 1) {
          headingHTM += '<TR><TD vAlign=top align=left nowrap><font Size=3><STRONG>';
          headingHTM += queryTitle;
          headingHTM += '</STRONG></font></TD><TD Rowspan="' + headingspancnt + '" align="right" vAlign="top"><input type="image" border="0" name="SAPLogo" src="/sap/bw/Mime/Customer/Images/images.jpg" alt="SAP Logo"></TD></TR>';
          if (header2 != '#') headingHTM += '<TR><TD vAlign="top" align="left"><FONT Size=1>' + header2 + '</FONT></TD></TR>';
          if (header3 != '#') headingHTM += '<TR><TD vAlign="top" align="left"><FONT Size=1>' + header3 + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left"><FONT Size=1>' + asofDateTime + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left" Colspan="2"><hr size=2 color=black align=left></TD></TR>';
          headingHTM += '<tr>' + dataTable.rows[0].innerHTML + '<TD> </TD></TR>';
       else {
          leftspancnt = Math.floor(ColumnCnt/2);
          rightspancnt = ColumnCnt - leftspancnt;
          headingHTM += '<TR><TD vAlign=top align=left nowrap Colspan="' + leftspancnt + '"><font Size=3><STRONG>';
          headingHTM += queryTitle;
          headingHTM += '</STRONG></font></TD><TD Rowspan="' + headingspancnt + '" Colspan="' + rightspancnt  + '" align="right" vAlign="top"><input type="image" border="0" name="SAPLogo" src="/sap/bw/Mime/Customer/Images/images.jpg" alt="SAP Logo"></TD></TR>';
          if (header2 != '#') headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + leftspancnt + '"><FONT Size=1>' + header2 + '</FONT></TD></TR>';
          if (header3 != '#') headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + leftspancnt + '"><FONT Size=1>' + header3 + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + leftspancnt + '"><FONT Size=1>' + asofDateTime + '</FONT></TD></TR>';
          headingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + ColumnCnt + '"><hr size=2 color=black align=left></TD></TR>';
          headingHTM += '<tr>' + dataTable.rows[0].innerHTML + '</TR>';
       return headingHTM;
    function GetPageFooting() {
       var footingHTM = "";
       var leftspancnt = 0;
       var rightspancnt = 0;
       if (ColumnCnt == 1) {
          footingHTM += '<TR><TD vAlign="top" align="left" Colspan="2"><hr size=2 color=black align=left></TD></TR>';
          footingHTM += '<TR><TD vAlign="top" align="left" nowrap><FONT Size=1>Prepared: ';
          footingHTM += PrintDateTimeStamp;
          footingHTM += '</FONT></TD><TD vAlign="top" align="right"><FONT Size=1>';
          footingHTM = footingHTM + 'Page ' + currPage.toString() + ' of ' + varPageTotal.toString();
          footingHTM += '</FONT></TD></TR>';
       else {
          leftspancnt = Math.floor(ColumnCnt/2);
          rightspancnt = ColumnCnt - leftspancnt;
          footingHTM += '<TR><TD vAlign="top" align="left" Colspan="' + ColumnCnt + '"><hr size=2 color=black align=left></TD></TR>';
          footingHTM += '<TR><TD vAlign="top" align="left" nowrap Colspan="' + leftspancnt + '"><FONT Size=1>Prepared: ';
          footingHTM += PrintDateTimeStamp;
          footingHTM += '</FONT></TD><TD vAlign="top" align="right" Colspan="' + rightspancnt + '"><FONT Size=1>';
          footingHTM = footingHTM + 'Page ' + currPage.toString() + ' of ' + varPageTotal.toString();
          footingHTM += '</FONT></TD></TR>';
       return footingHTM;
    function GetReportFooting() {
       var footingHTM = "";
       footingHTM += '</TABLE>';
       return footingHTM;
    function formatToPrint() {
       var PrintHTM = "";
       PrintHTM += GetPageHeadings();
       if (ColumnCnt != 1) {
          for (var i=1;i<dataTable.rows.length;i++) {
               (currPage > prevPage)?prevPage=currPage:"";  //increment current page count
               if ((pageRowCnt + 1)>RowsPerPageMax){
                   PrintHTM += GetPageFooting();
                   pageRowCnt = 0;
                   currPage++;
               if (prevPage != currPage) {
                   PrintHTM += GetPageHeadings();
               else
                   PrintHTM += '<tr>' + dataTable.rows<i>.innerHTML + '</tr>';
                   pageRowCnt++;
       PrintHTM += GetPageFooting();       
       PrintHTM += GetReportFooting();
       return PrintHTM;
    function DisplayPrintNotice() {
    // Paper Size "0" is Letter with Landscape
    // Paper Size "1" is Legal with Landscape
    // Paper Size "2" is Letter with Portrait
    if (varPaperSize == "0") {var varMessage ="nn From your browser File Menu, select Page Setup and do the following: nn 1) Adjust the Printer Orientation to Landscape n 2) select Print menu, then select the Print button.";}
    if (varPaperSize == "1") {var varMessage ="nn From your browser File Menu, select Page Setup and do the following: nn 1) Adjust the Paper Size to Legal n 2) Adjust the Printer Orientation to Landscape n 3) select Print menu, then select the Print button.";}
    //if (varPaperSize == "2") {var varMessage ="nn From your browser File Menu, select Page Setup and do the following: nn 1) Adjust the Paper Size to Letter n 2) Adjust the Paper Source (if necessary) n 3) Adjust the Orientation to Portrait (default) n 4) Select the Okay button nn Again select the File Menu, select Print, then select the Print button.";}
    alert(varMessage);
    //window.print()
    /*   SAP BW Reporting Stylesheet Revisions        */        
    function writeStyleRevisions() {
    function writeDynamicFontRevisions(dynafont) {
    //Writes the Dynamic Stylesheet
    -->
    </script>
    </HEAD>
    <BODY>
    <TABLE  id="tp1" cellSpacing=0 cellPadding=0 width=660 border=0 >
        <TR>
        <TD vAlign=top align=left nowrap>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="MYQUERY"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="GENERATE_LINKS" value=""/>
             <param name="WIDTH" value="660"/>
             <param name="BORDER_STYLE" value="NO_BORDER"/>
             <param name="SUPPRESS_REPETITION_TEXTS" value=""/>
             <param name="BLOCK_SIZE" value="3500"/>
             <param name="SHOW_PAGING_AREA_TOP" value="X"/>
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1"/>
             ITEM:            MYQUERY
    </object>
        </TD>
      </TR>
    </TABLE>
    <SCRIPT type="text/javascript">
    <!--
            var tbls = document.body.getElementsByTagName("TABLE");
            for (var i=0;i<tbls.length;i++) {
                  if (tbls<i>.name == "MYQUERY"){
                        var dataTable = tbls<i>;
                        break;
            document.title = queryTitle;
            rptWidth = dataTable.clientWidth;
            rptHeight = dataTable.clientHeight;
            originalRptWidth = rptWidth;
            originalRptHeight = rptHeight;
            originalRowHeight = Math.floor(rptHeight/(dataTable.rows.length+1));
            rptPageHeightMax = 580;                                                                                //660 less basic header and footer of 80
            if (header2 != '#') rptPageHeightMax = rptPageHeightMax - 20;   // adjust for extra headings
            if (header3 != '#') rptPageHeightMax = rptPageHeightMax - 20;  
            if (dataTable.rows.length == 1) {
                ColumnCnt = 1;                //No Applicable Data found message
            else {
                ColumnCnt = getTotalColumns();
            startingFont = 65;
            varFontSize = startingFont;
            if (rptWidth > WidthMax) {
                while ((rptWidth > WidthMax) && (varFontSize > 15))
                    writeDynamicFontRevisions(varFontSize);
                    rptWidth = dataTable.clientWidth;
                    rptHeight = dataTable.clientHeight;
                    varFontSize = varFontSize - 5;
                // calculate max rows per page
                rowHeight = Math.floor(rptHeight/(dataTable.rows.length+1)) + 1;        // add 1 for 2 row heading, add 1 for padding
                RowsPerPageMax = Math.floor(rptPageHeightMax/rowHeight) - 2;   // adjust for column headings
            if (dataTable.rows.length == 1) {
                varPageTotal = 1;                //No Applicable Data found message
            else {
                totalRows = dataTable.rows.length-1;                                       // total rows less headings
                varPageTotal = Math.floor(totalRows/RowsPerPageMax);       // compute total pages
                if (totalRows != (varPageTotal * RowsPerPageMax)) {
                    varPageTotal = varPageTotal + 1;                                        // if not a complete last page, add 1 for partial page
            currPage = 1;
            document.write(formatToPrint());
            document.all.tp1.style.display = "none";
            document.all.tp1.style.visibility = "hidden";
    //        DisplayPrintNotice();
    -->
    </SCRIPT>
    <STYLE>
    input.ie55   { display: none }
    </STYLE>
    <!-- special style sheet for printing -->
    <STYLE media=print>
    .noprint     { display: none }
    </STYLE>
    <script defer>
    function window.onload() {
        if (!factory.object) {
            return
        else {
    //     factory.printing.header = "SAP"
    //     factory.printing.footer = "SAP"
            if ( varPaperSize == "2" ) { factory.printing.portrait = true; }
            else { factory.printing.portrait = false; }
            factory.printing.Print(true);
            // enable control buttons
      /*  var templateSupported = factory.printing.IsTemplateSupported();
           var controls = idControls.all.tags("input");
           for ( i = 0; i < controls.length; i++ ) {
               controls<i>.disabled = false;
               if ( templateSupported && controls<i>.className == "ie55" )
                  controls<i>.style.display = "inline";
    </script>
    <P>
    <div id=idControls class="noprint" style="VISIBILITY: hidden">
    <input disabled type="button" value="Print this page"
    onclick="factory.printing.Print(true)">
    <input disabled type="button" value="Page Setup..."
    onclick="factory.printing.PageSetup()">
    <input class=ie55 disabled type="button" value="Print Preview..."
    onclick="factory.printing.Preview()">
    <input class=ie55 disabled type="button" value="Landscape"
    onclick="factory.printing.portrait=false">
    <input class=ie55 disabled type="button" value="Portrait"
    onclick="factory.printing.portrait=true">
    </div>
    </BODY>
    </HTML>

  • Save SSRS Report as .PDF in Client Machine

    Hi,
    I am working on a SharePoint 2010 Visual WebPart, the saves a SSRS report as pdf on a button click.  The code is mentioned below:
    HttpWebRequest Req = (HttpWebRequest)WebRequest.Create(URL);
    Req.UseDefaultCredentials = true;
    Req.PreAuthenticate = true;
    Req.Credentials = CredentialCache.DefaultNetworkCredentials;
    HttpWebResponse objResponse = (HttpWebResponse)Req.GetResponse();
    Req.Method = "GET";
    //Specify the path for saving.
    string path = @"C:\test\" + quoteID + @".pdf";
    FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write);
    Stream stream = objResponse.GetResponseStream();
    byte[] buf = new byte[1024];
    int len = stream.Read(buf, 0, 1024);
    while (len > 0)
    fs.Write(buf, 0, len);
    len = stream.Read(buf, 0, 1024);
    fs.Close();
    stream.Close();
    The code works great, however, when the user clicks the button the file is getting saved directly in the main server when the WebPart is deployed.  So, now I want the user to be able to select the location in there system to save the file.  How
    to enable the "Open save file dialog" and let the user select the location. can someone help me with this ? 
    thanks.
    Regards, Vikram

    You can use below snippet.
     string strURL=path;
            WebClient req=new WebClient();
            HttpResponse response = HttpContext.Current.Response;
            response.Clear();
            response.ClearContent();
            response.ClearHeaders();
            response.Buffer= true;
            response.AddHeader("Content-Disposition","attachment;filename=\"" + Server.MapPath(strURL) + "\"");
            byte[] data=req.DownloadData(Server.MapPath(strURL));
            response.BinaryWrite(data);
            response.End();
    Bala

Maybe you are looking for

  • Need Help in creating a subquery using JOIN operation

    Hi, I am new to SQL and trying to write a query. Please help me in this. The Database Schema looks like this: The database scheme consists of four tables: Product(maker, model, type) PC(code, model, speed, ram, hd, cd, price) Laptop(code, model, spee

  • Error in BAPI_MATERIAL_SAVEDATA

    Hello all. Im trying to update a material using BAPI_MATERIAL_SAVEDATA, I have to update the field PLANTDATA-VARIANCE_KEY among others. But the BAPI returns with the following error: <i>Key fields for user data PLANTDATA and checkbox structure PLANTD

  • Extractor upgrade BW 3.5 - CRM 5.0

    Hello Last year we upgraded from CRM 3.0 to CRM 5.0 but due to time constraints we didn't upgrade the CRM BCT extractors. Today we´re having general problems with extraction from the CRM systems and we know for a fact that some of our extractors runs

  • Using Live 24Bit With Vis

    Hello there,I have SoundBlaster Li've! 24Bit with Inspire T7900 7. Speaker System. I upgraded to Windows Vista 32Bit, used the latest Creative Driver (Feb 2007)?and now I have sound and speakers test is working....but not in music playback and stuff.

  • Why can't I access my entire wish list I try to go to page 2 and it crashes

    Why can't I access my entire wish list I try to go to page 2 and it crashes. Repeatedly since June 17th and no response from Itunes