473,670 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal parameters revisited

Dear NG,

I am learning more about Crystal Reports (CR) running under .NET. Please
find my latest code at the end of this post. Here are my issues:

First, and most important, is Crystal Reports (CR) the right tool for
printing reports? I have well over 100 reports in my application and I
would like to use the best tool for the job.

Second, if CR is the right tool, am I using it correctly? Because it was
easy to do, I started using CR directly against the SQL database. This
seems to be called the "Pull" technique by books on CR. For 90% of my
reports this will work. For the last 10% I will have to reformat and/or
restructure the data in a # program. At this point I could either create a
temporary SQL table and print the report use the same "Pull" technique I
have been using on the 90%, or send it to CR using the "Push" technique. I
have not yet learned the "Push" technique. A good example of such a report
in my ERP application would be an indented Bill of Materials report. This
is a report that follows a tree structure rather than a simple listing of
records (rows) in a table.

Third, moving the .Zoom(75) property to the end of the report made the
message that appears in the bottom of the window say 75%, but the view was
at 100%. I can use the icons at the top of the window to force it to 75%.
Other properties now set by code take effect correctly such as the
..DisplayGroupT ree property.

crystalReportVi ewer1.DisplayGr oupTree = false;
crystalReportVi ewer1.Zoom(75);

Finally, is the report load event the proper place for this code? I have a
feeling that this might NOT be the right place for this code. This is
because the default request for the parameter dialog box comes up BEFORE
this load event is entered!

As ever, thank you for your help,

Cheers,

Bob

--
Robert Schuldenfrei
S. I. Inc.
32 Ridley Road
Dedham, MA 02026
bo*@s-i-inc.com
781/329-4828

private void Form1303_Load(o bject sender, System.EventArg s e)

{

//Must pick up parameters first

Form planProd = new PlanProd();

planProd.ShowDi alog();

//Use the viewer object to create plannerCode

rpt1303 myReport = new rpt1303();

//Step 1: assign report object to viewer

crystalReportVi ewer1.ReportSou rce = myReport;

//Step 2: reference parameterFields collection

parameterFields = crystalReportVi ewer1.Parameter FieldInfo;

//Step 3: reference the parameterField

parameterField = parameterFields["plannerCod e"];

//Step 4: create a parameterValue object

parameterDiscre teValue = new ParameterDiscre teValue();

//Step 5: assign a value to the object from dialog box displayed first

parameterDiscre teValue.Value = PlanProd.global PlannerCode;

//Step 6: add the parameterValue object to the CurrentValues collection

parameterField. CurrentValues.A dd(parameterDis creteValue);

//MessageBox.Show ("Planner Code: " + PlanProd.global PlannerCode, "Info");

crystalReportVi ewer1.DisplayGr oupTree = false;

crystalReportVi ewer1.Zoom(75);

}
Nov 16 '05 #1
0 1240

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

Similar topics

0
1513
by: murl | last post by:
I have built a crystal report using crystal9.0 that is linked to a stored procedure built in sql2k, which requires 2 parameters beginningdate(smalldatetime),and endingdate(smalldatetime). When the parameters are met in crystal the report shows up correctly with no problems, but when the report is displayed using the crsyatal report viewer in my c# app, the report is not displayed at all after crystal prompts for the parameters. The viewer...
3
2614
by: Vivek | last post by:
Hi All, I am using .Net studio C sharp windows application (WinForm). Crystal reports r running fine.. I want to diplay report with conditions... Want to pass parameters to CR.. e.g. Start Date and End Date??? Thanx In Advance Vivek Kumbhojkar
0
4894
by: Craig Faulkner | last post by:
I have been fighting through my first crystal report in VS2003.NET and have made some headway. Here is what I've done: 1. Created a crystal report in VS2003 from a SQL stored procedure with parameters through the GUI. 2. Finally got past the logon failure error to display the report using the viewer. I assume that default parameters are being used since it does display some data and the SP won't run without being passed some values.
0
8754
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource for a Crystal Report. The method has a single argument which represents a parameter required by the Stored Procedure. When I generate the report in Crystal and run it using the class I built, it works fine. I've tried it with parameters and...
0
2063
by: Henry | last post by:
Using ideas provided by some of you I was able to figure out how to get the names of the parameters fields of a crystal report specified at run time. The code below just basically puts the data into a comboBox. One thing I noticed, however, is that this method shows me both the parameters used by the main report and parameters used by the sub-report(s).
1
2520
by: raf_z | last post by:
Hi, I'm running a website with Asp.NET, and on one of the pages i have a crystal report with 3 user-populated parameters. However, not all params might be selected. Example: Parameters: 1. EmployeeID 2. First Name 3. Last Name
19
3869
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set ReuseParameterValuesOnRefresh="True" in a viewer, but it still doesn't work. Did anyone run into this problem. What's the solution? Please help. Thank you
12
10396
by: Bill Nguyen | last post by:
What's the VB syntax to run the CR report using the following SP? I use CrystalreportViewer and ReportDocument. Thanks Bill Here's the SP in SQLserver 2K: CREATE proc mysp_ReportSubmission @salesdate as varchar(20),
0
1709
by: Linda W. | last post by:
Hi, I would appreciate any insight into the following issue.. I have an asp.net application with crystal reports being displayed.. All works fine from my IDE & I am trying to move the app to a test server. The report parameters are input on the first aspx page and I store them in the Session object & use a Server.Transfer() to get to the page that displays the crystal report. The report parameters are all successfully passed to...
0
8471
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
8386
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
8903
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
8815
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
8661
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...
0
7421
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, 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...
1
6216
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...
0
4213
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...
1
2802
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

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.