[unsolved] Is it possible to bind a column for every row of dataset 1 as parameter for dataset 2 ?

klhuiicil
Post time 2020-9-22 08:21:46 | Show all posts |Read mode Print Prev. thread Next thread

I have  template dataset 1  return many rows .
and set  template parameter to bind to parameter of template dataset 2 stored procedure .

However,  I find that it only use the first row value of dataset 1 for all row as parameter value for dataset 2.


I know the answer Seeking the best answerBest Answer worth10 money ,3 people have answered
Reply

Use magic Report

Recommends3

Sybil
Post time 2020-9-23 10:24:25 | Show all posts
hi,

    you can use dataset formula to get all values in one column https://help.fanruan.com/finereport/doc-view-850.html#3
    tablename.select(colname)
Reply
 Author| klhuiicil
Post time 2020-9-23 14:29:25 | Show all posts
Hi Sybil,
Got your meaning . But I think it may not meet our need .  our need is
on ds1,  we return let says 3 rows.  voucher1, voucher2, voucher3.

Then on ds2 ( which is stored procedure) and take one parameter voucher_no.
The sp will use parameter voucher_no  to get amount from many tables and calculation and  return 1 value.

So we would like it
voucher1,  ( call ds2 with voucher1 as parameter and return amount 1.
voucher2, ( call ds2 with voucher2 as parameter and return amount 2.

Many thanks for your prompt reply.
Reply
Sybil
Post time 2020-9-23 15:03:12 | Show all posts
HI:

    According to your further description, I made a demo, you can refer to, [Because the data source used in the demo does not have SP, so I used the dataset for ds2; the dataset and SP have the same parameter transfer principle, you can refer directly]
image.png

test.cpt

5.93 KB, Downloads: 1

Reply
You have to log in before you can reply Login | Register


0following

0fans

1Posts

Post