data sources which was registered in the report by a programming method
Ozan K. BAYRAM
Istanbul
Hi, i'm new to Fast Report .NET.
I red that "i can choose one of the data sources which was registered in the report by a programming method" in the user manual (http://fast-report.com/documentation/UserManFrNET-en/selectreportdata.htm)
How i can perform this? How can i register a data source by a programming method?
For example i have an object like List<string> and wanted to show as a report.
How can i create a frx file that lists my object content? What is missing with the code below?
Thanks in advance!
I red that "i can choose one of the data sources which was registered in the report by a programming method" in the user manual (http://fast-report.com/documentation/UserManFrNET-en/selectreportdata.htm)
How i can perform this? How can i register a data source by a programming method?
For example i have an object like List<string> and wanted to show as a report.
How can i create a frx file that lists my object content? What is missing with the code below?
Thanks in advance!
        List<string> items = new List<string>();
        items.Add("1a askdfh askfhklas fh");
        items.Add("asgflaskjf laskjflasf");
        items.Add("asf asjlşfjaslfj aslşfas");
        items.Add("asf?§jas lfjaslÅŸfj salf");
        items.Add("asfasj flasjlşfj aslf");
        items.Add("asflkasjflasfjşlasdjlf");
        Reports.DetailedProductGroupList report = new Reports.DetailedProductGroupList(); //this is a class saved from a .frx file. It only contains a label that shows name of the report.
        report.RegisterData(items, "items");
        report.GetDataSource("items").Enabled = true;
        WebReport1.Report = report;
Comments
You may use the following scenario to create a report in webmode:
http://www.fast-report.com/en/forum/?p=/discussion/6475
what about my scenario?
[Table.Column1] [Table.Column2] ...
in them. You may easily make a mistake because you need to type table/column names, there is no way to drag/drop them.
Then you need to register a datasource with the "Table" name (because you use this name in the Text objects), and attach the databand to that datasource.
In your case you need to put single Text object on the databand, and write the following text in it:
[items.Value]
In your code:
then edit this new class' namespace because it is 'FastRepor' by default
i tried to compile class library and get the following error
Error 7 The name 'items' does not exist in the current context \Sources\MyWise\Reports\DetailedProductGroupList.cs 32 16 Reports
Do i have to add another thing to report? (parameter etc.)
Thanks in advance
Report report = new Report();
report.Load(frxfile);
report.RegisterData(items, "items");
report.GetDataSource("items").Enabled = true;
(report.FindObject("Data1") as DataBand).DataSource = report.GetDataSource("items");
WebReport1.Report = report;
Hi, I newbi, I,m intented use this code, but my report have a group and sendme this error en de web
GroupHeader1): error BC30034: Bracketed identifier is missing closing ']'.
(Text4): error BC30451: Name 'nomina' is not declared.
have declare datasource for gruop elements and footer ?, how declare ?
regaders
Probably you make a type in the tablename.columnname in your report, or you have not registered the datasource with the correct name. I need a test application from you to find an error. If you able to create such application, please send it to tz@fast-report.com.