Calculate parameter for each row

Stimulsoft Reports.WPF discussion
jacek_arwal
Posts: 17
Joined: Mon Mar 04, 2019 12:01 pm

Calculate parameter for each row

Post by jacek_arwal »

I have SQL data source:

Code: Select all

Select
    ModelDanychContainer.SrodkiTrwale.WartoscNabycia
From
    ModelDanychContainer.SrodkiTrwale
Where
    ModelDanychContainer.SrodkiTrwale.NrInwentarzowy = @NrInw
with a parameter in my report:

@NrInw

and expression:

Code: Select all

Dokument.Pozycje.NrInwentarzowy
This expression should be diffrent for each row of report, because NrInwentarzowy is diffrent on each row. But now expression is calculated only for first row and in all rows I have the same WartoscNabycia

Report is attached
Attachments
Raport o środkach trwałych nieumarzanych.mrt
(68.49 KiB) Downloaded 208 times
Lech Kulikowski
Posts: 6243
Joined: Tue Mar 20, 2018 5:34 am

Re: Calculate parameter for each row

Post by Lech Kulikowski »

Hello,

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

Thank you.
jacek_arwal
Posts: 17
Joined: Mon Mar 04, 2019 12:01 pm

Re: Calculate parameter for each row

Post by jacek_arwal »

Where can I find this property ? For datasource SrodkiTrwale I see only some events on property tab.
Lech Kulikowski
Posts: 6243
Joined: Tue Mar 20, 2018 5:34 am

Re: Calculate parameter for each row

Post by Lech Kulikowski »

Hello,

Properties for the data source.

Thank you.
Attachments
Annotation 2019-03-07 135547.jpg
Annotation 2019-03-07 135547.jpg (88.22 KiB) Viewed 3591 times
jacek_arwal
Posts: 17
Joined: Mon Mar 04, 2019 12:01 pm

Re: Calculate parameter for each row

Post by jacek_arwal »

It didn't help :(
Lech Kulikowski
Posts: 6243
Joined: Tue Mar 20, 2018 5:34 am

Re: Calculate parameter for each row

Post by Lech Kulikowski »

Hello,

Unfortunately, it is not working with combination Business Object and Data Source.

Thank you.
jacek_arwal
Posts: 17
Joined: Mon Mar 04, 2019 12:01 pm

Re: Calculate parameter for each row

Post by jacek_arwal »

Is there any other possibility to solve this problem ? Second Pass or C# function to refresh field ?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Calculate parameter for each row

Post by HighAley »

Hello, Jacek.

You should get all data for the report before rendering it.
But the Business objects work different way.
The data are requested during rendering.
You could try to modify your business objects and add necessary data there.

Thank you.
jacek_arwal
Posts: 17
Joined: Mon Mar 04, 2019 12:01 pm

Re: Calculate parameter for each row

Post by jacek_arwal »

Adding data to Business Object is impossible because report is designed by Company Insert. I can add full table SrodkiTrwale as data source - it contains WartoscNabycia with values for my report. There is a relation between this table and business object but as as I know ther is now way to establish such relation in report. But is there a way to render value for field XXX for every row ? If yes I could search appropiate value in data source using value of business object.
Lech Kulikowski
Posts: 6243
Joined: Tue Mar 20, 2018 5:34 am

Re: Calculate parameter for each row

Post by Lech Kulikowski »

Hello,

Could you prepare a simple project with Test business objects and connection in which need send parameters? We will try to find a solution for you.

Thank you.
Post Reply