473,657 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Report with parameter problem -Pls help

Hello everybody,
I am trying to create a web application to generate Crystal Report with
Parameters. However I noticed that
ReportDocument. Load is used twice when the parameter page is loaded .
1) The first time ReportDocument. Load is used when the Crystal Report is
loaded and the parameter page is created.
2) The second time the ReportDocument. Load is again used when the user
enters the parameters in the parameters page.
My problem is I do not want the ReportDocument. Load to be used twice along
with the Parameter table . Would be greatful if anyone can help me with any
solution. The code is written below.. I have also used the post back method
but gives an error that object Report document not instantiated.


private void Page_Load(objec t sender,System.E ventArgs e)
{
(if(!Page.IsPos tBack)

string reportname= "C:\ReportWithP arameter.rpt"
LoadReportName( reportname)
)

}
private void LoadReport(stri ng reportName)

{
crDoc=new CrystalDecision s.CrystalReport s.Engine.Report Document();
crDoc.Load(repo rtName);

CrystalDecision s.CrystalReport s.Engine.Parame terFieldDefinit ions
crParamFieldDef initions = crDoc.DataDefin ition.Parameter Fields;
// create the table to hold the controls
Table table = new Table();
table.Width = 300;
table.BorderWid th=1;
table.BackColor = Color.LightGray ;
table.BorderCol or = Color.Gray;
table.CellSpaci ng = 10;
// table.GridLines = GridLines.Horiz ontal;
string paramName;

TableRow summaryRow = new TableRow();
TableCell summaryCell = new TableCell();
ParamTable.Rows[0].Cells[0].Controls.Add(t able);

Session["Report"] = crDoc;
}

}
Pls guide...

Rahil

--
Message posted via http://www.dotnetmonster.com
Nov 19 '05 #1
1 1940
Hi Kapil,

From your code, I can't find ReportDocument load twice.
Could you give more info?

Elton Wang
el********@hotm ail.com

-----Original Message-----
Hello everybody,
I am trying to create a web application to generate Crystal Report withParameters. However I noticed that
ReportDocument .Load is used twice when the parameter page is loaded .1) The first time ReportDocument. Load is used when the Crystal Report isloaded and the parameter page is created.
2) The second time the ReportDocument. Load is again used when the userenters the parameters in the parameters page.
My problem is I do not want the ReportDocument. Load to be used twice alongwith the Parameter table . Would be greatful if anyone can help me with anysolution. The code is written below.. I have also used the post back methodbut gives an error that object Report document not instantiated.

private void Page_Load(objec t sender,System.E ventArgs e)
{
(if(!Page.IsPo stBack)

string reportname= "C:\ReportWithP arameter.rpt"
LoadReportName (reportname)
)

}
private void LoadReport(stri ng reportName)

{
crDoc=new CrystalDecision s.CrystalReport s.Engine.Report Document();crDoc.Load(rep ortName);

CrystalDecisio ns.CrystalRepor ts.Engine.Param eterFieldDefin itionscrParamFieldDe finitions = crDoc.DataDefin ition.Parameter Fields;

// create the table to hold the controls
Table table = new Table();
table.Width = 300;
table.BorderWi dth=1;
table.BackColo r = Color.LightGray ;
table.BorderCo lor = Color.Gray;
table.CellSpac ing = 10;
// table.GridLines = GridLines.Horiz ontal;
string paramName;

TableRow summaryRow = new TableRow();
TableCell summaryCell = new TableCell();
ParamTable.Row s[0].Cells[0].Controls.Add(t able);

Session["Report"] = crDoc;
}

}
Pls guide...

Rahil

--
Message posted via http://www.dotnetmonster.com
.

Nov 19 '05 #2

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

Similar topics

0
1697
by: Tim Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool, or in the code) works fine. However, when I try to add any parameter through the record selection formula and/or the report parameters method, the report crashes. I have tried each of the methods:
0
1437
by: murlbrown | last post by:
I have built a report using Crystal Report 8.0, which is set to get its data from a MS SQL Stored Procedure with 1 Parameter(smalldatetime). I can get the report to display in crystal with data, and can execute the sp in a query and get returned data. However, I can not get the report to load into the Crystal Report Viewer on the asp.net form. I am using a modal dialog window(asp.net webform) to pop up and ask them the parameter for the...
0
1702
by: william_dudek | last post by:
I have a crystal report that works fine when run through Crystal, which I am triying to incorporate into a crystal report viewer. The report takes 1 parameter, which is either 0 or 1. If the paremeter is 1 then a filter is placed onto the data by the database server (Oracle PL/SQL procedure in a package), parameter is 0 then it doesn't use the filter. When I run this with the filter on the program works fine and the report is displayed,...
0
3634
by: Dean Sabella | last post by:
Hi, I was trying to run a crystal report in the .net sample application given at: http://support.crystaldecisions.com/communityCS/FilesAndUpdates/ cppnet_win_subreport_basic.exe.asp (I've reproduced the relevant file below.)
0
1715
by: Timmy Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool, or in the code) works fine. However, when I try to add any parameter through the record selection formula and/or the report parameters method, the report crashes. I have tried each of the methods:
12
10386
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
1802
by: lrobo01 | last post by:
I'm having a problem with Crystal report.net with ASP.NET. The problem occurs when exporting the report. The report uses a discrete parameter with multiple values. When the report is loaded into the crystal report view it shows all the values from the discrete parameter. But when I export the report it only shows the values from the last discrete parameter value enter. My code is listed below:
0
2803
by: lrobo01 | last post by:
I'm having a problem with Crystal report.net with ASP.NET. The problem occurs when exporting the report. The report uses a discrete parameter with multiple values. When the report is loaded into the crystal report view it shows all the values from the discrete parameter. But when I export the report it only shows the values from the last discrete parameter value enter. My code is listed below:
0
5533
by: zellipa | last post by:
I am trying to imbed crystal in oracle. I got the following steps from the web. when i try to run the created from , iget the error frm-41344. Any suggestions. Regards, Zellipa STEPS TO display the Crystal Report in Oracle Forms 6i:
1
2305
by: pupilstuff | last post by:
hi guys i wan to make dyanmic crystal report according to values which i checked from check box thats all i did 1. I made data set having data table name "Customer" 2 i put four columm id,name ,age ,sex 3. then i made crystal report and drag those columm in crystal report 4 thn i drag crystal report viwer 5 thn i write tht code at button click
0
8413
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...
1
8513
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,...
0
8617
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
7352
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
6176
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
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
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
2742
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
1733
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.