Results 1 to 3 of 3

Thread: [RESOLVED] A Tale of two projects

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2001
    Location
    VA, USA
    Posts
    36

    Resolved [RESOLVED] A Tale of two projects

    the bain of everyone everywhere, two projects, two reports. One written 6 months ago, works like a champ,

    the other one (current project) wants to throw the database login box whenever the report is run, both take parameters (single int parameter for row ID)

    SQL 2012, VS 2017 Framework 4.5.1 target, both are set to any cpu prefer 32 bit

    both reports run off of stored procs in the database

    both databases have the same security group with the same permission set (standard)

    I went through each project, one has a few more references to crystal than the other, but they both work on my dev box flawlessly, not so much in production.

    Nothing i have tried via all the answers i can find has worked, runtimes on my box same as runtimes on target PC.

    at wits end and lack the hair to pull any out.

    code is as follows
    Code:
                string p = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
                p += @"\CategoryReport.rpt";
                int OrderID = id;
                var rd = new ReportDocument();
                rd.Load(p);//+@"\rptSeculsionAOD.rpt"
                rd.SetParameterValue(0, id);
                crvReportViewer.ReportSource = rd;
                crvReportViewer.DisplayToolbar = true;
    second place is just the first loser...

  2. #2

    Thread Starter
    Member
    Join Date
    Oct 2001
    Location
    VA, USA
    Posts
    36

    Re: A Tale of two projects

    Well, 286 views and no answers...

    heres the answer...

    When using SQL2008 server, you must use the SQLADODB connection type under the OLEDB(ADO) heading in the database connection. I was using SQLCLNI out of habit since the last job i was at had SQL2012 (which has a native client) 08 does not.

    Corrected problem report connections and it all works now.
    second place is just the first loser...

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2001
    Location
    VA, USA
    Posts
    36

    Re: A Tale of two projects

    dont know why this went twice...
    Last edited by dirty_howi; Jan 25th, 2019 at 03:23 PM. Reason: duplicate
    second place is just the first loser...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width