How to save Database Configuration setting to a Crystal Report Instance

Hello,
I'm using .net c# to create and run a schedule of a crystal report.
I'm able to connect to BOE and succesffuly create the schedule instance and pass the parameters. but it's failing to run because I'm not providing it with the Database Logon credentials.
I know there is a way to set the database confiuration on the report in CMC, but we don't want to do that so we can have a trail of who ran the report. We want to pass that through code when scheduling an instance. Can someone tell me how to do so.
Thanks!

ceReportObjects = ceInfoStore.Query(sQuery);
//check for returned reports
if(ceReportObjects.Count > 0)
     ceReportObject = ceReportObjects[1];
     ceReport = (Report)ceReportObject;
     //grab the report logons
     dbLogons = ceReport.ReportLogons;
     dbLogon = dbLogons[1];
     //set custom values
     //** NOTE: **
     //The easiest way to determine the proper custom logon values is to
     //successfully set custom logon values through the CMC first, then
     //transpose those values to this application
     dbLogon.UseOriginalDataSource = false;
     dbLogon.CustomDatabaseDLLName = "crdb_ado.dll";
     dbLogon.CustomServerName = "servername";
     dbLogon.CustomDatabaseName = "database";
     dbLogon.CustomUserName = "username";
     dbLogon.CustomPassword = "password";
     dbLogon.TableLocationPrefixes[1].MappedTablePrefix = "DatabaseName.dbo.";
     dbLogon.TableLocationPrefixes[1].UseMappedTablePrefix = true;
     //Create an interface to the scheduling options for the report.
     SchedulingInfo ceSchedulingInfo;
     ceSchedulingInfo = ceReport.SchedulingInfo;
     //run the report right now
     ceSchedulingInfo.RightNow = true;
     //run the report once only
     ceSchedulingInfo.Type = CeScheduleType.ceScheduleTypeOnce;
     //schedule report
     ceInfoStore.Schedule(ceReportObjects);
