Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8177201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:27:03+00:00 2026-06-06T23:27:03+00:00

I have written this code with the help of other programmers. This code works

  • 0

I have written this code with the help of other programmers. This code works perfectly when running on Windows 7 but when I install the program on Windows XP the log-on fails. I have installed .Net Framework 4.0 and CRforVS_13_0_3 of Crystal Reports on the Windows XP machine.

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared; 


label2.Text = Convert.ToString(BAssistencia.nroo);
ReportDocument segredo = new ReportDocument();
        segredo.Load(@"C:/Relatorios/CrystalReport3.rpt");
        ParameterField pf1 = new ParameterField();
        ParameterFields pf1s = new ParameterFields();
        ParameterDiscreteValue pdv = new ParameterDiscreteValue();
        TableLogOnInfo tabla = new TableLogOnInfo();
        TableLogOnInfos tablas = new TableLogOnInfos();
        ConnectionInfo infocon = new ConnectionInfo();
        Tables crtables;

        infocon.ServerName = "server";
        infocon.DatabaseName = "database";
        infocon.UserID = "user";
        infocon.Password = "password";
        infocon.IntegratedSecurity = false;

        crtables = segredo.Database.Tables;
        foreach (CrystalDecisions.CrystalReports.Engine.Table crtable in crtables)
        {
            tabla = crtable.LogOnInfo;
            tabla.ConnectionInfo = infocon;
            crtable.ApplyLogOnInfo(tabla);
        }

        pf1.Name = "@pedido";
        pdv.Value = label2.Text;
        pf1.CurrentValues.Add(pdv);
        pf1s.Add(pf1);
        crystalReportViewer1.ParameterFieldInfo = pf1s;

        crystalReportViewer1.ReportSource = segredo;

What am I doing wrong???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:27:04+00:00Added an answer on June 6, 2026 at 11:27 pm

    A few links, the first one are extension methods that I’ve written that I use with Crystal (on XP, Vista and 7 along with Server 2003, 2008 and they work there).

    • Crystal Reports extension methods for .Net:
      http://www.blakepell.com/Main/BlogEntry.aspx?EntryID=e2fcdcf9-312e-4911-8572-20178c94660b

    The second one here has a different issue but in the end (before my rant) I have some info about gotchas swapping out connections at runtime.

    • http://www.blakepell.com/Blog/?p=15

    The code provided above has worked for me in all of my environments. Now, in your case, you’ll also want to make sure that the XP box has access to the database server outside of Crystal also (no firewalls blocking, the server isn’t denying it access, no ACL’s in place that are stopping network routing, etc). Over the years I have found swapping connections out with Crystal to be very particular.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this code in JavaScript and works perfectly fine when I include
In my code I have written this but it fails to compile: In Class1.h:
received help with. Basically, this code is written in Java but I need it
I have written this regex that works, but honestly, it’s like 75% guesswork. The
I have written this code inside a servlet to delete certain records from three
I have written this code what it does is if user types postcode or
I have written this code outside all functions: int l, k; for (l =
I have written this code to join ArrayList elements: Can it be optimized more?
I have written this code to convert string in such format 0(532) 222 22
I have written this code in javascript however I have to make it work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.