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 InitReportLogIn fo(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
CrystalDecision s.Shared.Parame terDiscreteValu e 'Parameter value object
of crystal report parameters used for adding the value to parameter.
'Dim strVal() As String
'Dim currValue As
CrystalDecision s.Shared.Parame terValues 'Current parameter
value object(collecti on) of crystal report parameters.
'Dim mySubReportObje ct As
CrystalDecision s.CrystalReport s.Engine.Subrep ortObject 'Sub
report object of crystal report.
Dim mySubRepDoc As New
CrystalDecision s.CrystalReport s.Engine.Report Document 'Sub
report document of crystal report.
Try
strFile = mP_strReportLoc ation & strReportFileNm & ".rpt"
mP_strReportFil eName = strReportFileNm
If IsNothing(mP_Ob jCrystalReport) = True Then
mP_ObjCrystalRe port = New ReportDocument
End If
mP_ObjCrystalRe port.Load(strFi le)
''Code Added By STS as on 23-
Feb-2007=========== =============== ==
If strReportFileNm <"rpt_loc_stk01 500" And
strReportFileNm <"rpt_loc_SPL00 700" Then
mP_ObjCrystalRe port.Refresh()
End If
''Code Ends
Here=========== =============== =============== =========
intCounter =
mP_ObjCrystalRe port.DataDefini tion.ParameterF ields.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_ObjCry stalReport.Data Definition.Para meterFields(0). ParameterFieldN ame,
".", CompareMethod.T ext) 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_strRep ortFileName) = "RPT_BOM009 00" Then
If intCounter 0 And Trim(strParamet er) <"" Then
strParValPair = strParameter.Sp lit("&")
For index = 0 To UBound(strParVa lPair)
paraValue.Value = strParValPair(i ndex)
mP_ObjCrystalRe port.SetParamet erValue(index,
paraValue.Value )
Next
End If
End If
With mP_ObjCrystalRe port.DataDefini tion.FormulaFie lds
.Item("Page").T ext = "'" & GetLabelDes(83) & "'"
.Item("Date").T ext = "'" & GetLabelDes(84) & "'"
.Item("Time").T ext = "'" & GetLabelDes(85) & "'"
If Not IsNothing(mP_Lo cfrmRep.UdcView Print1.FormName )
Then
If mP_LocfrmRep.Ud cViewPrint1.For mName.ToString( )
= "frmCPS0050 0" Then
strsql = "select [function],Process_flg from
functionctl where [Function]='TPS'"
If Not mrdocls.GetResu lt(strsql,
AppFunctionModu le.mP_EnmResult Type.IrdOpenKey set,
AppFunctionModu le.mP_EnmLockTy pe.IrdConcurLoc k) Then Exit Sub
If mrdocls.GetValu e("process_flg" ) = "1" Then
.Item("TPS").Te xt = "'" &
GetLabelDes(136 2) & "'"
Else
.Item("TPS").Te xt = "' '"
End If
End If
End If
''Code Ends Here
End With
Call SetReport(LogOn Info, mP_ObjCrystalRe port,
strReportFileNm )
Catch ex As Exception
MsgBox(ex.Messa ge)
flag = False
End Try
End Sub
Waiting for the positive reply ASAP. 0 1503 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 in .Net interface , the query
load once. And when user click to export to excel from CR , then it loads the
query again.
I plan to store the data into the cache , after the user run the report
from the .net interface , the data load into the...
|
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.
---------------------
Load report failed.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
|
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 applications.
I am testing an upgrade of all of the sites and have converted the main root
site...although not necessarily fixed any issues.
I move on instead and converted one of the virtual roots that is a seperate
|
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, but I have encountered a design
issue implementing inheritance.
To explain my question, I will use an example. I have a Person class, with
properties such as ID, Name, Phone, Address etc. I then have a Manager
class that inherits Person and...
|
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
with name Subreport and refers to Subreport.rdlc. I add a data source
in the VS 2k5 report environment to Subreport.rdlc. This data source
has name "SubreportInfo" and is an object of type SubreportInfo.
First, say I set my...
| |
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 the report on the browser I get a logon page even
though my dataset has a connection string saved within it. When I
preview the data in the dataset I see it no problem. however the
report doesn't seem to know that the dataset is there or that the
|
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 CrystalDecisions.CrystalReports.Engine.ReportDocument();
crReportDocument.Load("d:\\webrptprerna\\prernaweb.rpt");
|
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 other reports. This menu used to load up in less than a second now it takes 4-5.
If you click on any of the links to other reports from this menu, All of them used to load in less than 7 seconds and some were less than 3 seconds.
Now they can be...
|
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 i am using
ReportDocument rept=new ReportDocument();
rept.Load("genebank.inventory_display");
using Asp.net we can write server.MapPath(@"genebank/inventory_display")
to get path of crystal report.what is the way to specify relative...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |