Showing posts with label sqlquerystring. Show all posts
Showing posts with label sqlquerystring. Show all posts

Sunday, March 25, 2012

Crystal SQLQueryString

I am writing some code that analyses the 700+ Crystal reports we have within our business. I am aiming to have this code evalaute the data access code for each report. I have managed to determine whether the report is using a Command, Stored Procedure or Table access to obtain the data. However, when I am retrieving the SQLQueryString property of the Report I seem to be having an adverse affect on the msdb database on our SQL Server. It appears to be causing some locking issues. Is there any other method of obtaining the SQL Command code from the Crystal Objects?In your Front End application, check if there is any property to get query
Something like

CR.GetQuery

Tuesday, March 20, 2012

Crystal Reports

Sample Code:

-----------------------
g_m_cnnRAM.BeginTrans
ChangeClosingStock // The Function Which Holds Views

crReports.SQLQueryString = Select LotNo, Variety, Cl_Kgs, Value from ClosingStockView

frmViewer.Show
frmViewer.CRViewer1.ReportSource = crReports
g_m_cnnRAM.CommitTrans
frmViewer.CRViewer1.ViewReport
frmViewer.CRViewer1.Zoom (1)

------------------------

The Above is the Sample Code. After the CommitTrans, the ViewReport is Called. At this time if ClosingStockView is Altered, I Get the Someother Modified Data instead of my Data. If I give CommitTrans After ViewReport the System gets Hung.

Find me a solution for this.

Ashok.SSend me the code so that I can check