Click here to Skip to main content
11,581,982 members (75,179 online)

Web Development

 
AnswerRe: google map include in contact.aspx page Pin
vbmike28-Dec-12 8:59
membervbmike28-Dec-12 8:59 
AnswerRe: google map include in contact.aspx page Pin
Sandeep Mewara5-Jan-13 20:28
mvpSandeep Mewara5-Jan-13 20:28 
AnswerRe: google map include in contact.aspx page Pin
S.M. Zamshed Farhan15-Jan-13 4:12
memberS.M. Zamshed Farhan15-Jan-13 4:12 
QuestionUsing Developer Tools Pin
Phanindra26127-Dec-12 1:59
memberPhanindra26127-Dec-12 1:59 
AnswerRe: Using Developer Tools Pin
S.M. Zamshed Farhan12-Jan-13 5:46
memberS.M. Zamshed Farhan12-Jan-13 5:46 
AnswerRe: Using Developer Tools Pin
S.M. Zamshed Farhan12-Jan-13 5:48
memberS.M. Zamshed Farhan12-Jan-13 5:48 
AnswerRe: Using Developer Tools Pin
rg1024-Jan-13 1:40
memberrg1024-Jan-13 1:40 
QuestionSSRS Report Conversion to PDF Pin
Vinay Meka22-Dec-12 0:58
memberVinay Meka22-Dec-12 0: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)
    {
        try
         {
            //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)
            {
                lblPOId.Text=ds.Tables["PO"].Rows[0]["MPDI_ID"].ToString();
                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);
            stream.Close();
 
            //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;
        }
    }
    #endregion


modified 23-Dec-12 23:58pm.

AnswerRe: SSRS Report Conversion to PDF Pin
Sandeep Mewara5-Jan-13 20:34
mvpSandeep Mewara5-Jan-13 20:34 
QuestionCould not load file or assembly Pin
Chona117120-Dec-12 1:57
memberChona117120-Dec-12 1:57 
AnswerRe: Could not load file or assembly Pin
ArpitDubey28-Dec-12 8:50
memberArpitDubey28-Dec-12 8:50 
QuestionHow should I measure scroll position in different browsers Pin
woomla17-Dec-12 21:52
memberwoomla17-Dec-12 21:52 
AnswerRe: How should I measure scroll position in different browsers Pin
Zaf Khan19-Dec-12 5:46
memberZaf Khan19-Dec-12 5:46 
QuestionBest Web Technologies Pin
emadns12-Dec-12 3:40
memberemadns12-Dec-12 3:40 
AnswerRe: Best Web Technologies Pin
David Mujica12-Dec-12 4:22
memberDavid Mujica12-Dec-12 4:22 
AnswerRe: Best Web Technologies Pin
achantayamini17-Dec-12 22:05
memberachantayamini17-Dec-12 22:05 
AnswerRe: Best Web Technologies Pin
jfmorgan33331-Dec-12 10:01
memberjfmorgan33331-Dec-12 10:01 
QuestionJSP and JSTL and so on ... Pin
SheraX11-Dec-12 6:20
memberSheraX11-Dec-12 6:20 
AnswerRe: JSP and JSTL and so on ... Pin
Marcus Kramer11-Dec-12 6:28
memberMarcus Kramer11-Dec-12 6:28 
GeneralRe: JSP and JSTL and so on ... Pin
SheraX11-Dec-12 6:32
memberSheraX11-Dec-12 6:32 
GeneralRe: JSP and JSTL and so on ... Pin
Andrew Stoute11-Dec-12 7:03
memberAndrew Stoute11-Dec-12 7:03 
GeneralRe: JSP and JSTL and so on ... Pin
SheraX11-Dec-12 7:12
memberSheraX11-Dec-12 7:12 
QuestionSMTP Programming Pin
DisIsHoody9-Dec-12 13:49
memberDisIsHoody9-Dec-12 13:49 
AnswerRe: SMTP Programming Pin
vbmike10-Dec-12 8:49
membervbmike10-Dec-12 8:49 
GeneralRe: SMTP Programming Pin
DisIsHoody10-Dec-12 13:30
memberDisIsHoody10-Dec-12 13: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
Web03 | 2.8.150603.1 | Last Updated 6 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid