472,790 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,790 software developers and data experts.

Issue regarding report load

Hi to all,

Well, I am working on dotnet 2005 with crystal reports 10 and backend
as sql server.
I am facing a problem while loading a report.
Actually the issue is, when I load report it takes huge time to load a
report whether it is a 1 page report or thousands page report.
We have migrated the project from VB to VB.NET, in VB its working fine
because in that report is loaded page by page but in VB.NET whole
report is loaded in one go.

I want to improve the performance and want that the report should be
loaded fast in few seconds.
I have used one function which is loading the report every time for
every form.
I am attaching here the function also.
If anyone can provide me with the solution.

Thanks in advance

Here is the function.

Public Sub InitReportLogInfo(ByVal strReportFileNm As String, Optional
ByVal strParameter As String = "")

flag = True
Dim LogOnInfo As New TableLogOnInfo()
Dim strFile As String
Dim intCounter As Integer
Dim strParValPair() As String
Dim index As Integer
Dim mrdocls As New ClsResultSetDB
Dim strsql As String
Dim paraValue As New
CrystalDecisions.Shared.ParameterDiscreteValue 'Parameter value object
of crystal report parameters used for adding the value to parameter.
'Dim strVal() As String
'Dim currValue As
CrystalDecisions.Shared.ParameterValues 'Current parameter
value object(collection) of crystal report parameters.
'Dim mySubReportObject As
CrystalDecisions.CrystalReports.Engine.SubreportOb ject 'Sub
report object of crystal report.
Dim mySubRepDoc As New
CrystalDecisions.CrystalReports.Engine.ReportDocum ent 'Sub
report document of crystal report.

Try

strFile = mP_strReportLocation & strReportFileNm & ".rpt"
mP_strReportFileName = strReportFileNm

If IsNothing(mP_ObjCrystalReport) = True Then
mP_ObjCrystalReport = New ReportDocument
End If
mP_ObjCrystalReport.Load(strFile)
''Code Added By STS as on 23-
Feb-2007============================
If strReportFileNm <"rpt_loc_stk01500" And
strReportFileNm <"rpt_loc_SPL00700" Then
mP_ObjCrystalReport.Refresh()
End If
''Code Ends
Here============================================== ====
intCounter =
mP_ObjCrystalReport.DataDefinition.ParameterFields .Count 'Check if
there are parameters or not in report.
'As parameter fields collection also picks the selection
formula which is not the parametermeter, so if total parameter count
is 1 then we check whether, its a parameter or selection formula.
If intCounter = 1 Then
If
InStr(mP_ObjCrystalReport.DataDefinition.Parameter Fields(0).ParameterFieldName,
".", CompareMethod.Text) 0 Then
intCounter = 0
End If
End If
'If there are parameters in report and user has passed
them then split the
'parameter string and Apply the values, to there concurent
parameters.
If UCase(mP_strReportFileName) = "RPT_BOM00900" Then
If intCounter 0 And Trim(strParameter) <"" Then
strParValPair = strParameter.Split("&")
For index = 0 To UBound(strParValPair)
paraValue.Value = strParValPair(index)
mP_ObjCrystalReport.SetParameterValue(index,
paraValue.Value)
Next
End If
End If
With mP_ObjCrystalReport.DataDefinition.FormulaFields
.Item("Page").Text = "'" & GetLabelDes(83) & "'"
.Item("Date").Text = "'" & GetLabelDes(84) & "'"
.Item("Time").Text = "'" & GetLabelDes(85) & "'"

If Not IsNothing(mP_LocfrmRep.UdcViewPrint1.FormName)
Then
If mP_LocfrmRep.UdcViewPrint1.FormName.ToString()
= "frmCPS00500" Then
strsql = "select [function],Process_flg from
functionctl where [Function]='TPS'"
If Not mrdocls.GetResult(strsql,
AppFunctionModule.mP_EnmResultType.IrdOpenKeyset,
AppFunctionModule.mP_EnmLockType.IrdConcurLock) Then Exit Sub
If mrdocls.GetValue("process_flg") = "1" Then
.Item("TPS").Text = "'" &
GetLabelDes(1362) & "'"
Else
.Item("TPS").Text = "' '"
End If
End If
End If
''Code Ends Here
End With

Call SetReport(LogOnInfo, mP_ObjCrystalReport,
strReportFileNm)
Catch ex As Exception
MsgBox(ex.Message)
flag = False
End Try
End Sub

Waiting for the positive reply ASAP.

Apr 11 '07 #1
0 1449

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Travis | last post by:
Hi , I am creating a .net interface and emded the crystal report into my project. Now user request the CR to be export in excel format. It can be done but now seems like when user run the report...
0
by: Simon | last post by:
Hi I try to open a CR report file located on the network path from a web form developed with vs2003 and CR for Visual Studio, but the Load method of ReportDocument object always return error. ...
5
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
14
by: Mark O'Flynn | last post by:
I would like some advice regarding implementing inheritance using vb.net. I have an application written in vb6 that I am rewritting from the ground up in vb.net to take full advantage of .net,...
0
by: billygotee | last post by:
Hi, I posted an issue previously that was entirely accurate. I have a master report called "MasterReport.rdlc" and a subreport called "Subreport.rdlc". MasterReport.rdlc has a single subreport...
6
by: Simone | last post by:
Hello Here is my issue, I created a crystal report using a data set from my xsd. Then I created a page with the crystal report viewer control and bound the report to it. When I try to view...
1
by: sravanthi29 | last post by:
Hi, I have a .aspx page and a crystal report named prernaweb.rpt. .aspx page Page_Load { CrystalDecisions.CrystalReports.Engine.ReportDocument crReportDocument = new...
0
by: MattGaff | last post by:
I have a Web server running Reporting Services which has (all of a sudden) dropped in performance. When a user logs in, they are presented with an initial report (Main Menu) which provides links to...
0
by: swatii | last post by:
I am developing application in c#.net and I am using crystal reports. I want to dynamically load crystal report in report document so that from the same form I can access all the reports. for this...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.