Taken from a sample contained [here|https://smpdl.sap-ag.de/~sapidb/012002523100005921432008E/bexi_csharp_smpl.zip]

Similar Messages

  • How to pass database login information to a crystal report using c#?

    Hi,
    I need to pass database logon information to a crystal report dynamically using c#.  I am developing a windows application using c# .Net.
    I looked some of the articles however I am not able to figure out the mistake I have did.  Please find below the code I have written so far; It would be great if you could help me out in solving the issue.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.OracleClient;
    using System.Configuration;
    using CrystalDecisions.Shared;
    using CrystalDecisions.CrystalReports.Engine;
    private void Frm_report_Load(object sender, EventArgs e)
                setReportParameters(); // method to pass parameters to the Crystal report
                crystalReportViewer1.ReportSource = new Upper_Lower();  // Upper_Lower is the Crystal report I have used in my project
               TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
               TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
               ConnectionInfo crConnectionInfo = new ConnectionInfo();
               Tables crTables;                            
                    crTables = new Upper_Lower().Database.Tables;
                    crConnectionInfo.ServerName = "oops";
                    crConnectionInfo.DatabaseName = "";
                    crConnectionInfo.UserID = "new";
                    crConnectionInfo.Password = "new123";
                    foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in crTables)
                        crtableLogoninfo = CrTable.LogOnInfo;
                        crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                        CrTable.ApplyLogOnInfo(crtableLogoninfo);
    Thanks & Regards,
    Karthik.

    Hi,
    Try using this code ,
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.Web;
            ReportDocument rd = new ReportDocument();
            rd.Load(Server.MapPath("Report name"));
            rd.SetDatabaseLogon("User Name", "Password", "Server Name", "Database Name");
            CrystalReportViewer1.ReportSource = rd;
    [See Also.|http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/devsuite.htm]
    Hope this helps!!
    Sincerely,
    Nikhil Dharme

  • How to hide Database Logon option when scheduling Crystal Report in BOE?

    Hi All,
    For security reason, we are try to hide the Database Logon option in Crystal Report Schedule page in InfoView.
    There is option in CMC which we can configure the default Database logon option so that users do not have to enter the logon everytime they view or schedule the report.  However, we are looking to hide this option completely.
    Does anyone know if there is a security setting which can hide the option from specific users?
    Thanks,
    Bobby

    Hi Bobby,
    As Jorge informed that there is no method available within CMC to hide database logon option when scheduling or viewing a Crystal Report in the Info view. This is very much true.
    But as you also mentioned that you don't want your users to enter the database logon credentials evertime they view or schedule a crystal report, there is one setting in CMC which we can do to avoid prompt for database logon credentials.
    CMC - Home - Go to that specific crystal report - Click Process tab - Click the sub-tab 'Database' and at the bottom of the page there is an option "Use same database logon as when report is run". Check this option after providing the database credentials and click UPDATE.
    Now whenever users try to view or schedule this specifc crystal report they won't be prompted for the database logon credentials.
    Regards,
    Venkat

  • How to pass database logon info to a Crystal Report in a subreport with different server name using VS C #

    Post Author: fabu1971
    CA Forum: .NET
    I could pass the database logon in Reports with subreports but the reports with subreports with different  server name I can not pass the logon information . Do you have any idea how I can do that to pass the database logon with different database or server name ?

    Post Author: quafto
    CA Forum: .NET
    You can use the Subreports collection of the ReportDocument object to access all the subreports in your main report. These are returned as ReportDocument objects. Once you have your subreport as a ReportDocument you can loop through your Tables collection and set the ConnectionProperties to your appropriate Server/Database. For example here is some pseudo code: ConnectionInfo boConnectionInfo = new ConnectionInfo();boConnectionInfo.ServerName = "serverName";boConnectionInfo.DatabaseName = "databaseName";boConnectionInfo.UserID = "username";boConnectionInfo.Password = "yourpassword"; foreach(ReportDocument boSubreport in mainReport.Subreports){    foreach(Table boTable in boSubreport.Database.Tables)    {        TableLogOnInfo boTableLogOnInfo = boTable.LogOnInfo;          boTableLogOnInfo.ConnectionInfo = boConnectionInfo;          boTable.ApplyLogOnInfo(boTableLogOnInfo);          boTable.Location = "newtablelocation";     }}

  • WS-C4006 How to save the configuration

    Hi,
    I have Cisco 4006 Switch model; normally we don't need to save the configuration on this device but somehow this device is not saving any configuration.
    Can someone help me; how to save the configuration. Attached is the IOS version detail.
    ****************** show version ******************
    WS-C4006 Software, Version NmpSW: 7.1(2)
    Copyright (c) 1995-2002 by Cisco Systems, Inc.
    NMP S/W compiled on Feb 7 2002, 16:53:43
    GSP S/W compiled on Feb 07 2002, 15:24:55
    System Bootstrap Version: 5.4(1)
    Hardware Version: 3.2 Model: WS-C4006

    hi
    can u verify whether this command is enabled in ur box or not ?
    set config mode text auto-save enable
    hope you are aware of this cli which does save the configs automatically after every 30mins.
    regds

  • How to save passwords. Setting already selected but still does not save.

    How to save passwords. Setting already selected but still does not save. Web site does allow password saving.

    Could you try a fake username and password on another site, and see if you can save there? You can use this website's login form at [https://support.mozilla.com/tiki-login.php] to test.
    Let me know the result of doing this, and whether any password-related errors appear in Tools->Error Console

  • RE: What's database field are used in crystal report file?

    Hi all
    Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail section of report.....)
    We looking forward to hearing from you
    Thanks
    Son

    Hello Son,
    please use this code below to get a list of used database fields in a report :
    //File Name:          CS_Get_report_data_out_inproc.sln
    //Created:            April 11, 2008
    //Author ID:          FLI
    //Purpose:            This C# .NET sample Windows application demonstrates
    //                  how to retrieve report data and put the into a XML file
    //                  using unmanaged RAS.
    // Note this is available without a dedicated RAS with SP2 for XI R2
    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    namespace CS_Get_report_data_out_inproc
        public partial class Form1 : Form
            // CR Declarations
            ReportDocument boReportDocument;
            ISCDReportClientDocument boReportClientDocument;
            public Form1()
                InitializeComponent();
                //Create a new ReportDocument
                boReportDocument = new ReportDocument();
                // load the RPT file
                boReportDocument.Load("..
    ReportData.rpt");
                // show in reportviewer
                crystalReportViewer1.ReportSource = boReportDocument;
            private void button1_Click(object sender, EventArgs e)
                //Access the ReportClientDocument in the ReportDocument (EROM bridge)
                boReportClientDocument = boReportDocument.ReportClientDocument;
                // Retrieve the Rowset Controller
                RowsetController boRowsetController = boReportClientDocument.RowsetController;
                // Retrieve the metadata (column headers) - this allows you to only retrieve the data that is on the report.
                RowsetMetaData boRowsetMetaData = new RowsetMetaData();
                Fields boFields = boReportClientDocument.DataDefinition.ResultFields;
                boRowsetMetaData.DataFields = boFields;
                // Now print out the data in XML file
                //(Note: This will print out the results of formulas too)
                StreamWriter sw = new StreamWriter("C:
    ReportData.xml", false);
                sw.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
                sw.WriteLine("<ReportData>");
                sw.WriteLine("<Reportheader>");
                // Print out the titles
                for (int i = 0; i < boFields.Count; i++)
                    String boFieldName = boFields<i>.Name;
                    sw.WriteLine("<ReportheaderDetail>" + boFieldName + "</ReportheaderDetail>");
                sw.WriteLine("</Reportheader>");
                //Create the cursor which lets us loop through the data
                RowsetCursor boRowsetCursor = boRowsetController.CreateCursor(null, boRowsetMetaData, 1);
                Record boRecord;
                while (boRowsetCursor.IsEOF == false)
                    sw.WriteLine("<Customer>");
                    boRecord = boRowsetCursor.CurrentRecord;
                    for (int j = 0; j < boFields.Count; j++)
                        try
                            sw.WriteLine("<Detail>" + (String)boRecord[j].ToString() + "</Detail>");
                        catch (Exception err)
                            sw.WriteLine("<Error>" + err.Message + "</Error>");
                    sw.WriteLine("</Customer>");
                    boRowsetCursor.MoveNext();
                sw.WriteLine("</ReportData>");
                // CLose the file
                sw.Close();
                MessageBox.Show("XML File 'ReportData.xml' successfully created on C:");

  • How do we create a jndi connection in crystal reports XI

    how do we create a jndi connection in crystal reports XI when the data soiurce is configured on websphere 6.1

    You need to use WLST online. I am not sure what your exact requirements are but one good way of working this is to have a WLST script that deletes all your WL customisations, like connection pools, JMS Servers etc and then creates it. That way you can run the same script repeatedly and it will get everything up to date for you. However you have to remember that everytime you add something new you need to update your delete section. Also your deleting should not fail if the item does not exist. I hope that makes sense!
    As to the specifics of WLST examples to do this then check out the WLST examples in CodeShare.
    If you are still having issues then post another message.
    Geoff

  • Crystal Report Server: Cannot save Database Configuration in CMC

    I already posted this question as SAP internal CSN message (message number 1896093 2009) but did not get any answer so far.
    I have installed a test version (which I'd like to become permanent some     
    day...) of Crystal Reports Server 2008 on a local machine to be able to      
    share Crystal reports within our department.                                 
    I created a couple of reports which I would like to get updated              
    regularly. The issue is here that I get a logon screen to the underlying     
    SQL Server as soon as a user clicks on "Refresh" when viewing a report       
    from InfoView. The SQL Server is running on integrated security              
    via SSO, which I cannot change...                                            
    To get around this issue I would like to change the default Database         
    Configuration of the reports. Hence I do the following:                      
    1) I open the Central Mangement Console                                      
    2) I select one of my reports                                                
    3) Rightclick on Properties                                                  
    4) On the Default tab I select Database Configuration                        
    5) the config is set to "Logon Screen" and I ant to change this to SSO,      
    so I set this                                                                
    6) Now I click on Save                                                                               
    => The setting is reverted to the old "Logon Screen" settin1g                                                                               
    This behavior is the same for all the reports I'm using.                                                                               
    Looking forward to any help, kind regards                                    
    Wolfgang
    P.S.: Ultimately this issue arises, because I cannot refresh my crystal report data in batch job mode, because the reports are reading data from an SQL server, which allows SSO-logon (integrated security) only. Thus I have to open each and every report for update manually and click on the refresh button.
    Edited by: Ralf Wolfgang Geithner on Jul 3, 2009 11:00 AM

    Hi Manish,
    thanks for your answer. Unfortunately I'm still stuck in this matter.
    Does this happen with the sample reports too? I think it will be a good approach to try this to see if your system is behaving differently for sample reports and reports published from outside
    I did not really try this, but viewing and editing my reports in Crystal Reports 2008 Designer works perfectly fine. As well can the user view my reports in the InfoViewApp.
    Also, does it revert to the login screen setting immediately after you click Save or does it show the setting as changed after clicking Save but, does not retain it when you come back and check the report settings again?
    The data is reverted immediately after clicking "Save"
    Kind reagrds
    Wolfgang

  • How to change Database character set?

    Hi,
    We are planning to make a clone of production Database which has:
    select value$ from sys.props$ where name='NLS_CHARACTERSET';
    AL32UTF8
    We have set up a new server for that purpose and installed database, but by default it has
    select value$ from sys.props$ where name='NLS_CHARACTERSET';
    WE8ISO8859P1
    So after making full import from full backup file we have some broken character in database.
    How can I change from WE8ISO8859P1 to AL32UTF8?
    I expect that I need to shutdown the clone database or even make from scratch full import.
    Thanks

    I made a full backup from production database which has AL32UTF8
    My new database is fresh and it has WE8ISO8859P1
    I think the reason why I'm having some corrupted characters is because of difference in Character set between two database, right?
    so I will need to change new database Character set to AL32UTF8 then make again full import.

  • 6500 classic: how to save "White balance" setting ...

    Hello, when I activate the camera, the image looks like filled with blue, so I need to go to camera settings, click "White balance", and select "Daylight" instead of "Automatic" - now the picture will be perfect. But next time when I activate the camera, I should repeat this step again.
    How to save "White balance" settings to "Daylight" forever?

    Unfortunately it's not possible.
    The setting will only be effective for one session. Once you close the camera application they will revert to default. 
    ...who's more foolish?, the fool or the one who follows him?... ovi-wan

  • PSE 11 - How disable Save in Version Set

    How can I default the Save in Version Set checkbox to unchecked so I do not have to remember to uncheck it when I save. I _never_ want to create a version set. Thanks.

    I don't think you have an option to disable "save in version set".

  • How to save/maintain shuffle setting

    Not sure if this is a "feature" or a bug, but if a playlist is set to 'shuffle' and I go and listen to a podcast, when I go back to the initial playlist, shuffle is no longer on. I've replicated this numerous times, and a buddy of mine did the same on his iPhone 3GS -- which leads me to believe it is a part of the software and not unique to my iPod.
    Is there any way to get it to keep its playlist settings? My old iPod (circa 2004) actually kept shuffle on until I turned it off regardless of what folder/playlist I was in, but my new one ... not so much.

    I know how to turn shuffle on, that wasn't the question. My question was/is how do I save the shuffle setting with respect to a playlist, because every time I play a podcast and go back to the playlist, shuffle is turned off. Since I listen to my iPod in the car (and the iPod is in the glove box), the only way to turn shuffle back on is to pull over, which is a PITA.

  • CMC cannot save database configuration from a crystal report using WS

    Hi all
    I have a report in Crystal reports which is using a web service as a datasource. All works fine since web services is not using ws-security but when I deploy my report on CMC i can not save database configuracion. This is because i don't want it to prompt me for the logon credentials.
    thanks

    Hi Manish,
    thanks for your answer. Unfortunately I'm still stuck in this matter.
    Does this happen with the sample reports too? I think it will be a good approach to try this to see if your system is behaving differently for sample reports and reports published from outside
    I did not really try this, but viewing and editing my reports in Crystal Reports 2008 Designer works perfectly fine. As well can the user view my reports in the InfoViewApp.
    Also, does it revert to the login screen setting immediately after you click Save or does it show the setting as changed after clicking Save but, does not retain it when you come back and check the report settings again?
    The data is reverted immediately after clicking "Save"
    Kind reagrds
    Wolfgang

  • How to alter database character set from AL32UTF8 to EE8MSWIN1250

    Hi folks,
    I'm using an Oracle 10g, XE database, which has a database character set set to AL32UTF8, what causes that some characters like "č ť ř ..." are not displayed.
    To fix this issue, I would like to change it to EE8MSWIN1250 character set as it's set on server.
    Unfortunatelly below steps don;t work for me:
    connect sys as sysdba;
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT;
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0;
    ALTER DATABASE OPEN;
    ALTER DATABASE NATIONAL CHARACTER SET EE8MSWIN1250;
    ALTER DATABASE CHARACTER SET EE8MSWIN1250;
    SHUTDOWN IMMEDIATE; -- or SHUTDOWN NORMAL;
    STARTUP;Value in regedit: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_XE is set to CZECH_CZECH REPUBLIC.EE8MSWIN1250
    I'm struggling with this issue for hours and unfortunatelly can't make it work. Any advise is more than welcome.
    Thanks,
    Tomas
    I tried to use hints listed here , but always getting some ORA messages.

    Hi Sergiusz,
    Thank you for your reply. You're right, I've probably didn't provide a full details about my issue, but at least now I know, that database encoding(characterset) is correct.
    Here is my issue:
    Within my APEX application I would like to use a JasperReportsIntegration, so to be able to create and run iReports straight from APEX application. Installation, and implementation of JasperReports works fine, I had no issue with it.
    As a second step I've created a simple report using iReport tool, when if preview function is used, all static characters (from report labels) are displayed correctly. Database items are displayed incorectly - some Czech characters are not displayed. Language within report is set to cs_CS, but I've tried also other options. No sucess.
    When I run that report from APEX application (from server) then the same issue - data from database are returned without some czech characters.
    Kind regards,
    Tomas

