_printrb.p and it`s RBFILTER

Storzum

Member
Hello again.
:blush:

Is there a way to feed the RBFILTER-parameter with a "INNER-JOIN-Statement"?
When I use a query on only 1 table it works fine.
But if I use INNER-JOIN to select records depending to a second table, I get an error when I start the _printrb.p - Program.
Is there some other program, which I can use to open a report?

Greets
Storzum
 

bendaluz2

Member
You specify the inner join within the "joins" screen in the "database" menu within report builder itself. then in the filter, you specify the where caluse you require
 

Storzum

Member
But both query-Strings are dynamic.

That means that they can change during the program-runtime.
But in the report I can only put static querys??!
 

bendaluz2

Member
In report builder, specify the join where clause and the type of join (inner, etc..)

e.g. (Based on Sports2000)

Master Table: Customer

Add a new inner join to Order with the field cust-num

Then, in the filter you pass to report builder specify the where clause you want (the join you specified in the report builder will still be in force)

' Customer.name begins "A" AND Order.carrier begins "B" '

This effectively runs the following query for the report

Code:
for each Customer
    where Customer.name begins "A"
    no-lock:
    for each Order
        where Order.cust-num = Customer.cust-num
          and Order.carrier begins "B"
        no-lock:
        /* Report these records here */
    end.
end.
 
Top