473,378 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 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 1482

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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.