473,769 Members | 6,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot suppress parameter prompts at runtime (Crystal Report)

Report source is an SQLSERVER 2K store procedure. VB.NET application. Report
created by CR 8.5.
At runtime, I still had to click "CANCEL" to bypass the parameter prompts
before the report display correctly. Also, print option grayed out although
it was available at design time.
Thanks a million!
Bill

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

Below is the code:

crRptName = crRptPath & Trim(rptName)

Try

reportDocument1 .Load(crRptName )
Dim ParameterFields As CrystalDecision s.Shared.Parame terFields

Dim ParameterField0 As CrystalDecision s.Shared.Parame terField

Dim ParameterField1 As CrystalDecision s.Shared.Parame terField

Dim ParameterDiscre teValue0 As
CrystalDecision s.Shared.Parame terDiscreteValu e

Dim ParameterDiscre teValue1 As
CrystalDecision s.Shared.Parame terDiscreteValu e

ParameterFields = New CrystalDecision s.Shared.Parame terFields

ParameterField0 = New CrystalDecision s.Shared.Parame terField

ParameterField0 .ParameterField Name = "@salesdate "

ParameterField1 = New CrystalDecision s.Shared.Parame terField

ParameterField1 .ParameterField Name = "@inflag"

ParameterDiscre teValue0 = New CrystalDecision s.Shared.Parame terDiscreteValu e

ParameterDiscre teValue0.Value = rptParam0

ParameterDiscre teValue1 = New CrystalDecision s.Shared.Parame terDiscreteValu e

ParameterDiscre teValue1.Value = rptParam1

ParameterField0 .CurrentValues. Add(ParameterDi screteValue0)

ParameterField1 .CurrentValues. Add(ParameterDi screteValue1)

ParameterFields .Add(ParameterF ield0)

ParameterFields .Add(ParameterF ield1)

lblPrintWait.Te xt = "Loading report. Please wait..."

lblPrintWait.Vi sible = True

Me.Cursor = Cursors.WaitCur sor

With myCrystal.Cryst alReportViewer1

..ReportSource( ) = reportDocument1

..SelectionForm ula = mSelection

If rptParam0 <> "NA" Then

..ParameterFiel dInfo = ParameterFields

End If

'.ShowExportBut ton = True

'.ShowPageNavig ateButtons = True

..ShowPrintButt on = True

'.PrintReport()

..RefreshReport ()

End With

Me.Cursor = Cursors.Default

lblPrintWait.Vi sible = False

myCrystal.Windo wState = FormWindowState .Maximized

myCrystal.ShowD ialog()

Catch ex As Exception

MsgBox(ex.Sourc e & ": " & ex.Message)

End Try

Nov 20 '05 #1
0 991

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

Similar topics

0
1095
by: Vetril Group | last post by:
Respected sir, I created 3 parameters in Crystal Report, In my runtime form consits of main menu, if we click that menu we can data entry in the form, and if they click on the particular report the corresponding report will come. Now i come to my problem what are all the Items which i entered in data entry form it is not displayed in
1
1992
by: Mike Pettet | last post by:
I've just started using .NET and cannot create a basic Crystal Report. I have created an aspx page with a CrystalReportViewer web form on it. I defined (DataBindings)->ReportSource as the custom binding expression "C:\stats.rpt" which is a valid Crystal Report and this appears successfully on the Design view with the correct columns. However, when I try to see this page on the web, I get the error "Use ReportSource or DataBindings...
2
2212
by: Raj | last post by:
How to pass a Two Date parameter to a report at runtime using VB .NET -- Raj Kumar Mishra jcast Networks Ltd. New Delhi. India. 91-51678212,13,14
1
6400
by: Bill Nguyen | last post by:
Report source is an SQLSERVER 2K store procedure. VB.NET application. Report created by CR 8.5. At runtime, I still had to click "CANCEL" to bypass the parameter prompts before the report display correctly. Also, print option grayed out although it was available at design time. Thanks a million! Bill
13
5000
by: Brad | last post by:
I will also post this in the CR group but because I program in VB maybe somebody here might be able to help. I am working on a new project that incorporates a few forms. I just created my first form and I am assigning a variable to it here: Dim anrpt As New ArmbandNumbers When this line executes I get the error that "The System cannot find the file specified." and highlights MyBase.New in the report's vb language.
0
1085
by: Bill Nguyen | last post by:
When a CR report is exported/saved to a file, the screen briefly displays the record processing info. Is there anyway to suppress it? Thanks Bill
0
3703
by: Madhu_TN | last post by:
Hi All, I am new to this board. I am trying to create a Crystal Report viewer into a VS C++ Dot NET 2003 app ( This uses both managed and unmanaged code). I get the following compilation error: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\ cstringt.h(875): error C2664: 'PtrToStringChars' : cannot convert parameter 1 from 'unsigned char *' to 'const System::String __gc *' The code segemnt is:
4
3206
by: MarkTingson | last post by:
Hi guys, Is there a way to prevent "Enter Parameter Values" message box to pop during VB6 program runtime?I have created a program in VB6 that uses a Crystal report control. When I put a .parameter syntax, a dialog box always appear that says "Enter Parameter Values" before the report. Pls, I know you can help me with this. Thank you so much!!
1
2475
Shashi Sadasivan
by: Shashi Sadasivan | last post by:
Hi, I have bumped into this issue where my application (which consistently reads the database) has to also create a crsytal report when requested. The crystal repost uses the same connection string as the application (i parsed the connection string and set the ConnectionInfo) However, the crystal report fails to logon and gives an exception : Logon failed. Error in File Quote {E2D18712-BD5A-4EE7-867E-79F137EB549D}.rpt: Unable to connect:...
25
4460
by: DanicaDear | last post by:
I am trying my hand at my first ever Access report. It is based on a two parameter query (start date, end date). When I use the report wizard and click "view report" the report prompts me for the two queries. Great! However, when I close it and re-run the report, it prompts me for a third parameter: HOTSTICK_FAILURE.DATE_ENTERED. The first half is a table name; the second half is a table field name. The query this report is based off...
0
9589
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, 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...
0
9423
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,...
0
10222
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, 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...
0
10050
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 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...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
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...

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.