Home > Net > In the.net MVC mode, how to do it in the front page, click on the print button to adjust the corresp
In the.net MVC mode, how to do it in the front page, click on the print button to adjust the corresp
Time:09-25
above, I am in c/s mode parameter called fastreport statements, according to the normal
below is I'm going to the web page, click on the print button to call the statements code or code before c/s mode, click on the print button, the program will be an error, and then report it to come out, could you tell me how to write in the MVC mode to print button code
CodePudding user response:
Under the guidance of leaders, thank you very much
CodePudding user response:
To use the WebReport, similar to the following:
public void Print () { WebReport WebReport=new WebReport (); System. Data. The DataSet DataSet=new System. The Data. The DataSet (); The dataSet. ReadXml (" C://Program Files (x86)//FastReports//FastReport.Net//Demos//Reports//nwind.xml "); WebReport. Report. The RegisterData (dataSet, "NorthWind"); WebReport. Report. The Load (" C:/Program Files (x86)//FastReports//FastReport.Net//Demos//Reports//Simple List. Usd "); WebReport. EmbedPictures=true; WebReport. PrintHtml (); }
CodePudding user response:
Official said and I in order to realize the function of the different, I want to do is click on print button, and then the parameters of different data report
CodePudding user response:
Did you see the report is null, the debugging, We are talking about is for Server MapPath path problem correctly
CodePudding user response:
Can add my QQ to see you, 3068516469
CodePudding user response:
Suggest you use lodop, can print the specified web page, the content can be generated according to the parameters,
Using Fastreport is also a generated page, and then the client printing, print is not on the server
CodePudding user response:
In the view page, click on the button from the background data, filling the page Page print recommend adobe print plug-in Or directly use js calls window. The print ();