473,507 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does anyone know why CrystalReport doesn't ask for parameters?

Hello, I have CrystalReport with 2 input parameters StartDate &
EndDate. When I run this report in Preview in VS2005 environment,
everything is fine, I get a dialog windows asking to provide input
parameters. When I run it from the application - it doesn't ask for
parameters.

In the application I had to modify connection information to connect
to different sql servers in different environments (DEV, TEST, PROD).
And here I have 2 questions:

1) Why method myReport.SetDatabaseLogon("username", "password",
"server", "database") DOES NOT WORK? Never. Does not change server and
database. IT IS A BUG, RIGHT?

2) Because method above doesn't work, I had to write a bunch of code
to change connection information like this:

Public Sub RunReport()
Dim rpt As New TestReport
Dim cap As String = "Test Report"
Dim cinfo As ConnectionInfo = New ConnectionInfo
cinfo.ServerName = "SERVER1"
cinfo.DatabaseName = "DATABASE1"
cinfo.UserID = "USERNAME1"
cinfo.Password = "PASSWORD1"
SetDBLogonForReport(cinfo, rpt)
Dim viewer As New ReportViewerForm(rpt, cap)
Me.mdiParent.ActivateChildForm(viewer)
End Sub

Private Sub SetDBLogonForReport(ByVal cinfo As ConnectionInfo, ByVal
rpt As ReportDocument)
For Each tbl As CrystalDecisions.CrystalReports.Engine.Table In
rpt.Database.Tables
Dim loginfo As TableLogOnInfo = tbl.LogOnInfo
loginfo.ConnectionInfo = cinfo
tbl.ApplyLogOnInfo(loginfo)
Next
End Sub

What happens when I run the report from the application - connection
information is changed, but the report doesn't ask for input
parameters at all. No Input Parameters Dialog box appear.

I anyone had a similar problem and knows the resolution, please help.
Thanks.

Mar 27 '07 #1
0 1352

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

Similar topics

0
1586
by: s-galit | last post by:
hi, i have a formula parameter in my crystalReport how can i initalize the parameter so that in every line in the crystalReport the parameter will have a different string? how to get to line in...
2
1948
by: Vlatko | last post by:
I have made a simple application in C# that prints a txt file using CrystalReport. On my PC everything works fine but when I run my app on another PC it collapses. I get message: "Cannot find...
0
1089
by: David Dvali | last post by:
Hello. I have some strange problem and will be very thankful if anybody will help me to solve it. In my ASP.NET web form I have used CrystalReport to produce some report, now I want to export...
0
1028
by: David Dvali | last post by:
Hello. I have some strange problem and will be very thankful if anybody will help me to solve it. In my ASP.NET web form I have used CrystalReport to produce some report, now I want to export...
0
1561
by: agcabutotan | last post by:
Hi to everyone. I am new in this thread, please help me. I'm having difficulty with CrystalReport.Net. I have a completed project written and compiled in VB.Net (and I used CrystalReport.Net in...
0
1223
by: partybob99 | last post by:
I dont know why this is so difficult for me, but I've looked literally everywhere on how to create a embedded crystal report in ASP.NET and then access it using the crystal report viewer. Here...
0
2088
by: PriyaManasarovar | last post by:
Can someone help how to pass parameters to a crystal report using a Crystal report object? I am using a console application & hence crystal report viewer cannot be used. And i need to pass the...
55
6151
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
1
1805
by: mhsasono | last post by:
Hi all, Has anybody experienced with CrystalReport? My question is: Does CrystalReport have capability to print the Microsoft Word document? Reason: I want to know CrystalReport capability...
0
7223
marktang
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,...
0
7110
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...
0
7314
Oralloy
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,...
0
7372
jinu1996
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...
1
7030
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...
0
5623
agi2029
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,...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
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...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.