SAP Crystal Report using SQL Server Authentication and Windows Authenticati

I'm a SAP Crystal Report, version for Visual Studio 2010 Beginner
my ingredients are
1.windows 7 ultimate service pack1
2.sql server 2008 standard edition
3.visual studio 2010 pro
4.SAP Crystal Report, version for visual studio.net
I was created a report named customersByCity.rpt using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> I'm supply Server, User ID, Password and Database. I assume me using SQL Server Authentication for my report
Then, my ASP.NET files as following
//ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewCustomersByCity.aspx.cs" Inherits="viewCustomersByCity" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div><asp:Label ID="lblMsg" runat="server" BackColor="Yellow" ForeColor="Black"></asp:Label>
 <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true"></CR:CrystalReportViewer>
    </div>
    </form>
</body>
</html>
//code-behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
public partial class viewCustomersByCity : System.Web.UI.Page
    private const string PARAMETER_FIELD_NAME = "city";   
    private ReportDocument customersByCityReport;
    private void ConfigureCrystalReports()
        ConnectionInfo connectionInfo = new ConnectionInfo();
        connectionInfo.ServerName = @"WKM1925-PCWKM1925";
        connectionInfo.DatabaseName = "Northwind";
        connectionInfo.UserID = "sa";
        connectionInfo.Password = "sysadmin25";
        SetDBLogonForReport(connectionInfo);
    private void SetDBLogonForReport(ConnectionInfo connectionInfo)
        TableLogOnInfos tableLogOnInfos = CrystalReportViewer1.LogOnInfo;
        foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
            tableLogOnInfo.ConnectionInfo = connectionInfo;
    private void SetCurrentValuesForParameterField(ReportDocument reportDocument, ArrayList arrayList)
        ParameterValues currentParameterValues = new ParameterValues();
        foreach (object submittedValue in arrayList)
            ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
            parameterDiscreteValue.Value = submittedValue.ToString();
            currentParameterValues.Add(parameterDiscreteValue);
        ParameterFieldDefinitions parameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields;
        ParameterFieldDefinition parameterFieldDefinition = parameterFieldDefinitions[PARAMETER_FIELD_NAME];
        parameterFieldDefinition.ApplyCurrentValues(currentParameterValues);
    protected void Page_Load(object sender, EventArgs e)
        customersByCityReport = new ReportDocument();
        string reportPath = Server.MapPath("customersByCity.rpt");
        customersByCityReport.Load(reportPath);
        ConfigureCrystalReports();
        ArrayList arrayList = new ArrayList();
        arrayList.Add("paris");
        arrayList.Add("Madrid");
        arrayList.Add("Marseille");
        arrayList.Add("Buenos Aires");
        arrayList.Add("Sao Paulo");
        ParameterFields parameterFields = CrystalReportViewer1.ParameterFieldInfo;
        SetCurrentValuesForParameterField(customersByCityReport, arrayList);
        CrystalReportViewer1.ReportSource = customersByCityReport;
1st scenario
When in a runtime, it's keep appear a dialog box. This dialog box ask me to suppy Server, User ID, Password and Database. Once all information is supplied, my report display the data as expected
2nd scenario
I change my report using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> checked on Integrated Security. I just choose Server, and Database. I assume me using Windows Authentication
When in a runtime, there's no dialog box as above. My report display the data as expected. really cool
Look's like, when report using SQL Server Authentication there's some problem. but, when report using Windows Authentication, it's fine.
I'm looking for comment. Please help me

Hello,
MS SQL Server 2008 requires you to install the MS Client Tools for 2008.
Once install then update all of your reports to use the SQL Native 10 as the OLE DB driver.
The try again, if it still fails search, lots of sample log on code in this forum.
Don

