Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have made a report on sql server2005 business intelligence development studio(SSRS PROJECT) and deploy at an IPAddress(190.168.327.183/ReportFolder).
And I make a call report from that ip and vender the report on ReportViewer.

First I call

C#
  public void GetConnectionOfReportServer()
        {
            try
            {
               NetworkCredential credential = new NetworkCredential("administrator", "pass", "RSERVER"); 
this.reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = credential;             
                this.reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
            this.reportViewer1.ServerReport.ReportServerUrl = new Uri(@"http://190.168.327.183/ReportFolder");       
             
 
              
              
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
            }

        }

and then call
C#
 public void getReportFrmServer(string report, string[] param)
        {       
            try
            {
this.reportViewer1.ServerReport.ReportPath = "/ReportFolder/" + report;
                this.reportViewer1.ServerReport.Timeout = 3600000;
                if (report == "Report1")
                {
                    ReportParameter[] parameter = new ReportParameter[1];
                    parameter[0] = new ReportParameter("startDate", param[0]);
                  
                    this.reportViewer1.ServerReport.SetParameters(parameter);
                    this.reportViewer1.RefreshReport();
                }
}
catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
}

At some pc it is working but one pc there is problem
"For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method."
Posted
Updated 27-Nov-14 22:47pm
v2
Comments
Praveen Kumar Upadhyay 28-Nov-14 1:41am    
Question is not clear
Member 7909353 28-Nov-14 1:47am    
when report is generating the error is
for security reasons dtd is prohibited
Praveen Kumar Upadhyay 28-Nov-14 1:53am    
Please go to CodeProject help section and learn how to ask question, It is simply not telling anything that can be answered.

Please don't get me wrong. The well you can explain your problem , you can get very good response.
Member 7909353 28-Nov-14 6:47am    
See again
Praveen Kumar Upadhyay 28-Nov-14 9:03am    
I really appreciate that you have improved your question. It is well explained now, but unfortunately I don't know the answer but I think OriginalGriff has already given the solution.

1 solution

If you look at the whole error message, it almost certainly tells you exactly what to do to fix it:
"For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method."


So either do that in the app that processes it, or don't generate document type declarations in your documents when you create them:
C#
XmlReaderSettings xrs= new XmlReaderSettings();
xrs.ProhibitDtd = false;
And pass that to your Create method.
 
Share this answer
 
Comments
Praveen Kumar Upadhyay 28-Nov-14 2:06am    
Hats of to you Griff. you got the clue, what he wanted to ask.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900