Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR-11 Two data bases sharing info

Status
Not open for further replies.

clocktower

IS-IT--Management
Oct 10, 2005
6
US
OK I'm a clueless newbee when it comes to Crystal but is this possible.

I have a report that gives me some information based on date that including order numbers.

I also have a second report (on a different data base) that breaks down the order into different zones to be delivered based on order number.

What I would like to do is to take the order number from the first report and use it as a parameter to generate the second report.

Does this have something to do with declaring a global variable?

Thanks in advance.
 
Make copies of each report.

Open the Order number report and insert the other report as a subreport (under Insert), and link via the order number, you should get the deisred result then.

-k
 
Since the order number is repersented by different names in each database (for example "ordernumber" and "ornumber") and the ordernumber in database 1 may also include a revision number (12345-01) can they be linked?
 
Use a formula to convert the order number in database 1 like:

left({table.ordernumber},5)

Then when linking the subreport to the main, link using the formula to the 5-digit order number.

-LB
 
If the lengths might vayr, you'll need a formula to omit the dash (just did something similar for someone else):

whileprintingrecords;
stringvar Order:={table.order_number};
stringvar NewOrder:="";
numbervar x;
numbervar HyphenCnt:=0;
For x:=1 to len(Order) do(
if mid(Order,x,1) = "-" then
HyphenCnt:=HyphenCnt+1;
if HyphenCnt < 1 then
NewOrder:=mid(Order,x,1)
);
NewOrder

Link this formula to the order in the subreport.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top