problem with cLast Function

Stimulsoft Reports.NET discussion
Post Reply
p30help
Posts: 9
Joined: Tue Aug 28, 2012 12:05 pm

problem with cLast Function

Post by p30help »

Hi
i Use Stimulsoft report .Net 2011
in Header Band i Save clast in a int Variable
but my problem is the value of int variable in same page is zero but the value in next page is correct value.
why i cant use clast in own page?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: problem with cLast Function

Post by Alex K. »

Hello,

Can you please send us a sample report with test data for analysis.

Thank you.
p30help
Posts: 9
Joined: Tue Aug 28, 2012 12:05 pm

Re: problem with cLast Function

Post by p30help »

Hi
I Attached My Report File And DataSource (Xml) File Here.
And Put Some Text in Report File to Get Faster My Point .
Please See My Report in Preview Mode (Specially First Page) to Understand My Problem.
Thanks
Attachments
ds.xml
DataSet File - Contain 2 DataTable : dtP And dtC
(13.15 KiB) Downloaded 182 times
rep.mrt
Report File
(26.8 KiB) Downloaded 177 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: problem with cLast Function

Post by HighAley »

Hello.

The Page Header and Page Footer is placed on the page at the beginning of rendering. And functions cSum(), cLast() and etc are calculated in the end of rendering of whole report.
We have made some changes in your report to get the right value.
  1. We added store and detailed variables.
  2. We save link in the Get Tag event of the Text21 component.
  3. Calculate sum in the After Print events of the bands.
  4. Assign value in the After Print event of the Page.
Thank you.
Attachments
rep_modified.mrt
(23.99 KiB) Downloaded 181 times
p30help
Posts: 9
Joined: Tue Aug 28, 2012 12:05 pm

Re: problem with cLast Function

Post by p30help »

Hi,
Thanks a lot, This Is Work Correctly.

But I Have Some Question About This Solution.

1- Why dose not Create "store" Variable as decimal Type.
2- Why Convert "store" Variable as "StiText"? Can you Use Below Code?

Code: Select all

store = details.ToString();
3- what is "Get Tag" Event And When this Fire?
4- What is "sender" variable in "Get Tag" event (of the Text21 component).

Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: problem with cLast Function

Post by HighAley »

Hello.
p30help wrote:1- Why dose not Create "store" Variable as decimal Type.
in store variable we save link to the StiText object.
p30help wrote:2- Why Convert "store" Variable as "StiText"? Can you Use Below Code?

Code: Select all

store = details.ToString();
Because of the previous answer.
p30help wrote:3- what is "Get Tag" Event And When this Fire?
We can get link to the instance of the component on the rendered page.
p30help wrote:4- What is "sender" variable in "Get Tag" event (of the Text21 component).
See previous answers.

Thank you.
Post Reply