I am trying to bind an XtraReport label to a BO field.
Does our BO implements the IList, ITypedList or IBindingList interface? That's what the XtraReport asks me in the help file.
I get an error after I set the report DataSource to the BO :
Private
loEmpresas.FillDataTable(
Report.DataSource = loEmpresas
Report.lblNome.DataBindings.Add(
Report.ShowPreviewDialog()
Any word of advice to direct me in the right direction will be appreciated.
Thanks in advance.
1) Create a fake table in some temp database in SQL Server that has the same structure as the results of your join and build the business object off of that. Then, you will automatically have your strong-typed fields becuase the BOMapper will be able to "see" the object that has the structure that you want.
2) Create a fake table in some temp profile in the DDT that has the same structure as the results of your join... same thing as the one above...
Once you build the business object through the BOMapper, it becomes a strong-typed design-time data source for your report. So, no matter what the crazy structure of your report, you can always create a business object that matches the structure by creating "dummy" structure sources in either the DDT or SQL Server.
I got the idea for the dummy table in the DDT, a fake Database there, and then map the BO.
Then, after instanciating the BO, I would just create a fill method with Paul's sql statement and be happy forever?
I did the changes you mentioned before to get the BO dropped into the designer. It worked fine!!!
But have you tried the "Preview" ? I get an error message like this:
Serialization Error
81: The type or namespace name 'tboTeste' does not exist in the namespace 'ProFilmeNET_BOL' (are you missing an assembly reference?)
I understand what you are saying about using a temp table to allow me to generate the fields for strong typing to be able to use the report designer at designtime. That should work ok but I would like to create a seperate report object type that would use the strataframe DAL but be generated using the schema returned from a select statement. This should give me the strong typing I would like as well as allow me some flexibility in having it able to work with Xtra Reports.
I guess I am just trying to make the reporting process seem a bit more straight foward and maybe I am complicating it more than it needs to be but for some reason reporting in .net seems to be a pain in the neck. Anyways if worse come to worse I know that I can do as you suggested and it will work.
Paul
I'm also having problems dropping a BO onto the report designer so I can pick and choose the fields I want. I was able to drop the BusinessBindingSource but got an error trying to assign a BO.
How did you get this working?
Thanks,Tim