Maybe you are looking for

  • How do I find out where FCP saved my captured media?

    I'm editing a project and my original source capture on one of my clips needs to be recaptured because of some corruption on the very front part of the file which is making it impossible to insert any of the video track from this capture into my time

  • 15-pin mini D-Sub, DVI-D inputs Compatible w/macbook?

    this is the monitor link http://www.bestbuy.com/site/olspage.jsp?skuId=8268527&type=product&id=1170290376 114 these are the specs Product Features Ultrafast 5 ms response time 700:1 contrast ratio; 300 cd/m² brightness 1440 x 900 maximum resolution;

  • New panasonic P2 Card Reader

    Anybody tried this one yet? http://catalog2.panasonic.com/webapp/wcs/stores/servlet/ModelDetail?displayTab=O &storeId=11201&catalogId=13051&itemId=406091&catGroupId=34402&surfModel=AJ-PCD2G PJ Currently using the DuelAdapter, but wouldn't mind someth

  • Downloading iTunes 8.0 causes error message

    I downloaded iTunes 8.0 and now I get an error message that reads: "Warning! The registry settings used by the iTunes drivers for importing and burning CDs and DVDs are missing. This can happen as a result of install other CD burning software. Please

  • No ranges

    HI SAP GURUS, Iam having one problem at the time of save the billing document ihave like this problem For object RV_BELEG, number range interval  KZ does not exist this problem is releated to any fi document no ranges please conforme plz let me kno i