Data Source column as Query Parameter

Stimulsoft Reports.PHP discussion
chleroy
Posts: 3
Joined: Sun May 24, 2015 12:27 am

Data Source column as Query Parameter

Post by chleroy »

Hi,

My environment specs are :
  • Stimulsoft Reports.Fx for PHP2015.1
    Windows 7 - 64bit
    MySQL 5.6.15
    PHP 5.3
I've attached database and report samples.
My question is the following:

data source ds_a query:
select * from tbl_a;

data source ds_b query
select * from tbl_b where ref_a = @fk_a

fk_a is a parameter with an expression as a value: {ds_a.id_a}

the parameter only considers the first value of {ds_a.id_a}
and as a result ds_b doesn't have all the data it's supposed to.

I've already tried the 'Reconnect on Each Row' property like you suggested in this post
http://forum.stimulsoft.com/viewtopic.php?f=12&t=33819


Waiting for help PLZ
Attachments
test.txt
DB sample
(1.86 KiB) Downloaded 298 times
chained_2015.mrt
Report sample
(4.73 KiB) Downloaded 267 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Data Source column as Query Parameter

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. We don't understand your logic.
Can you please show us how it should look like in the report.
You can use the master-detail construction without any parameters in second datasource.

Thank you.
chleroy
Posts: 3
Joined: Sun May 24, 2015 12:27 am

Re: Data Source column as Query Parameter

Post by chleroy »

Hope the screen caps will explain my issue.
Attachments
scr_cap_rpt.jpg
scr_cap_rpt.jpg (122.1 KiB) Viewed 4187 times
tbl_b.jpg
tbl_b.jpg (90.45 KiB) Viewed 4187 times
tbl_a.jpg
tbl_a.jpg (62.74 KiB) Viewed 4187 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Data Source column as Query Parameter

Post by Alex K. »

Hello,

Please check the modified report in the attachment.

Thank you.
Attachments
chained_2015_modified.mrt
(9.53 KiB) Downloaded 289 times
chleroy
Posts: 3
Joined: Sun May 24, 2015 12:27 am

Re: Data Source column as Query Parameter

Post by chleroy »

Thank you for the reply,

I'm used to create relationships between two data source like you did in the modified sample.
The problem is when table b has for the least hundreds of thousand of records.

I still have to load all of those records before the relationship filter applies.
And it makes the report run slow.

would it be possible for data source b to take foreign key field in data source a as a parameter
and execute for each value of it then combine the results

It's the one and only issue I came along so fare in testing the product witch by the way is wonderful.

Thanks again
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Data Source column as Query Parameter

Post by Alex K. »

Hello,

Please try to use the ReconnectOnEachRow property.
Please check the modified report in the attachment.

Thank you.
Attachments
chained_2015_modified2.mrt
(9.67 KiB) Downloaded 316 times
facsistemas
Posts: 13
Joined: Mon Jul 18, 2016 12:20 pm

Re: Data Source column as Query Parameter

Post by facsistemas »

Hello,
I have the same problem of the topic above , I am unable to link the parameter with the column of another data source !
Can you help me?
Attachments
fac_Rel_RelatorioInconsistentes.mrt
parameter
(80.3 KiB) Downloaded 242 times
Last edited by facsistemas on Mon Jul 18, 2016 1:23 pm, edited 1 time in total.
facsistemas
Posts: 13
Joined: Mon Jul 18, 2016 12:20 pm

Re: Data Source column as Query Parameter

Post by facsistemas »

Hello,

I have the same problem of the topic above , I am unable to link the parameter with the column of another data source !
Can you help me?
fac_Rel_RelatorioInconsistentes.mrt
parameter
(80.3 KiB) Downloaded 300 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Data Source column as Query Parameter

Post by Alex K. »

Hello,

Please try to set the ReconnectOnEachRow property to true for the grau data source.

If the issue still present, please send us a test data for your report.
Thank you.
facsistemas
Posts: 13
Joined: Mon Jul 18, 2016 12:20 pm

Re: Data Source column as Query Parameter

Post by facsistemas »

Unfortunately still did not work , I'm sending the report and a test database.
Attachments
fac_Rel_RelatorioInconsistentes.mrt
(80.8 KiB) Downloaded 298 times
supremo_supremo_18072016.rar
(1.08 MiB) Downloaded 211 times
Post Reply