Problem with Xpo Relation

Hi ,
I have been evaluating Fastreport.net for few days for xpo.
I used this piece of code,

Config.ReportSettings.FilterBusinessObjectProperties += new FilterPropertiesEventHandler(ReportSettings_FilterBusinessObjectProperties);

void ReportSettings_FilterBusinessObjectProperties(object sender, FilterPropertiesEventArgs e)
{
if (e.Property.Name.Contains("!") || e.Property.Name == "This" || e.Property.Name == "Oid")
e.Skip = true;
}

Every thing seems to work fine but the problem is, I have Invoice Class having 1:1 association with Customer class.
while printing the invoice the first index of customer name was printed on all the invoices. i had attached the sample application.
check it out.

Regards,
Saravanan

Comments

  • edited 11:01AM
    Hello,

    It's not a xpo-related problem; you can easily reproduce it in the main demo, "Business Objects" report. The problem is with the report structure. Your report must be of master-detail type if you want to print data from two related business objects. Another solution is to use the script to init the child datasource:
        private void Data1_BeforePrint(object sender, EventArgs e)
        {
          DataSourceBase data = Report.GetDataSource("Categories BusinessObject.Products");
          data.Init();
        }
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.