I have the following piece of code which works fine in the begin render event of the report:
'get rows for this bill
Dim rows As Collections.Generic.List(Of EValuate.QuoteRow) = EValuate.BillEditorBAL.GetQuotationTradePackageBillRows(New guid(ProjectId),new guid("8E4D68DF-9749-4575-B1BF-1791C023E35B"))
'register the collection
Me.RegData("QuoteRow",rows)
Ideally I want to run this code on the click event of a button so that the guid is passed in:
'get rows for this bill
Dim rows As Collections.Generic.List(Of EValuate.QuoteRow) = EValuate.BillEditorBAL.GetQuotationTradePackageBillRows(New guid(ProjectId),)
'register the collection
Me.RegData("QuoteRow",rows)
If i run the code from anywhere other than the begin render event of the report it doesn't work. QuoteRow ends up with the right amount of data but i can't see the contents.
Please help?!?
Binding from business objects
-
- Posts: 5
- Joined: Tue May 12, 2009 4:59 am
Binding from business objects
Hello Rob,
[quote="rob".collett@sage.com]
If i run the code from anywhere other than the begin render event of the report it doesn't work. QuoteRow ends up with the right amount of data but i can't see the contents.
[/quote]
Data is not connected to report in moment in which occurs BeginRenderEvent of report. After this report engine start all connections to data in report. So if you want register something in report you need do this in BeginRenderEvent of report or you need call report.Dictionary.Connect() method.
Thank you.
[quote="rob".collett@sage.com]
If i run the code from anywhere other than the begin render event of the report it doesn't work. QuoteRow ends up with the right amount of data but i can't see the contents.
[/quote]
Data is not connected to report in moment in which occurs BeginRenderEvent of report. After this report engine start all connections to data in report. So if you want register something in report you need do this in BeginRenderEvent of report or you need call report.Dictionary.Connect() method.
Thank you.