473,394 Members | 1,845 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,394 software developers and data experts.

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
..DisplayGroupTree property.

crystalReportViewer1.DisplayGroupTree = false;
crystalReportViewer1.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(object sender, System.EventArgs e)

{

//Must pick up parameters first

Form planProd = new PlanProd();

planProd.ShowDialog();

//Use the viewer object to create plannerCode

rpt1303 myReport = new rpt1303();

//Step 1: assign report object to viewer

crystalReportViewer1.ReportSource = myReport;

//Step 2: reference parameterFields collection

parameterFields = crystalReportViewer1.ParameterFieldInfo;

//Step 3: reference the parameterField

parameterField = parameterFields["plannerCode"];

//Step 4: create a parameterValue object

parameterDiscreteValue = new ParameterDiscreteValue();

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

parameterDiscreteValue.Value = PlanProd.globalPlannerCode;

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

parameterField.CurrentValues.Add(parameterDiscrete Value);

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

crystalReportViewer1.DisplayGroupTree = false;

crystalReportViewer1.Zoom(75);

}
Nov 16 '05 #1
0 1222

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

Similar topics

0
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...
3
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...
0
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...
0
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...
0
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...
1
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....
19
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...
12
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...
0
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...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
0
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
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
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...

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.