Refresh Report from Repository

In the CmcApp it is possible to refresh a report by right-clicking and choosing "refresh options".
You are then presented a window with several options "title","description" and so on. The last option is called "Use Object Repository when refreshing"
This last option is the only thing I need to refresh. I would like to refresh the report with the java SDK.
I have found the class com.crystaldecisions.sdk.plugin.desktop.common.IReportRefreshOptions which looks like it should do the job. However it is not prossible to set the option "Use Object Repository" .All other options from the CMC-Dialog are available ( CeRefreshOption.TITLE, CeRefreshOption.DESCRIPTION,...)
How can I refresh the the report with the Object Repository via the Java SDK???

Hi!
I would say try using the method: setRepositoryEnabled(true) of the IReportProcessingInfo interface and commit back the object afterwards. This sound like it should do the trick, although I didn't test it...
Regards,
Harald

Similar Messages

  • Error refreshing report from parameter panel

    I'm using Crystal Reports 2008 SP3 with .Net 4.0 in visual studio 2010
    I'm using the following components
    CrystalDecisions.CrystalReports.Engine   12.0.2000.0
    CrystalDecisions.Enterprise.Framework   12.0.1000.0
    CrystalDecisions.Enterprise.InfoStore       12.0.1000.0
    CrystalDecisions.Shared                           12.0.2000.0
    CrystalDecisions.Windows.Forms            12.0.2000.0
    I have embedded the ViewerComponent in a windows form, everything works fine, loading report, exporting, printing, refreshing.
    However, I need to allow the user to refresh the report by using the parameter panel, because once the report has been loaded, some parameters are not allowed to be changed by a user. So I try to accomplish this by using the parameter optional function and show in parameter panel (read only/ editable / Don't show)
    However, when I try to edit a parameter in the parameter panel, I get to see the regular refresh dialog (this isn't a big problem...) however, when I do not enter any values, or just a few parameters, or all parameters, the viewer crashes with the following error:
    Unable to cast object of type 'CrystalDecisions.Shared.ParameterField' to type 'CrystalDecisions.Windows.Forms.ParameterFieldInfo'.
       at CrystalDecisions.Windows.Forms.ParameterFieldsInfos.get_Item(Int32 index)
       at CrystalDecisions.Windows.Forms.InteractiveParameterPanel.ShowParameters()
       at CrystalDecisions.Windows.Forms.CrystalReportViewer._ipPanel_ApplyButtonClicked(Object sender, EventArgs e)
       at CrystalDecisions.Windows.Forms.InteractiveParameterPanel.HandleApply()
       at CrystalDecisions.Windows.Forms.InteractiveParameterPanel.toolBar_ButtonClick(Object sender, ToolBarButtonClickEventArgs e)
       at System.Windows.Forms.ToolBar.OnButtonClick(ToolBarButtonClickEventArgs e)
       at System.Windows.Forms.ToolBar.WmReflectCommand(Message& m)
       at System.Windows.Forms.ToolBar.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
       at System.Windows.Forms.Control.WmCommand(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.UserControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
       at System.Windows.Forms.Control.DefWndProc(Message& m)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ToolBar.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
    Does anyone knows what goes wrong or what I'm doing wrong?
    Thanks in advance

    Thanks for your response.
    However, your not really right about that. I have integrated the viewer component into a WindowsFormHost, so it will just operate like a normal Windows Forms applcation.
    However, I'm wondering what is causing the Exception. It is trying to cast a ParameterField, can I override this?

  • Cannot refresh a stored procedure within a Crystal Report from Xcelsius

    Please help...Xcelsius 2008 & Live Office problem...
    What I am trying to do is to refresh a stored procedure that is within a Crystal report from within my Xcelsius dashboard in Preview mode. The data returned appears on the Xcelsius dashboard. It works fine in Design mode, just not in Preview or when published as a swf.
    1. I set up a Crystal Report using a Stored Procedure as the data provider.
    2. The Stored Procedure has a parameter built into it.
    3. When the report is refreshed within Crystal, the prompt dialog box is displayed; I fill in the desired value, and run. Everything comes back fine.
    4. Crystal Report is exported to the repository.
    5. In Excel, I inserted the Crystal Report using Live Office. It shows up as a Live Office object just fine.
    6. I bound an Excel cell to the prompt; when you change the value in the bound cell, the Live Office object refreshes and displays the correct results.
    7. In Xcelsius, I imported the Excel spreadsheet.
    8. I set up a Text component that is bound to the cell containing the parameter value. Also set up a Grid to display the results, and a Connection Refresh button to call the refresh. Added a Live Office Data Connection pointing to the Web Service URL for the report.
    Note: When in Designer mode, if the value of the bound cell is changed, the results in the grid change accordingly.
    9. When in Preview mode (or generated swf), if the Refresh button is pressed, a "User Identification" dialog box appears asking me to log on. The values it asks for are: System, User Name, Password, and Authentication. I enter the same credentials as are within the Live Office settings in Excel, (which are working correctly), but receive an error "soapenv:Server.generalException: Database logon failed.".
    Note - all the id's are synced up - Business Objects, Database, etc.
    I've tried all kinds of combinations, but nothing gets me past this error. If I use any other server than the one listed under System in Live Office, the error message is "soapenv:Server.generalException: Server XXXXX not found or server may be down".
    I've noticed that in Excel directly, when I open the spreadsheet and refresh the Live Office object, I am prompted to log on to the database where the stored procedure is being executed. This dialog box does not appear once the Excel sheet has been imported into Xcelsius. One of the combinations I tried in the "User Identification" dialog box was the name of the database server, that didn't work either.
    I also tried creating the Live Office object directly within the Excel spreadsheet in Xcelsius, but then I was unable to bind the prompt value. Could never get the Live Office/Properties menu to appear.
    Ideas? Thoughts?
    Thanks in advance!
    Stephanie

    This post looks like a duplicate of: Live Office: Database logon failed error

  • How to refresh report data from bex query (BW) with parameters

    Hello,
    i hope someone can help me with my problem. I developed an desktop application, which loads (actual state) a report from the local file system. After setting the parameters, the report should be saved as a pdf file. Loading the report into the ReportDocument object and exporting the report to a pdf works fine. Setting parameters (without) a data source too. But now i can't refresh the data in the reports given by a parameter (e.g. time).
    I know there are two methods to do this. Push and pull. I want to use the pull method, cause my program should exports different reports and i think it should be easier to handle this with this method.
    On my development environment is installed:
    Crystal Reports SP 4
    MS Visual Studio 2010 (coding with C# .NET)
    .NET Framework 4
    SAP Integration Kit
    Crystal Reports for Visual Studio 2010 SP1 - SDK libraries
    Crystal Reports for Visual Studio 2010 SP1 - Runtime 32 bit
    SAP GUI 7.20 (Compilation 3)
    The bex query is enabled for external use from ole db for olap. Do i have forget something else?
    Here is a part of my code:
            public ReportDocument doPullMethod(ReportDocument crReportDocument)
                TableLogOnInfo crTableLogOnInfo = crReportDocument.Database.Tables[0].LogOnInfo;
                ConnectionInfo crConnectionInfo = crTableLogOnInfo.ConnectionInfo;
                crConnectionInfo.Password = "*******";
                crReportDocument.SetDatabaseLogon(crConnectionInfo.UserID, crConnectionInfo.Password, crConnectionInfo.ServerName, crConnectionInfo.DatabaseName);
                MessageBox.Show(crConnectionInfo.UserID + " _ " + crConnectionInfo.Password + " _ " + crConnectionInfo.ServerName + " _ " + crConnectionInfo.DatabaseName);
                for (int i = 0; i < crReportDocument.Database.Tables.Count; i++)
                //    crReportDocument.Database.Tables<i>.ApplyLogOnInfo(crTableLogOnInfo);
                    MessageBox.Show("TestConnectivity: " + crReportDocument.Database.Tables<i>.TestConnectivity());
                return crReportDocument;
    Cause i'm using only one bex query, i know that the SetDatabaseLogon()-method should bring me the same result as the ApplyLogOnInfo()-method SAP Crystal Reports .NET API Guide
    Exists an order which i have to follow? First setting parameter and then set the login informations or backwards? Cause i also get the "Failed to load database information" exception, when i set a parameter and TestConnectivity() returns false.
    Do i have to activate the data refresh manually or will be the data refreshed automatically on export?
    I searched in this forum (.NET - SAP Crystal Reports) and found only this thread which according to my problem:
    [Re: Crystal report connects to BW RFC by .NET;
    The question is assumed answered.

    Hi Robin,
    There is a SAP Integration Kit you need to allow CR to connect to SAP data sources. There isn't one for CR for VS 2010 and I don't believe there are the various extra options available in the SDK, no SDK access to the DB driver.
    Possibly, Check the other post, download and run the app Ludek suggested, it will get the connection info for your report using RAS and then plug the output code into your code and see if that works. It should show the crdb_olap dll is the database driver, assuming that is the connection method you used when designing the report.
    Pay attention to the database dll in the output from that app and verify it is on your PC in: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
    If that doesn't work then.....
    The problem is, CR for VS 2010 ( version 13 ) is the runtime for BOE 4.0  ( version 14 ) which includes the Integration kit drivers on install. There is no standalone install of the database drivers. They are installed with CR 2011, which doesn't have a SDK included, CR for VS 2010 is also the Developer version for CR 2011.
    Because of the "custom" connection requirements there is no SDK or access to the BW datasource extra options....
    Also note that CR 2008 is not supported in VS 2010, it should work though as long as you stick to 2.0 -> 3.5 framework, no 4.0 Framework support in CR 2008 or BOE 4.0
    You may want to try the SAP Integration Kit forum to see if anyone has been able to make this work or contact your account manager to verify if there are any plans to do what you are doing....
    Don

  • How to use the repository; uploading reports from DEV to PROD...

    Hello...
    I'm fairly new to CR-XIr2 (SP3) but have worked with Crystal Reports since v6.0.  I'm trying to figure out how to create a dynamic parameter list that someone can select an item from, which will get sent as an input parameter to the SQL Server 2005 stored proc that populates the report.  I'm also trying to figure out if there's an easy way to copy reports from a DEV environment into PROD.  We have BOE.
    Basically, I would like to find out resources online or in books on how to use the BOE repository for dynamic and/or cascading parameters (i.e. pulling a list of text values & their associated IDs from a lookup table that won't be used in the report), images (i.e. corporate logo), etc..  What complicates things for us is that IT is now requiring us to use a DEV environmentit was really easy when we had unlimited access in PROD!  We also need to put together a process where reports & other repository objects that are copied from DEV to PROD access the correct db, etc.  (Crystal Report in DEV accesses DEV db/repository/etc.when copied to PROD it accesses PROD db/repository/etc.)
    Anyway, I'm just looking for info on where to begin--whether it be a book, a BO/SAP knowledge base article, in-class training from a specific company, etc.  Thanks!

    Hey Markian,
    Can you let me know the process you have followed to migrate from Dev to Prod.
    We can migrate all the reports and objects and database fields through migrate wizard where you can import all the objects, reports and database fields and users to production enterprise.
    Just follow the above scenario and let us know if you are facing any error.
    Try  publish the reports using import wizard and run it in the crystal designer.
    Regards,
    Naveen.

  • How to fetch only WebI reports from the repository

    How to fetch only WebI reports from the repository, where in we have Deski reports also in the repository.. any macro??

    here is the query to fetch only webi reports:
    Open Administration Launchpad (.Net / Java) from:
    Start >> All Programs >> BusinessObjects XI Release 2 >> BusinessObjects Enterprise >
    Click on the 'Query Builder' under 'Administration Tools' on the left pane.
    Logon to Query Builder using Enterprise Administrator credentials.
    Run the following query for Web Intelligence Reports:
    SELECT SI_ID, SI_NAME, SI_OWNER FROM CI_INFOOBJECTS WHERE SI_KIND='WEBI'
    Thanks,
    Srikanth.

  • Open report from Enterprise Repository

    Post Author: bbazian
    CA Forum: General
    When I try to open a report from my Enterprise repository that is on the CR server I can only see reports from A - E and the file name field is greyed out.  How can I see all the reports in the repository?  I do not have this issue if I try to open from a network share.
    Thanks

    The help document you reference is for the Report Application Server SDK; this is no longer available as a standalone SDK (unless you have an OEM Partner Agreement.)  It is now only available as part of the managed enterprise products, such as Crystal Reports Server, BusinessObjects Edge or BusinessObjects Enterprise.
    Unless I am missing part of the story, it seems you don't have the products you need to do what you want to do.  Crystal Reports 2008 does not contain any runtime Java SDK's.
    If you want to deploy a Crystal Reports java application that is free, check out [Crystal Reports for Eclipse|SAP BI SDK].  If you want something to deploy on IIS, check out the [Crystal Reports for .NET|SAP BI SDK].

  • BW - EP Connection to Publish Reports From BW

    We have implemented Enterprise Portal 6, and are running BW 3.5
    I have been trying set up the connection between the 2 systems, so that I can publish reports from BW to EP
    SSO between EP and BW is working - I can create a BW iview, or run a BW transaction without having to sign on again to the BW server.
    I have checked the RFC connection from BW to EP using transaction SM59, and it all seems to be working fine.
    When I am in the Web Application Designer in BW, there appears the option to Publish to Enterprise Portal 6.0. I can see the destination that I created to point to EP, but I can't see any roles/folders etc within the portal.
    I have been through all of the documents that I have found in SAPHelp on configuring the connection, but have still had no luck.
    Does anyone have any suggestions? Are there some permissions that I need to set up on either BW or EP before this will work?
    Thanks in advance for any assistance.
    Regards
    Richard

    Thanks very much for your assistance!!
    Deepu:
    Thanks for pointing me to the note - that looks like it could be helpful - I need to talk to our basis adminstrator about a couple of things, and he is away for a couple of weeks, so this problem will probably be on hold for a bit now.
    Ashwin:
    Thanks - I've checked the SSO to BW, and can see all of the BW reports in the BW repository in EP. My personal folders are all set up, but are empty.
    I really appreciate your help on this guys. I'll try the changes in the OSS note (but won't be able to do this for a while), and will let you know if it is successful.
    Regards
    Richard
    PS. I'm really sorry, but I don't seem to be able to allocate points for your answers - there are no radio buttons displaying on the screen for some reason - I'll see if I can contact SDN to get this sorted out.

  • How to generate a report from data entered by users in XML forms

    hi,
      i have a requirement to generate report from xml forms which are created using XML forms Builder and stored in Km folders. management want to see in a single report all the activities of all the users in the xml form in such a way that one row in the report presents data blongs to each user.  i have no idea regarding this.
    can any one help me in detail.
    Thanking you in adavance
    sajeer

    Hi Sajeer,
    You have given quite few information what data should be collected / showed in detail. Anyhow, it sounds as if you want to provide data which isn't provided within the standard portal so far (see http://help.sap.com/saphelp_nw2004s/helpdata/en/07/dad131443b314988eeece94506f861/frameset.htm for a list of existing reports).
    For your needs you probably have to develop a repository service which reacts on content / property changes and then you would have to log these changes somewhere, for example in a DB. On the other side, you then could implement a report iView which accesses this data and displays it as whished.
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • Error Launching Web Analysis Report from the Hyperion Workspace

    Hi Everyone
    When launching the report as a HTML from the Workspace, the output flashes briefly on screen
    The view in the content pane disappears to leave a blank screen.
    When I Select View | Refresh. The following result is returned "Web Analysis Information" -1
    I have set the report in start up preferences. And Web Analysis preferences set to open as HTML
    After logging on again the following error is shown " An attempt to open "Actual vs Budget" Failed
    Show Details displays: this.getFocusRoot() is nullor not an object
    The reports all display correctly when launched from the Web Analysis studio
    Any ideas will be greatly appreciated
    Thanks
    G
    Web Analysis Version
    Server Information
    Version: 11.1.1.0.0.724
    Class Version: Java HotSpot(TM) Server VM
    VM Version: Java HotSpot(TM) Server VM
    VM Vendor: Sun Microsystems Inc.
    Java Vendor: Sun Microsystems Inc.
    Java Version: 1.5.0_11
    OS Name: Windows 2003
    OS Version: 5.2
    Total Memory: 66519040
    Free Memory: 22975320
    Locale: English (United States)
    Client Information
    Version: 11.1.1.0.0.724
    Class Version: Java HotSpot(TM) Client VM
    VM Version: Java HotSpot(TM) Client VM
    VM Vendor: Sun Microsystems Inc.
    Java Vendor: Sun Microsystems Inc.
    Java Version: 1.5.0_12
    OS Name: Windows 2003
    OS Version: 5.2
    Total Memory: 34766848
    Free Memory: 10688504
    Locale: English (United States)

    Hi Ian,
    Thanks for the advise but I have looked into your possible solution and referred to the Web Analysis user guide. I have a number of reports and when selecting the Design for HTML option - a number of objects are valid and should be displayed in the workspace.
    After creating reports from scratch - with valid objects - the problem still persists.
    Unfortunately, I don't think this provides a solution to the problem.
    Cheers
    G

  • Cannot load report from server in Crystal Reports 2013 Viewer

    Hello,
    I am having trouble opening a report that is hosted on a Crystal Reports Server (2013) from the Crystal Viewer.  I've created and uploaded the reports using the report designer (version 2013).  The reports have been uploaded using the "Save As -> Enterprise" to save to my enterprise server.  This part works fine.  I then navigated to the Crystal Reports Viewer to open my report (that I just uploaded w/ the designer) from the server.  Depending on the report, one of two things happens:
    1.) I get a loading bar at the bottom right of the screen that says "Operation in progress . . ." followed by an error message:
    Unable to Refresh Report
    A problem occurred while refreshing on the server. The report may not be configured properly for refresh.
    Please contact your server administrator. (me)
    2.) I get a loading bar at the bottom right of the screen that says "Refreshing <file name of the report> (<server name>)" followed by... nothing.  The loading bar goes away and nothing happens.  It goes back to the screen that shows when the application first loads (blank canvas).
    I've taken some basic troubleshooting steps to try and rule out any potential issues that came to mind, but I've not been successful.
    Any help would be appreciated, thanks!

    Hi
    Check the below thread
    Crystal Reports 2013 data didn't refresh using OLE DB Provider for SQL Server
    With Regards
    Balaji Sampath

  • Issue with SSRS Loading Report from Definition From Assembly

    I am using SharePoint 2010. I created web-part where there is report viewer control. On the page load of the control. I am writing below codes to load report from definition. Web part is not giving any error but also not lading report. I tried to make physical
    report file from my stream and I found that report is correct.
    But I don't know what is missing.
    protected void Page_Load(object sender, EventArgs e)
    if (!IsPostBack)
    Assembly assembly = Assembly.Load("Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f51c855eec632536");
    Stream stream = assembly.GetManifestResourceStream("Reports.Reports.rdlc");
    MemoryStream rdl = new MemoryStream();
    CopyTo(stream, rdl);
    rptInspectorPlan.Reset();
    rptInspectorPlan.LocalReport.LoadReportDefinition(rdl);
    rptInspectorPlan.LocalReport.DataSources.Clear();
    rptInspectorPlan.LocalReport.DataSources.Add(new ReportDataSource("MyData", finalData(getInspectionPlan())));
    rptInspectorPlan.LocalReport.Refresh();
    protected DataTable getInspectionPlan()
    DataTable dt = new DataTable();
    DataTable dtCurrentUser = getCurrentUser();
    using (SPSite site = new SPSite(getMarketSurveillanceURL()))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists.TryGetList("InspectionPlan");
    SPQuery oQuery = new SPQuery();
    string query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + dtCurrentUser.Rows[0]["ID"].ToString() + "</Value></Eq></Where>";//getCurrentUserID()
    oQuery.Query = query;
    dt = list.GetItems(oQuery).GetDataTable();
    return dt;
    protected string getMarketSurveillanceURL()
    string URL = ConfigurationManager.AppSettings["MarketSurveillanceURL"].ToString();
    return URL;
    protected string getMainSiteURL()
    string URL = ConfigurationManager.AppSettings["MainSiteURL"].ToString();
    return URL;
    protected DataTable getCurrentUser()
    SPUser user = SPContext.Current.Web.CurrentUser;
    DataTable currentUser = new DataTable();
    using (SPSite site = new SPSite(getMarketSurveillanceURL()))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists.TryGetList("Inspector");
    SPQuery oQuery = new SPQuery();
    string query = "<Query><Where><Eq><FieldRef Name='LoginID'/><Value Type='Text'>" + user.LoginName + "</Value></Eq></Where></Query>";
    oQuery.ViewFields = "<FieldRef Name='ID'/><FieldRef Name='Title'/>";
    oQuery.Query = query;
    currentUser = list.GetItems(oQuery).GetDataTable();
    return currentUser;
    protected DataTable finalData(DataTable inspectionPlan)
    DataTable dt = inspectionPlan;
    DataTable dtCurrentUser = getCurrentUser();
    dt.Columns.Add("InspectorName");
    dt.Columns.Add("ProductName");
    dt.Columns.Add("CategoryName");
    dt.Columns.Add("InspectionTypeName");
    foreach (DataRow dr in dt.Rows)
    if (dr["Title"].ToString() == dtCurrentUser.Rows[0]["ID"].ToString()) dr["InspectorName"] = dtCurrentUser.Rows[0]["Title"].ToString();
    dr["ProductName"] = getProductName(dr["ProductID"].ToString());
    dr["CategoryName"] = getCategoryName(dr["ProductID"].ToString());
    switch (dr["InspectionType"].ToString())
    case "0":
    dr["InspectionTypeName"] = "Periodic";
    break;
    case "1":
    dr["InspectionTypeName"] = "ComplainFollowup";
    break;
    dt.AcceptChanges();
    return dt;
    protected string getProductName(string id)
    string productName = "";
    DataTable dt = new DataTable();
    using (SPSite site = new SPSite(getMarketSurveillanceURL()))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists.TryGetList("Product");
    SPQuery oQuery = new SPQuery();
    string query = "<Where><Eq><FieldRef Name='ID'/><Value Type='Text'>" + id + "</Value></Eq></Where>";//getCurrentUserID()
    oQuery.ViewFields = "<FieldRef Name='ProductEN'/><FieldRef Name='ProductAr'/>";
    oQuery.Query = query;
    dt = list.GetItems(oQuery).GetDataTable();
    foreach (DataRow dr in dt.Rows)
    productName = dr["ProductEN"].ToString();
    return productName;
    protected string getCategoryName(string productID)
    string categoryName = "", CategoryID = "";
    DataTable dtCategory = new DataTable();
    DataTable dtProduct = new DataTable();
    using (SPSite site = new SPSite(getMarketSurveillanceURL()))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists.TryGetList("Product");
    SPQuery oQuery = new SPQuery();
    string query = "<Where><Eq><FieldRef Name='ID'/><Value Type='Counter'>" + productID + "</Value></Eq></Where>";
    oQuery.ViewFields = "<FieldRef Name='CategoryID'/>";
    oQuery.Query = query;
    dtProduct = list.GetItems(oQuery).GetDataTable();
    foreach (DataRow dr in dtProduct.Rows)
    CategoryID = dr["CategoryID"].ToString();
    using (SPSite site = new SPSite(getMainSiteURL()))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists.TryGetList("SAS_Categories");
    SPQuery oQuery = new SPQuery();
    string query = "<Where><Eq><FieldRef Name='ID'/><Value Type='Text'>" + CategoryID + "</Value></Eq></Where>";
    oQuery.ViewFields = "<FieldRef Name='Category_Title_EN'/><FieldRef Name='Category_Title_Ar'/>";
    oQuery.Query = query;
    dtCategory = list.GetItems(oQuery).GetDataTable();
    foreach (DataRow dr in dtCategory.Rows)
    categoryName = dr["Category_Title_EN"].ToString();
    return categoryName;
    public static void CopyTo(Stream input, MemoryStream output)
    byte[] buffer = new byte[16 * 1024]; // Fairly arbitrary size
    int bytesRead;
    while ((bytesRead = input.Read(buffer, 0, buffer.Length)) > 0)
    output.Write(buffer, 0, bytesRead);

    Have you found a solution to this issue? I am searching for the same.

  • How to run a report from WCF

    hi,
    I am trying to run a report from a WCF service application, and then render it in PDF Format to a caller WPF application. But I cant get it! In more detail, this is what my app should do
    1. from WPF, call a web service procedure, pass a report name, report path and parameters. Report is store at the same server where Web Service is installed
    2. WCF procedure loads report, set parameters, retrieve data from DB and renders it as an array of bytes
    3. WPF gets the array, save it into a PDF file, then open it.
    this is the code of the WCF procedure.
        Function DownloadCRReport(codEnte As String, connString As String, reportDir As String, reportName As String, Parameters As Dictionary(Of String, Object)) As Byte() Implements IGesiService.DownloadCRReport
            Try
                Dim bytes As Byte()
                Dim infile As BinaryReader
                Dim fs As FileStream
                Dim rep As New ReportDocument
                Dim RepAddress As String
                logPath = reportDir & "log\"
                sb = New StringBuilder()
                timestamp = Now.Year.ToString & Now.Month.ToString & Now.Day.ToString & Now.Hour.ToString & Now.Minute.ToString & Now.Second.ToString
                logFileName = timestamp & "_" & reportName & ".txt"
                logFile = New StreamWriter(logPath & logFileName, FileMode.CreateNew)
                logFile.WriteLine("----
    Date and time: " &amp; Now.ToString &amp; " -
                If My.Computer.FileSystem.FileExists(reportDir & reportName & ".rpt") = False Then
                    Throw New Exception("file RPT non found in: " & reportDir)
                End If
                RepAddress = reportDir & reportName & ".rpt"
                logFile.WriteLine("rep address: " & RepAddress)
                rep.Load(RepAddress, OpenReportMethod.OpenReportByDefault)
                logFile.WriteLine("load rep")
                If rep.DataSourceConnections.Count > 0 Then
                    rep.DataSourceConnections.Item(0).SetLogon("usr", "pwd")
                    logFile.WriteLine("data source connection")
                End If
                For Each i In Parameters
                    rep.SetParameterValue(i.Key, i.Value)
                    logFile.WriteLine("param: " & i.Key & " - " & i.Value)
                Next
                Try
                    fs = rep.ExportToStream(ExportFormatType.PortableDocFormat)
                    logFile.WriteLine("export to stream")
                    infile = New BinaryReader(fs)
                    logFile.WriteLine("created binaryreader")
                    bytes = infile.ReadBytes(CInt(fs.Length))
                    logFile.WriteLine("render pdf. fine")
                    logFile.Close()
                    Return bytes
                Catch ex As Exception
                    logFile.WriteLine("vbCrLf & ex.Message & vbCrLf & ex.InnerException.Message)
                    logFile.Close()
                    Return Nothing
                End Try
            Catch ex As Exception
                logFile.WriteLine("vbCrLf & ex.Message & "-" & vbCrLf & ex.InnerException.Message)
                logFile.Close()
                Return Nothing
            End Try
        End Function
    I detected that error occurs on rep.ExportToStream(ExportFormatType.PortableDocFormat). I should point out that the same procedure works under WPF application. In the WCF server I installed CR Runtime engine for .NET framework (13.0.9.1312) and CR version for Microsoft Visual Studio (same version). Moreover, all DB operations are stored into the report, so I should not pass any dataset, just parameters.
    Anyway, just to begin, I tried to call a simple report with just two string parameters and no queries, but I alwais get error ("An exception of type 'System.NullReferenceException' occurred in MyApp... Object reference not set to an instance of an object)!
    How can I make it work? thanks for help

    hi Ludek,
    Im trying to change DB connection info at runtime for all of the report tables. this is the code I used in my Web Service
              Function DownloadCRReport(...)
    If rep.DataSourceConnections.Count > 0 Then
       Dim conn As New ConnectionInfo
       Dim tabLogon As TableLogOnInfo
       conn.ServerName = "10.10.15.90" 'IP address of DB server
       conn.DatabaseName = "MyDB"   'Database name as set in TNSNAMES.ORA
       conn.UserID = "newuser"
       conn.Password = "newpwd"
       For Each t As Table In rep.Database.Tables
          tabLogon = t.LogOnInfo
          tabLogon.ConnectionInfo = conn
          t.ApplyLogOnInfo(tabLogon)
          logFile.WriteLine("changed logon tab. " & t.Name)
       Next
       rep.Refresh()
       logFile.WriteLine("changed data source connection")
    End If
    'set parameters
    If Not IsNothing(Parameters) Then
       For Each i In Parameters
          rep.SetParameterValue(i.Key, i.Value)
          logFile.WriteLine("set parameter" & i.Key & " - " & i.Value)
       Next
    End If
    fs = rep.ExportToStream(ExportFormatType.PortableDocFormat)
              End Function
    that comes to an error on rep.ExportToStream: "Unable to access database".
    Running web service in debug mode, I noticed that, after t.ApplyLogonInfo(tabLogon), the new ConnectionInfo has "password" property empty. Maybe this could cause the error, or is there some mistake in the new connectioninfo?

  • Not able to edit the report from BO 5.1

    Hi,
    User has Business Objects 5.1 version on his machine  and he is able to login to Business Objects 5.1.2 and can also open the BO reports from the required path
    When he edit the report, the BO is gettng hung and following errors occured one by one when he clicks ok button
    error1: "you must close this universe(name of universe) before importing it"
    when he clicks OK button on this error, second error is received
    error2: "Some obsolete objects have been removed from the query. (QP0027)"
    When he clicks OK button on this error, third error is received
    error3:"A connection required to refresh this document is unavailable(DA0004)"
    I am not understanding why these three errors are receiving one by one.Please tell me how to resolve above errors and edit the report
    kind Regards,
    Srinivas

    Hi Denis,
    Normally,what we do is once we provide access to webi users group for each user from BO supervisor module, user(s) will able to refresh/edit the existing report from Full client BO.His colleagues have had no problem editing all his reports from their machines but he is not able to edit any report from his machine and BO is getting freeze.
    He also reinstalled BO and cleaned out everything on his Computer and re-built it but the issue is not yet resolved
    Can you please tell me how to resolve this issue
    Kind Regards,
    Srinivas

  • WIS 10901 error while refreshing report in rich client

    I'm facing a strange issue while refreshing a report from Rich client. Here are details
    Environment: BO XI 3.1 SP3, Oracle application DB. Weu2019ve 2 BO servers (S1 and S2) on cluster and load balancer (common URL) in front.
    While login to S1 with 6400 port, I can refresh report in rich client.
    While login to S2 on 6400 port or using common url, during refresh gives below error u2013
    u201CA database error occurred. Database error text is: (CS) u201CDBDriver failed to load: C:\Program Files\.....\dbd_oci.dllu201D (The specified procedure canu2019t be found) (WIS 10901)u201D
    Iu2019ve installed oracle8i client on my system. Any idea what causing this issue?

    Yes. Oracle 10g client installed on both application server. I've teste the universe connection from server, it's working fine.
    Any idea what could be probable causes of "DBDriver failed to load: C:\Program Files\.....\dbd_oci.dllu201D error?
    One observation, the path of dbd_oci.dll is the BO installation directory of my local machine (on server BO is not installed on C drive). Why it's referring dbd_oci.dll from local client even in 3 tier mode?

Maybe you are looking for

  • How to define Column Header text table control

    Hi All, I have to create a function in which user will pass Field Name, Field Description. I have to show that field description in Table Control Columns as Text for columns. Like if a user pass Material , PLant etc, then first column header text wil

  • Profit center linked to SD

    hai, In sales order there is a option to select profit center. we don't want to select the option. it should come automatically like how the business area linked with sales area. (Assign business area to plant & division) Like the way profit center a

  • Help with iText

    for those of you who know it, and those of you who don't http://www.lowagie.com/iText/ I'm using the graphics2D interface               DefaultFontMapper mapper = new DefaultFontMapper();                 mapper.insertDirectory("c:\\winnt\\fonts");   

  • HT4561 Has anyone had trouble updating from 10.6 install discs to the combo 10.6.8 v1.1 using software update?

    I've been having all manner of issues with my system, seemingly out of the blue. I just had a third party install a new HDD for me, and I used my snow leopard install disc (the one I bought many years ago, right after it launched), and when I tried t

  • CAF - ARIS - BPP

    Hi, I was wondering if anyone could explain to me the differences / interactions between these three: ARIS - Composite Application Framework - Business Process Platform. Do they work together ? Are they different versions of one another? With CAF Cor