RegisterData + DesignReport
I'm evaluating Fast report compared to other report engings for our .Net Web Project. I have downloaded the Trial and play around with, but I have some problem and the documentation is not so helpful.
I do my tests in Webforms
1) RegisterData
I have made a small report in the Windows designer. From my webforms i try to open that whit a different dataset (limited Query) but a cant get it working. My code:
2) DesignReport
I try to use the designer but the samples is only in MVC and i try to use it in WebForms. My code
Or is the designer not avalible in the Trial version?
I do my tests in Webforms
1) RegisterData
I have made a small report in the Windows designer. From my webforms i try to open that whit a different dataset (limited Query) but a cant get it working. My code:
But it runs with the data I have used in design of the report so it ignore my RegisterData command. What am I doing wrong?System.Data.DataSet dataSet = db.ExecDataSet("select Name, InternalId from DocumentType where property=25", "", null, null);
webReport.Report.RegisterData(dataSet, "DocumentType");
string report_path = GetReportPath();
webReport.Report.Load(GetReportPath() + "DocTypeListWithDs.frx");
2) DesignReport
I try to use the designer but the samples is only in MVC and i try to use it in WebForms. My code
What I'm i supposed to write for DesignerPath ?webReport.DesignReport = true;
webReport.ID = "TEST";
webReport.DesignScriptCode = false;
webReport.DesignerPath = "~/WebReportDesigner/index.html";
Or is the designer not avalible in the Trial version?
Comments
You mixed datasource in designer with datasource from code.
open DocTypeListWithDs.frx with notepad, find the connection string, remove it.
make sure the dictionary node in frx file, for example (adjust column name to your data structure) :
(2) DesignReport
you're right.
This distribution contains the following files (not available in the Trial version) :
fonts - fonts of report designer interface (http://fontawesome.io/license/)
images - image files of report designer interface
locales\*.js - Localization files
scripts\
config-data.js
main.js
vendors.js - report designer runtime files
styles - files of markup styles
index.html - report designer runtime file
* I have removed the connectionstring
* I have checked that the dictonary in the reportfile correspond to my dataset
But when i run i get error:
DocumentType: The table is not connected to data. Register data by using RegisterData method
(The error is for som ereason i Swedish so I have translated it)
And my only code is
And my report is very small, here is the code:
in your frx file : <TableDataSource Name="DocumentType" ReferenceName="DocumentType">
TableDataSource with referencename = "DocumentType", it means referring to datatable with a name = DocumentType
if you use dataset :
<TableDataSource Name="DocumentType" ReferenceName="Data.DocumentType">
Take a look at fastreport demo folder, there is a demo for "data from dataset", look like this:
I have used FastReport before in my Delphi "era" and i really like it specially the good scripting capability. BUT i must say that the documentation and the samples really need an update, in my evulation of reporting products this is a drawback.
I will also evaluate Stimulsoft Reports, at a fast glance the scripting possibility is less in this product and the documentation is also not up to date.