Print Page | Close Window

Linking Parameters in Crystal Reports XI

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=10178
Printed Date: 16 May 2024 at 10:21am


Topic: Linking Parameters in Crystal Reports XI
Posted By: Dodo
Subject: Linking Parameters in Crystal Reports XI
Date Posted: 03 Jun 2010 at 10:24am

I have a project and part of this project it is in Crystal Reports

It is not required to use VB/VB.Net code just Crystal Reports and Sql commands (retrieving data from the database)

The interface is something like this

And I have 2 Tables:

PurchaseOrder

- PurcaseOrderID

PurcaseOrderLines

-PurchaseOrderID

-PurcaseOrderLineID

-PartID

-RevisionID

I want to  give the user the option to enter the data for OrderID and then to link this parameter with PartID (retrieve the data from the table-database)

Something like :

SELECT PartID
FROM
PurchaseOrdersLines

WHERE EXISTS
  (select
PartID,PartRevisionID

    from PurchaseOrderLines
    where
PurhcaseOrderLines.PurchaseOrderID = PurchaseOrders.PurchaseOrderID

    And  PurcaseOrderLines. PurchaseOrderID= {?OrderID}

 

 

Or

 

 Select PartID

From PurchaseOrdersLines INNER JOIN PurchaseOrders ON PurchaseOrders.[PurchaseOrderID] = PurchaseOrdersLines.[PurchaseOrderID]

 Where PurchaseOrders.[PurchaseOrderID]={?@OrderID}

 

Thank you  in  advance




Replies:
Posted By: Emir_W
Date Posted: 28 Jun 2010 at 10:00pm
you can try this:
 
select
   b.partid, a.ivdocnbr, b.trxqty
from PurchaseOrdersLines b
join PurchaseOrders a on b.purchaseorderID=a.purchaseorderID
where b.itemnmbr={PartID?}
 
 
hope it help.
 
 
 


-------------
Emir W


Posted By: Dodo
Date Posted: 02 Jul 2010 at 7:39pm

Thanks, actually one solution is to create a dynamic parameter with a cascading list of values (Prompt group)




Print Page | Close Window