Report does not contain a definition for 'variable'

Stimulsoft Reports.NET discussion
Post Reply
User avatar
jp2code
Posts: 20
Joined: Thu Feb 11, 2016 9:10 pm
Location: Longview, TX [USA]

Report does not contain a definition for 'variable'

Post by jp2code »

I have a report that does not use a particular value 'VwInvoice.AmountDue' in the Data band.

I do, however, use it in the Report Summary band.

If Amount Due is 0, I count the transaction as a cash sale and sum the Items amount of Cash transactions.

If Amount Due is not 0, I count the transaction as a Charge sale and sum up the Items amount of all Charge transactions.

The logic seems simple enough, but I cannot generate the report because the designer is complaining about this field not having a handler:
The error of compilation is found in the 'Report' report:
'Reports.Report' does not contain a definition for 'VwInvoice_AmountDue__0' and no extension
method 'VwInvoice_AmountDue__0' accepting a first argument of type 'Reports.Report' could be
found (are you missing a using directive or assembly reference?)
The attachment getgreenshot_org.jpg is no longer available
Could someone tell me what I am doing wrong?

It is Friday, and the office will be closed for the weekend soon; however, I will be very anxious to get this resolved so that come Monday morning I can be productive again. So, I have attached my Report file (mrt) and code file (cs).
Attachments
Error Messages
Error Messages
getgreenshot_org.jpg (363.7 KiB) Viewed 3580 times
Last edited by jp2code on Fri Feb 19, 2016 5:46 pm, edited 1 time in total.
~Joe
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Report does not contain a definition for 'variable'

Post by Jan »

Hello, Joe!

You need to specify the name of the data band as the first argument in total functions if this total functions located in text components which are located on the Summary band. This happens because your report can contain many data bands with same data sources. So report engine requires additional information. Unfortunately, the report checker can't determine now this situation give a more effective description in error now. I have corrected your report. Please check it in the attachment of this post.

Please contact us if you need any help.

Thank you.
Attachments
SalesRegisterReport-Fixed.mrt
(93.07 KiB) Downloaded 383 times
User avatar
jp2code
Posts: 20
Joined: Thu Feb 11, 2016 9:10 pm
Location: Longview, TX [USA]

Re: Report does not contain a definition for 'variable'

Post by jp2code »

Thank you!
Thank you!
Thank you!

It probably does not look like it, but I worked for hours trying to figure that out.

I also got your other replies, so I am going to apply the knowledge from those as well.
~Joe
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Report does not contain a definition for 'variable'

Post by Jan »

Thank you for letting know!
Post Reply