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)