Similar Messages

  • Users using SQL Server Authentication

    What tables/views would I use to create a list of users using SQL Server Authentication? I want the name, whether password (complexity) policy is set and whether password expiration is set. I only want current/active users.

    You can query query sys.sql_logins to get this information.
    http://msdn.microsoft.com/en-GB/library/ms174355.aspx
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • How to Custom Report using sql server report builder for SCCM 2012 SP1

    Hi ,
    I am new to database, if i want to create a manual report using sql server report builder for SCCM 2012 SP1, what step should i take.
    i want to create a report in which computer name, total disk space, physical disk serial no come together. i already added class (physical disk serial no.) in hardware inventory classes. refer snapshot

    Hi,
    Here is a guide on how to create custom reports in Configuration Manager 2012, it is a great place to start, change to the data you want to display instead.
    http://sccmgeekdiary.wordpress.com/2012/10/29/sccm-2012-reporting-for-dummies-creating-your-own-ssrs-reports/
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • How to repair database using SQL server 2008 and C#

    How to repair database in SQL server 2008 using C#
    Musakkhir Sayyed.

    Unfortunately your post is off topic as it's not specific to SQL Server Samples and Community Projects.  
    This is a standard response I’ve written in advance to help the many people who post their question in this forum in error, but please don’t ignore it.  The links I provide below will help you determine the right forum to ask your
    question in.
    For technical issues with Microsoft products that you would run into as an end user, please visit the Microsoft Answers forum ( http://answers.microsoft.com ) which has sections for Windows, Hotmail,
    Office, IE, and other products.
    For Technical issues with Microsoft products that you might have as an IT professional (like technical installation issues, or other IT issues), please head to the TechNet Discussion forums at http://social.technet.microsoft.com/forums/en-us, and
    search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), please head to the MSDN discussion forums at http://social.msdn.microsoft.com/forums/en-us, and
    search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here: http://community.dynamics.com/
    If you think your issue is related to SQL Server Samples and Community Projects and I've flagged it as Off-topic, I apologise.  Please repost your question and include as much detail as possible about your problem so that someone can assist you further. 
    If you really have no idea where to post your question please visit the Where is the forum for…? forum http://social.msdn.microsoft.com/forums/en-us/whatforum/
    When you see answers and helpful posts, please click Vote As Helpful,
    Propose As Answer, and/or Mark As Answer
    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCSA, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    Twitter: @Mr_Wharty
    MC ID:
    Microsoft Transcript

  • Sql server 2008 and Windows 8

    Hi
    I published my WPF application using VS 2010 Express edition and trying to install it on Windows 8.  The application runs but when it comes to searching the database that was included in the installation package it gives the error
    "This program has compatibility issues Microsoft SQL Server(2008 and 2008 R2)"
    The installer when setup was run did download SQL Server so I am not sure why I am getting this error.  Any advice?

    Hello,
    Service Pack 3 for SQL Server 2008 is required to make it compatible for Windows 8 or Windows 8.1. For more information,
    please read the following Support article:
    https://support.microsoft.com/kb/2681562?wa=wsignin1.0
    You can download SP3 from the following URL:
    http://www.microsoft.com/en-us/download/details.aspx?id=27594
    If you are installing SQL Server 2008, continue setup despite of the warning and apply SP3 after installing SQL Server 2008.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Crystal report 9 Sql Server 2008 R2 compatability

    Can we use Crystal report version 9 in Sql server 2008 R2 to generate reports in web server.
    Kindly tell us about the compatability of  these two. If there is any support issue between these two kindly mention the same.
    Edited by: Deepan1 on Jun 7, 2011 5:32 PM

    Upgrade to CR 2008 SP 4 is your only option.
    The Platforms file was on the CR CD or it may be in the Documents folder on install. I don't have it installed any more so I can't say exactly where it is. Search your PC for platforms.
    The problem is SQL 2008 uses a new Client engine and MS renamed the DLL do CR isn't aware of it. Using the MDAC version of SQL Server OLE DB Provider may work but it won't be supported if you find errors.
    If you do upgrade to CR 2008 then install the MS SQL Server 2008 Client Tools from the CD or download the MSI from Microsoft and then use the MS SQL Server Native 10 client and it should all work for you.
    Thank you
    Don

  • Help with Crystal Reports changing SQL Server

    I am doing a web site cutover to a new server for a client and have the server up and running using crystal reports server xi r2 sp2 under windows server 2003r2 32bit.
    When I run a report via the webpage it generates a blank page.
    I've edited the old web developers crystal report files and updated the database path howerver when i type in the new SQL server and authenticate to it using the SA account  it then pops up a window asking me to enter values
    has items such as
    @sUserID
    @sSubUserID
    @iSessionID
    etc
    the only way i can continue through this is to check a box for each value 'set to null' which i dont' think is correct.
    What values should I be putting in these areas or should I be getting this infomation from the previous developer?
    much appreciated

    Hello,
    I don't recognize those variables as CR ones so it's likely something the original developer is setting in code.
    You'll have to discuss with that person.
    If your have SDK issues then post your question to one of the .NET or Java SDK forums.
    Thank you
    Don

  • How to create a lookup in Crystal Reports or SQL Server

    I need to create an Operating Statement report.  The problem is that I need to create a lookup or something to satify a requirement that even if there is no data in the system it will still bring back a description.
    Example:  01 = Income, 02 = Expense, 03 = Labor.. ect(there are 31 of these)
    If there is no data for 03 I still need Labor to print.
    In my SQL I did a CASE statment that said when
    Account = '3001' THEN 01, Account = '3002' THEN 02, Account = '3003' THEN 03 ECT
    Then I created a formula a in Crystal that reads the case Statement to assign descriptions 01 = Income, 02 = Expense, 03 = Labor.
    The problem is when there is no data for Account 3003 then the formula does not know to still bring back 03 as Labor.
    Can I create a lookup to assign the description, I dont care about the values they can come back as zero.
    Is there a formula or can I create a sql statement to pull back a derived table anything but to create a physical table?
    Any help would be great.
    Application is Crystal Reports XI 2 SP2
    SQL Server 2005
    Peoplesoft 8.9 Financials.

    Thank you Ludek for answering my post.  That was just the information I needed.  I inserted a formula field and then changed the font to Wingdings and that gave me my checkbox.    Not being familiar with Crystal Reports I had a devil of a time just figuring out how to insert a formula field as the field explorer is not easy to find.  The following link will help any developers who might have that problem too.
    http://aspadvice.com/blogs/rjdudley/archive/2005/08/09/2642.aspx
    Lastly Iu2019ll add the part of my formula which gives you a checked or unchecked check box in a Windings font:
    --For Check box checked
        Formula = Chr(254)
    --For Check Box unchecked
        Formula = Chr(168)

  • Crystal Reports 10 - SQL Server

    Hi
    We have Crystal Reports 10 currently in our organization and we want to know if it is compatible with SQL Server 2005 or SQL Server 2008?
    Does anybody have any idea on this? Any help as in white paper, links etc is appreciated.
    Thanks.

    Hi,
    Following is the list of the reporting databases on windows Platform supported with CR 10.
    Native Oracle 8.1.7
    Native Oracle 9.2
    Native DB2 8.1
    Native DB2 7.2
    Native Sybase 12.5
    Native Access 2000
    Native Access 2003
    ODBC-Teradata
    ODBC-SQL Server 2000
    ODBC-Oracle 8.1.7
    ODBC-Oracle 9.2
    ODBC-DB2 7.2
    ODBC-DB2 8.1
    ODBC-Sybase 12.5
    ODBC-Access 2000
    ODBC-Access 2003
    ODBC-Text
    OLEDB-SQL Server 2000
    OLEDB-Oracle 8.1.7
    OLEDB-Oracle 9.2
    OLEDB-DB2 7.2
    OLEDB-DB2 8.1
    OLEDB-Access 2000
    OLEDB-Access 2003
    Hope this helps!!
    Regadrs,
    Shweta

  • How to create YTD and MTD reports using Sql Server 2008 r2 report builder 3.0

    Hi All,
    How can I create YTD report from the below data. please help me
    ProdA     ProdB     ProdC     Month     Year
    10       50        40          January      2012
    Data for full Year i.e. from Jan - December 2012
    50       90       100        January       2013
    Data for full Year i.e. from Jan - December 2013
    90       40         30        January        2014
    Data for full Year i.e. from Jan - Till Date 2014
    MercuryMan

    You can use a correlated subquery to calculate YTD in query behind. You can use APPLY operator for that
    so something like
    SELECT *
    FROM Table t1
    CROSS APPLY (SELECT SUM(ProdA) AS TotA,SM(prodB) AS TotB,SUM(prodC) AS TotC
    FROM Table
    WHERE Year = t.Year)t1
    And show TotA,TotB and TotC in the required total row
    Another method is to add required totals in SSRS by clicking on relevant group and choosing Add Total option
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SQL Server 2012 and Windows Server 2012 - are they used together?

    is win server 2012 standard container sql by default 

    No! They are two different products.
    more info: http://technet.microsoft.com/en-us/library/hh831769.aspx
    sqldevelop.wordpress.com

  • How to create a crystal Report using C# and SQL Server

    Hi, im new in creating crystal report using SQL Server, and im making a project.. and could someone help me how to connect your .sdf (SQL Server File) from the bin to your crystal report? thanks a lot.. i followed some instructions like this one (https://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?forum=csharpgeneral)
    but i got an error on the adding of server name and database portion.. thanks a lot in advance

    Hello,
    Crystal Reports are supported on
    http://scn.sap.com/community/crystal-reports.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • SQL Server 2005 and ColdFusion 7

    Hi all,
    I am using SQL Server 2005 and ColdFusion 7 (standalone) on
    XP 64 Bit. I was using the exact setup a couple of weeks ago, but
    had to reinstall my O/S due to hardware problems so am back to the
    beginning. I remember having a nightmare setting datasources up in
    the past, but did manage to find a solution.
    I have tried the following:
    SQL has TCP/IP Enabled
    SQL is set to Mixed Authentication
    SQL has a login set to the same as my Windows Username and
    password
    My database has a user (dbo) by the same name as the login
    set in SQL
    When I add a datasource in the administrator I enter the
    windows username and password (I have tried without either as
    well), the server name as localhost and the port as the default
    1433.
    I always get the following error:
    Connection verification failed for data source: DATABASENAME
    java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver]Error establishing socket. Connection refused: connect
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver]Error establishing socket.
    Connection refused: connect
    Can someone offer any advice? This is driving me proper nuts.
    TIA,
    Paul

    when i did it, i had to update my jdbc driver
    http://msdn.microsoft.com/data/ref/jdbc/

  • Connect Oracle Reports to SQL server

    Dear All,
    I am using SQL Server 2005 and want to connect Oracle Report 6i to SQL Server 2005 without installing Oracle Database. Installing both the databases slows down the machine.
    Regards,
    Muhammad Yasir Bodla
    Edited by: user650351 on Jun 3, 2009 5:28 AM

    Hi,
    As far as I know this is possible using ODBC and Oracle Open Client Adapter (OCA), but I do not know the details and the howto's.
    Probably you'll get a better answer when posting this question at the Reports forum:
    Reports
    Regards,
    Ed

  • Report Schedule - SQL Server Agent

    Hi,
    We have few SSRS reports which has to run daily after the data is loaded in the database.
    I scheduled the reports on timely based and got the Job Id's using SQL server agent and using SP_START_JOBs stored procedure to run.
    But the problem is it is creating multiple files one for time and one for SP_START_JOBS procedure.
    Any idea how to avoid this?
    I really appreciate any help.
    Thanks,
    Sarah

    If you're going to schedule your SSRS jobs using the agent, don't schedule them in SSRS using subscriptions as well...
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

Maybe you are looking for

  • HT2204 how can i recover or change answers to my security questions

    How can I change the answers to my security questions.

  • Droid Battery Issues after Update to 2.2

    Has anyone had there battery drain in the matter of hours after updating to 2.2? My wifes phone, her battery is already dead and her update was done about 2 hrs ago. It's not the facebook app because when she did her update she lost all of her apps s

  • 12.1.2 rapid clone patches post step missing scripts directory in appsutil

    Hi, I have 12.1.2 new fresh instance running on 64bit RHL. I have applied 8360494:R12.OAM.B and 9462233:R12.OAM.B rapid clone patches. I did post steps as mentioned in patch read me which is as below: 1.     Log in to the APPL_TOP environment (source

  • SQL server 2014 DB creation issue

    Hi, I have created VM (windows server 2012) which is installed with SQL server 2014 standard version from gallery. when I tried to create a DB in SQL server it is taking too much time (more than half an hour it will be in the executing state) to crea

  • Update data targets from ODS

    Hi Friends, I have question regarding how to update data further from ODS. I have ODS1 and ODS2. ODS1 is having deltas updated from ODSA. ODS2 is a new ODS and now needs to be updated from ODSA. I have reviewed the help already. http://help.sap.com/s