Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL String in Delphi7 and Crystal 9.2.2

Status
Not open for further replies.

DavIlan

Programmer
Mar 2, 2004
6
IL
Hi All
I use Depphi 7 and Crystal 9.2.2
I have written the following code :

CReport:=Application1.OpenReport
('Report1.rpt',crOpenReportByTempCopy);
CReport.DiscardSavedData;

for i := 1 to CReport.Database.Tables.Count do begin
CReport.Database.Tables.Item.SetLogOnInfo
(Server,Database,UserID,Password);
end;

CRViewer91.EnableExportButton := true;
CRViewer91.ReportSource:=CReport;
CReport.SQLQueryString := Query1.SQL.Text;
CRViewer91.ViewReport;

Checking the parameter ( SQLQueryString ) while debugging shows that the value is not being set, and the actual/original value that exists in the report, is the one being kept ( the result also shows that the old SQL is the one being run !!!
How can i override it ???
From the Crystal PDF i get the following :

SQLQueryString --> String --> Gets or sets SQL query string --> Read/Write --> Can be written only when
formatting idle.

What is the 'Formatting Idle' and how can i change it to FiormattingActive or FormattingInActive ???
Thanks in advance,

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top