c# - URL Parameters in MVCReportViewer -
as know, in sql server reporting service (ssrs), can pass parameters url (url access syntax) , can provide data source credentials in url including dsu:datasourcename=value & dsp:datasourcename=value (setting data source credentials in url).
now, want open report in web application dynamic data source credencial.
i'm using mvcreportviewer , when set mvcreportviewerfluent:reportserverurl
parameter http://servername/reportserver/?dsu:myds=user&dsp:myds=password
, blank page in iframe.
when remove "/?dsu:myds=user&dsp:myds=password"
, report work correctly , ask user name , password inside report.
going wrong?
edit: codes added
controller code :
public actionresult index() { var model = new { username = "user", password = "pass", reportpath = "/myreportpath", serverurl = "http://serveraddress/reportserver/?dsu:ddst=pdm&dsp:ddst=pdm", parameters = null, formmethod = formmethod.post, htmlattributes = new { height = 900, width = 900, style = "border: none" } } return view(model); }
view code:
@html.mvcreportviewerfluent(model.reportpath) .reportserverurl(model.serverurl) .username(model.username) .password(model.password) .method(model.formmethod) .reportparameters(model.formmethod) .attributes(model.htmlattributes).
Comments
Post a Comment