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

ASP.NET(VB) Passing Parameter Value to Crystal Report

112 100+
Hi All,
I have mainpage (POselect.aspx). language VB
In that page i have a textbox (txtPOId) and command button(Button1)
When i press then button its should send the textbox value to Crystal report and open parameter.

I have crystal report (CrystalReport1) that display the matched records what client entered in the textbox from main page.

Now my crystal report displaying all the records. but i want to display only specific records.

One more thought
Can i filter the records from store procedure. Supply the Main page textbox value and get the result in crystal report. can i do this way? Give me example how?
Here my SP
----------------------

Expand|Select|Wrap|Line Numbers
  1.  ( @poid nvarchar (25) 
  2. )
  3. as
  4.  
  5. SELECT POD.POD_POLineNbr, POI.POI_StatusCode, POI.POI_LineNbrTypeCode, 
  6. POI.POI_Reference,POI.POI_ItemName, POI.POI_UnitMeasure, POD.POD_RequiredDate, 
  7. POD.POD_Promisedate, POR.POR_ReceiverDate, POD.POD_RequiredQty, POR.POR_ReceiptQty, 
  8. POD.POD_POUnitPrice, ( POD.POD_POUnitPrice*POR.POR_ReceiptQty) As Amt FROM POD INNER JOIN POR ON 
  9. POD.POD_RequiredDate = POR.POR_RequiredDate AND POD.POD_PurchOrderID = POR.POR_PurchOrderID 
  10. INNER JOIN POI ON POD.POD_POLineNbr = POI.POI_POLineNbr AND 
  11. POR.POR_POLineNbr = POI.POI_POLineNbr AND POD.POD_PurchOrderID = POI.POI_PurchOrderID 
  12. WHERE (POD.POD_PurchOrderID like @POID)
  13.  
Apr 15 '08 #1
1 5788
imtmub
112 100+
I have found the solution. I m posting for the reference

Steps to be done at Report file(.rpt file)

1.Create a Report file(.rpt) and bind it from your database.

2.Go to Crystal Reports->Field Explorer->Parameter Fields. Right Click and create a new parameter field. There specify the parameter Name(eg. POID), Value Type as Number/String(Depend on ur type) and at Option Check Discrete Values and finally give Ok.

3. Go to Crystal Reports->Report->Select Expert and select the table field which you want to use as parameter(eg. PurchaseOrderNumber). Then u can find a dropdown list, select "is equal to" from the dropdown list. From the next dropdown list select the parameter name(eg. ?POID).


Steps to be done at Web page(.aspx file)

1.Create a web page and place the controls CrystalReportViewer and CrystalReportSource from the toolbox.

2.Above the CrystalReportViewer create a textbox(which to input the parameter value Ordernumber) and submit button.

3. At CrystalReportSource select the .rpt file in properties.


4.Then go to CrystalReportSource ->Report->Parameters(Collection). Click Add button,there u can find Parameter Name combo box. Select your parameter name(POID).

5.Then check the "Specify Control ID" and in the following combo box select the Text box ID which you have created to input the parameter value.

At CrystalReportViewer change the value of "Enable Parameter Prompt" to False.


Thats all. When this page is load you just need to input the parameter value(Purchaseordernumber) in the textbox. It will report data according to your input value.




Hi All,
I have mainpage (POselect.aspx). language VB
In that page i have a textbox (txtPOId) and command button(Button1)
When i press then button its should send the textbox value to Crystal report and open parameter.

I have crystal report (CrystalReport1) that display the matched records what client entered in the textbox from main page.

Now my crystal report displaying all the records. but i want to display only specific records.

One more thought
Can i filter the records from store procedure. Supply the Main page textbox value and get the result in crystal report. can i do this way? Give me example how?
Here my SP
----------------------

( @poid nvarchar (25)
)
as

SELECT POD.POD_POLineNbr, POI.POI_StatusCode, POI.POI_LineNbrTypeCode,
POI.POI_Reference,POI.POI_ItemName, POI.POI_UnitMeasure, POD.POD_RequiredDate,
POD.POD_Promisedate, POR.POR_ReceiverDate, POD.POD_RequiredQty, POR.POR_ReceiptQty,
POD.POD_POUnitPrice, ( POD.POD_POUnitPrice*POR.POR_ReceiptQty) As Amt FROM POD INNER JOIN POR ON
POD.POD_RequiredDate = POR.POR_RequiredDate AND POD.POD_PurchOrderID = POR.POR_PurchOrderID
INNER JOIN POI ON POD.POD_POLineNbr = POI.POI_POLineNbr AND
POR.POR_POLineNbr = POI.POI_POLineNbr AND POD.POD_PurchOrderID = POI.POI_PurchOrderID
WHERE (POD.POD_PurchOrderID like @POID)
Apr 16 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul M. | last post by:
Hi, I am trying to populate 3 paramters in an asp .net (vb) page redirect, the first one is ok ok and gets populated by the other two get inserted into the url for the redirect as empty strings!...
0
by: Archana | last post by:
I'm using .net crystal reports export the reports to the html format. When in debug mode and viewing the html file through my WEb Application the following exception is thrown when I try to using...
3
by: Dmitry Karneyev | last post by:
Hi! I need to deploy .NET application (ADO.NET + Crystal Reports) in local intranet. All assemblies of application will be shared in the folder on the server so all users can execute this...
6
by: Jerome Cohen | last post by:
I need to implement a simple application that listens for web requests on a well-known URL, grab the request , which is an XML document, and send as respnse an XML document. each client sends a...
0
by: Monali | last post by:
Hi, I created a ASP.NET crystal reports web site in VS 2005. I wanted to display the data in a DataSet in the Crystal Reports viewer control. I am getting the DataSet from another dll. The...
0
by: Brian Tkatch | last post by:
I think the VB .NET parameter has incorrect automatic argument when it comes to DECIMAL. That is, precision is never set. Example: CREATE a TABLE with a DECIMAL in it. Start a VB Project...
1
by: wtistang | last post by:
I developed an asp.net/crystal app in my local machine using the crystal reports which comes with VS 2003. Now I am planning to deploy it to a web server which support asp.net and crystal reports...
0
by: matvin | last post by:
When generating .NET Crystal Reports with Page Orientation as Landscape, a Blank page gets generated along with the report. But this is not the case when the page orientation is set with Portrait.Any...
0
by: blackburnj55 | last post by:
Hi I am inserting some records into my access database using asp.net vb script. The problem is that "Username" is set to "Not Null" in my database and so i get the following message returned. ...
1
by: Pipo Dyer | last post by:
Hello Everybody, I am Using @@IDENTITY from MS Access (YES-It is possible) using SqlDataSource -NO STORE PROC- in ASP.NET {VB CODE} to retrieve the ID of a inserted record. Please keep in mind I...
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: 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
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
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.