Skip to Content
author's profile photo Former Member
Former Member

How can I change connection information using CrystalReport VCL for Delphi?

Hello.

We are using CrystalReport XI with Delphi CRPE VCL component. The database connectivity used within the report is ADO. The follwing is basically what we are trying to do:

var

CRPEReport: TCrpe;

begin

CRPEReport:= TCrpe.Create(Self);

try

CRPEReport.ReportName := ReportPath;

if CRPEReport.HasSavedData then

CRPEReport.DiscardSavedData;

CRPEReport.Connect.ServerName := 'New Server';

CRPEReport.Connect.DatabaseName := 'NewDatabase';

CRPEReport.Connect.UserID := 'dbo';

CRPEReport.Connect.Password := 'dbopass';

CRPEReport.Connect.Propagate := True;

CRPEReport.Show;

finally

CRPEReport.Free;

end;

end;

The preview shows data from database that the report was desgined with and it completely ignores the connectivity setting that I put in the code. What am I doing wrong??? Please help. Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Aug 12, 2009 at 04:00 PM

    You have to use the ConnectBuffer. See [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note for details.

    Also, consider searching the notes database:

    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true

    The search; VCL database crystal, returns a number of notes that may be of use.

    Ludek

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 12, 2009 at 03:55 PM

    As per the header at the top of this forum:

    This forum is dedicated to topics related to custom application development or deployment with Crystal Reports in .Net. This includes full versions of Crystal Reports as well as those versions of Crystal Reports bundled with Microsoft Visual Studio .Net.

    Thus moving this thread to the appropriate forum.

    Ludek

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.