LineObject in WebReport
referring to https://www.fast-report.com/en/forum/index....showtopic=13802
Line object is rendering if height property not zero. ???
Line object is rendering if height property not zero. ???
Comments
If we change the Height of Line object, it will not remain a straight line, it will be a ziczac... So even it display, this solution is not workable.
If we change the Height of Line object, it will not remain a straight line, it will be a ziczac... So even it display, this solution is not workable.
[/quote]
FastReport.net 2017.1.0 - Still not Printing Horizontal Line Object in Web Report. Also I cannot use buttons on Viewer in Asp.net project, that can be used to drill down the report....Can anyone share how to use drill down (button events) in Asp.net Projects.
use textobject and border property as workaround, in fastreport user manual, stated :
If possible, use the object's border instead of "Line" object. This will simplify the report and
avoid possible problems with the export to different formats.
2. DRILL DOWN REPORT
I use workaround too, see attached pictures (I use google drive, download it) :
Image 1 : basic report
Image 2 : popup report/url]
If you click nota or deposit in the report column (image 1), it will popup another report (image 2).
To achieve that:
in frx file, let's say 'nota' and 'deposit' are printed by textobject with name "Text14" :
looks weird : Hyperlink.Expression actually contains this expression :
"java script:btnPopup(" + [MainReport.Urut] + "," + [MainReport.InvID] + ");"
and in html page, there is a script :
in WebAPI
Hope you get the idea...
Can you please share similar code for calling Asp.net instead of MVC. One more point is that we not using .frx, rather we convert into class and add C# in project and then create its object. So should we defined the httplink.expression in frx file on a textbox and will this script transformed in C# Code ?
1. When I tried to add HyperLink Expression, when generated C# file, it added a code, which is throwing Error: CalcExpression ... Why designer adding URL Hyperlink Expression as Calculating Express method.
2. So What I did is just added thru Code executing it. I added following code.
rpt.txttbl_Countryname.Hyperlink.Expression = "\"java script:alert([myDataSource.CountryName]);\"";
rpt.txttbl_Countryname.Text = "[myDataSource.CountryName]";
Now Report is working, column is showing field value, but when I click HyperLink, It catch error that myDataSource is not Define... Can you guide me how to access the DataSourceName in Java Script.
when you open your frx file in designer and save as 'class', the code :
2. See attachment :
a. picture 1 : you need 'kind' property = URL and 'expression' property
b. picture 2 : edit 'expression' property to access datasource
on development stage, use frx template file, make sure it works as expected.
on production stage, save frx file as a class
Basically we are creating reports (frx) files without any predefined datasets, as we are attaching reports with Business objects at runtime, hence in frx files there is no DataSet defined. To run the report, we set following values at runtime. Now in this case, Javascript, cannot access the Datasource object may be because its not pre-defined.
Is there any way to access these dynamic data source from Javascript.
why you set [MyDataSource.CountryName] in javascript, instead of [MyDataSourceName.CountryName]
The report is running, showing data column, hyperlink is also shown but when clicked nothing happen and browser debugger show "UnCatught Reference Error: MyDataSource is not Defined"
Once again I am really thankful for your constant and detail replied.
I just saw new version of FastReport 2017.1.13, changes say
[WebReport]
- fixed bug with handling of onClick event in WebReport
Just to test, I made a report, with Hyperlink Type Custom and attach Click Event but its now showing a clickable on viewer and click even also not working. So feature like drill down (expanding/collapsing) any group still not achievable.
Can you please help on this.
FastReport.Web.WebReport wr = new FastReport.Web.WebReport();
wr.Report = new frBS();
wr.Report.RegisterData(dt, dt.TableName);
.........
don't know why....
1. original frx file, rptCOA.frx
2. picture drilldown report, before click
3. picture drilldown report, after click
4. converted frx file to class (i renamed frCOA.cs to frCOA.txt)
5. code in asp.net
notes :
1. i can't test in medium trust hosting environment because my project uses ms.access database
2. in frCOA.txt :
thanks for your info, now I can create an interactive report, for example : sort column at runtime, when you click an object in column header, it will sort the column in data1
Its really good idea to enable click event on Column headers and sort report based on it. If you create any sample pls do share here.
My question was that ClickEvent as per documentation can be attached on any object. But if you try to attach click Event on any object other than Group header, it will not respond to click Event, neither it will show as clickable in preview nor it will come to click Event code if you apply break point. So why this has such behavior, If click event can work on Detail Object smoothly, we don't need to use Javascript to open separate report, we can call directly from open thru C# Code (code behind). What is your input on this.
click event and javascript are two different beasts and for two different intents
there is a reason why you must use javascript to open subreport, for example :
main report contains 100 rows
sub report contains 1000 rows for each row in main report
non javascript method : you must register all data (100 + (100 * 1000) rows) at once
javascript method : only register 100 rows at first time, when user need details, open another report to register 1000 rows dynamically