Data Connectivity
 Crystal Reports Forum : Crystal Reports .NET 2003 : Data Connectivity
Message Icon Topic: Linking Parameters in Crystal Reports XI Post Reply Post New Topic
Author Message
Dodo
Newbie
Newbie


Joined: 03 Jun 2010
Online Status: Offline
Posts: 2
Quote Dodo Replybullet Topic: Linking Parameters in Crystal Reports XI
    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

IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet 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
IP IP Logged
Dodo
Newbie
Newbie


Joined: 03 Jun 2010
Online Status: Offline
Posts: 2
Quote Dodo Replybullet 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)

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.066 seconds.