Data Relation problem

BoskoBosko Belgrade, Serbia
edited December 2008 in FastReport .NET
Hi,

I am trying to design a report similar to Master-Details in demo.

Basicly, the data is the same, I need Articles from my database, filled by their Groups.

I am getting datasources that contains something like this:

[Articles]
ArticleName
ArticleGroupID
ArticlePrice
ArticleImage
...

[ArticleGroup]
ArticleGroupID
ArticleGroupName
ArticleGroupImage
...
I have a regular relation between my tables in database, it is Article table and ArticleGroup table.
They are related via ArticleGroupID column.

I am trying to add a relation between two tables to get the same report as Master-Details report in Demo.exe.

I tried to add a new relation, set "Parent table" and "Child table", set their columns according to their relationships in database, looking at Master-Details report, I think I didn't do anything wrong there. The relations between those two tables are crystal clear.

And then when I try to preview report , I am getting following error:
[b]Your report has thrown a following exception:[/b]

This row has been removed from a table and does not have any data.
BeginEdit() will allow creation of new data in this row.

Stack trace:
 at System.Data.DataRow.GetDefaultRecord()
   at System.Data.DataRow.get_Item(Int32 columnIndex)
   at FastReport.Data.TableDataSource.GetValue(Column column)
   at FastReport.Data.DataSourceBase.get_Item(Column column)
   at FastReport.Report.Calc(String expression, Variant value)
   at FastReport.Report.Calc(String expression)
   at FastReport.TextObject.GetData()
   at FastReport.BandBase.GetData()
   at FastReport.Engine.ReportEngine.nUAUh7KfP(BandBase , Boolean )
   at FastReport.Engine.ReportEngine.Pua5g4LOd(BandBase , Boolean )
   at FastReport.Engine.ReportEngine.EhE9bmNDn(BandBase , Boolean )
   at FastReport.Engine.ReportEngine.4xRqQa7ks(DataBand , Int32 )
   at FastReport.Engine.ReportEngine.GeqGFYmjx(DataBand , Int32 , Boolean , Boolean , Boolean )
   at FastReport.Engine.ReportEngine.EI7kaTMvt(DataBand )
   at FastReport.Engine.ReportEngine.nvCXVYAVOa(BandCollection )
   at FastReport.Engine.ReportEngine.GeqGFYmjx(DataBand , Int32 , Boolean , Boolean , Boolean )
   at FastReport.Engine.ReportEngine.EI7kaTMvt(DataBand )
   at FastReport.Engine.ReportEngine.nvCXVYAVOa(BandCollection )
   at FastReport.Engine.ReportEngine.aMVXoVk6sq(ReportPage )
   at FastReport.Engine.ReportEngine.wZgXD3iRKr()
   at FastReport.Engine.ReportEngine.Xis8OMHRH(Boolean , Boolean , ReportPage )
   at FastReport.Report.Prepare(Boolean append)
   at FastReport.Report.Prepare()
   at TmYf7SI0diqg0eIvpst.caoJ2yIYb9x6FsFXB9T.Q9WHjE7TZ()

I didn't manage to get a regular report. [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> What am I missing? Do you have any idea what caused this error? Thanks in advance, Bosko.[/img]

Comments

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.