Page 1 of 1

Report does not contain a definition for 'variable'

Posted: Fri Feb 12, 2016 10:04 pm
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).

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

Posted: Sun Feb 14, 2016 12:21 am
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.

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

Posted: Sun Feb 14, 2016 1:07 am
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.

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

Posted: Sun Feb 14, 2016 7:35 am
by Jan
Thank you for letting know!