Click here to Skip to main content

Web Development

AnswerRe: google map include in contact.aspx page Pinmembervbmike28-Dec-12 9:59 
AnswerRe: google map include in contact.aspx page PinmvpSandeep Mewara5-Jan-13 21:28 
AnswerRe: google map include in contact.aspx page PinmemberS.M. Zamshed Farhan15-Jan-13 5:12 
QuestionUsing Developer Tools PinmemberPhanindra26127-Dec-12 2:59 
AnswerRe: Using Developer Tools PinmemberS.M. Zamshed Farhan12-Jan-13 6:46 
AnswerRe: Using Developer Tools PinmemberS.M. Zamshed Farhan12-Jan-13 6:48 
AnswerRe: Using Developer Tools Pinmemberrg1024-Jan-13 2:40 
QuestionSSRS Report Conversion to PDF [modified] PinmemberVinay Meka22-Dec-12 1:58 
I'm using this below code to create pdf file from ssrs report on button click.It was working fine when i run the project on my local system,but when i hosted it on ISS i'm unable to view the pdf file as o/p.Plz suggest the solution ASAP..
protected void btnAuthenticateAndPrint_Click(object sender, EventArgs args)
            //SSRS Report Print

            //Getting Values from grid
            LinkButton lb = (LinkButton)sender;
            GridViewRow row = (GridViewRow)lb.NamingContainer;
            Label lbOrderID = row.FindControl("lbOrderID") as Label;
            int OrderId = Convert.ToInt32(lbOrderID.Text);
            da = new SqlDataAdapter("Get_PODetails", con);
            da.SelectCommand.CommandType = CommandType.StoredProcedure;
            da.SelectCommand.Parameters.AddWithValue("@MPDI_ID", OrderId);
            ds = new DataSet();
            da.Fill(ds, "PO");
            if (ds.Tables["PO"].Rows.Count > 0)
                lblVendid.Text = ds.Tables["PO"].Rows[0]["MVDI_ID"].ToString();
                lblBranch.Text = ds.Tables["PO"].Rows[0]["MBRI_ID"].ToString();
                lblDate.Text = Convert.ToDateTime(ds.Tables["PO"].Rows[0]["MPDI_Date"]).ToString("dd-MMM-yyyy");
           //Setting/Referencing Report Server
            rs = new RSWebService.ReportingService2005();
            rsExec = new REWebService.ReportExecutionService();
            rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
            rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
            rs.Url = "http://localhost/ReportServer/ReportService2005.asmx";
            rsExec.Url = "http://localhost/ReportServer/ReportExecution2005.asmx";
            byte[] Sendresults = null;
            byte[] bytes = null;
            string historyID = null;
            string deviceInfo = @"<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>";
            string format = "PDF";
            string encoding = null;
            string mimeType = null;
            string extension = null;
            //string fileName = "somefilename.txt";
            REWebService.Warning[] warnings = null;
            string[] streamIDs = null;
            //Getting Report Name
            string _reportName = @"/FIMO GOF Assets Reports/GOF PURCHASE ORDER";
            REWebService.ExecutionInfo ei = rsExec.LoadReport(_reportName, historyID);
            //Getting Report Parameters
            REWebService.ParameterValue[] parameters = new REWebService.ParameterValue[3];
            parameters[0] = new REWebService.ParameterValue();
            parameters[0].Name = "MVDI_ID";
            parameters[0].Value = lblVendid.Text;
            parameters[1] = new REWebService.ParameterValue();
            parameters[1].Name = "MBRI_ID";
            parameters[1].Value = lblBranch.Text;
            //parameters[2] = new REWebService.ParameterValue();
            //parameters[2].Name = "MPDI_Date";
            //parameters[2].Value = lblDate.Text;
            parameters[2] = new REWebService.ParameterValue();
            parameters[2].Name = "MPDI_DocNo";
            parameters[2].Value = lblPOId.Text;
            rsExec.SetExecutionParameters(parameters, "en-us");
            //Assingning to byte stream
            Sendresults = rsExec.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);
            MemoryStream ms = new MemoryStream(Sendresults);

            //To create a PDF file from byte stream
            FileStream stream = File.Create("Asset Module/Reports/PO_Report.PDF");
            stream.Write(Sendresults, 0, Sendresults.Length);
            //Getting the PDF as Output
            Label lbpath1 = new Label();
            lbpath1.Text = "Reports/PO_Report.PDF";
            FileInfo f = new FileInfo(Server.MapPath(lbpath1.Text));
            System.Diagnostics.Process.Start(@"" + f.FullName + "");

        catch (Exception Ex)
            throw Ex;

modified 23-Dec-12 23:58pm.

AnswerRe: SSRS Report Conversion to PDF PinmvpSandeep Mewara5-Jan-13 21:34 
QuestionCould not load file or assembly PinmemberChona117120-Dec-12 2:57 
AnswerRe: Could not load file or assembly PinmemberArpitDubey28-Dec-12 9:50 
QuestionHow should I measure scroll position in different browsers [modified] Pinmemberwoomla17-Dec-12 22:52 
AnswerRe: How should I measure scroll position in different browsers PinmemberZaf Khan19-Dec-12 6:46 
QuestionBest Web Technologies Pinmemberemadns12-Dec-12 4:40 
AnswerRe: Best Web Technologies PinmemberDavid Mujica12-Dec-12 5:22 
AnswerRe: Best Web Technologies Pinmemberachantayamini17-Dec-12 23:05 
AnswerRe: Best Web Technologies Pinmemberjfmorgan33331-Dec-12 11:01 
QuestionJSP and JSTL and so on ... PinmemberSheraX11-Dec-12 7:20 
AnswerRe: JSP and JSTL and so on ... PinmemberMarcus Kramer11-Dec-12 7:28 
GeneralRe: JSP and JSTL and so on ... PinmemberSheraX11-Dec-12 7:32 
GeneralRe: JSP and JSTL and so on ... PinmemberAndrew Stoute11-Dec-12 8:03 
GeneralRe: JSP and JSTL and so on ... PinmemberSheraX11-Dec-12 8:12 
QuestionSMTP Programming PinmemberDisIsHoody9-Dec-12 14:49 
AnswerRe: SMTP Programming Pinmembervbmike10-Dec-12 9:49 
GeneralRe: SMTP Programming PinmemberDisIsHoody10-Dec-12 14:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 27 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid