Agreed SqldataReader is forward only.... But how can i achieve this...without any grid I have a no of data for a record so i am not using datagrid. I am showing it in different textboxes and dropdowns. On the click of next or previous button the respected textboxes and dropdowns shd be filled automatically with the correct data. Ajay Kumar
MissionSuccess
Posts
-
How to iterate through a dataset and show each record on the web page -
How to iterate through a dataset and show each record on the web pageHello All How can I perform goint to Next,Previous,First and last record of a dataset. All of these events will be fired on click of the respective button. I know that i have to use SqlDataReader but unable to implement the same. Any Code will be helpful for me. Ajay Kumar
-
Export a .net page to PDFMay I have the URL for the same and whether its free or it costs something...
-
Export a .net page to PDFDear All How can i export a web page developed in VS2005 to PDF. May i have some code for the same. Thnk u all in advance. Ajay Kumar
-
Unable to run a report from client PC...Sir I m giving the stacktrace and message of my exception object which generates when i m trying to access my web site from the public IP.. StackTrace:---- at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport() at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FormatEngine() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Refresh() at Mktg_Artwork.frmDisplayRpt.ShowReport() in C:\Inetpub\wwwroot\Mktg-Artwork\frmDisplayRpt.aspx.vb:line Message:--- Load Report Failed. However i have already installed crystal reports for .net framework2.0 on web server Infact I have installed VS2005 on my web server. Still facing the above problem.. Please Sir,help me out.... Ajay Kumar
-
Unable to run a report from client PC...Hello Sir I have already installed Crystal reports for .Net Framework 2.0. But still the same error.. Infact i have installed VS2005 on my web server. But Of no use.... Suggest something Plz...
-
Unable to run a report from client PC...Respected Sir, I have developed a web application in VS 2005. It has a report created in Crystal report. It works fine on my development machine or even on my web server (while the project is running locally on web server itself). But i am not able to get that repport after deploying the project on my server and accessing from client. i am using the URL like http://PublicIP/ProjectName/frmLogin.aspx It shows me the error "Load Report Failed." I have googled a lot but can not get any idea.... My code is------ Dim rptRefForm As RptShowRefForm Dim ref_no, year As Integer Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then ShowReport() End If End Sub Private Sub ShowReport() Try conn = New SqlConnection(constr) cmd = New SqlCommand("spr_getReport", conn) cmd.CommandType = CommandType.StoredProcedure cmd.Parameters.Add(New SqlParameter("@ref_no_toShow", Glb_RefNo)) cmd.Parameters.Add(New SqlParameter("@FinYear", Glb_FinYearFrom)) dadapter = New SqlDataAdapter(cmd) ds = New DataSet dadapter.Fill(ds) rptRefForm = New RptShowRefForm rptRefForm.Refresh() rptRefForm.SetDataSource(ds.Tables(0)) rptRefForm.SetDatabaseLogon("DBUserName", "DBPWD") CrystalReportViewer1.ReportSource = rptRefForm CrystalReportViewer1.DataBind() conn.Close() Catch ex As Exception lblError.Text = ex.Message End Try End Sub And on click of a button i want to export this report in to PDF format... for that i m using... Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click Dim oStream As New MemoryStream ' // using System.IO 'this contains the value of the selected export format. ShowReport() oStream = rptRefForm.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Try Response.BinaryWrite(oStream.ToArray()) Response.End() Catch err As Exception Response.Write("< BR >") Response.Write(err.Message.ToString)
-
unable to run a batch file from client in asp.netExactly I want to run the batch file stored on the server being on a client.
-
unable to run a batch file from client in asp.netRespected Gurus I have to run a batch file in a web application(ASP.net).I am using the following code on click of a web control button. Try System.Diagnostics.Process.Start(Server.MapPath("Imports\DumpPrmaster.bat")) Catch ex As Exception lblError.Text = ex.Message End Try Problem is that i can run this batch file while being on the server.But not from the client machine. How can i run this batch file stored in the Imports folder of my project from the client. dtsrun /SserverIP /Uajay /PPassword /NDTS_Name is the code inside my batch file. Thanks Ajay
-
Export to excel from crystal reportsRespected Gurus I am developing in asp.net1.1 and crystalreports. I have some reports,developed in crystal reports which i have to export to excel. Public Sub exportfinalreport() Dim oStream As New MemoryStream ' // using System.IO 'this contains the value of the selected export format. showfinalreport(dtReportdate) oStream = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel) Response.Clear() Response.Buffer = True Response.ContentType = "application/vnd.ms-excel" Try Response.BinaryWrite(oStream.ToArray()) Response.End() Catch err As Exception Response.Write("< BR >") Response.Write(err.Message.ToString) End Try End Sub The above code successfully export data to excel. But problem is look and feel. Data in excel does not come under their corresponding headers, which creates confusion. Is there a better way to export to excel with a good look and feel.
-
unable to run xp_cmdshell from inside a stored proceduresir i am running it under the administrator account. i logged in to sql-server analyzer through windows authentication. That means i m running it under administrator account. Administartor are already under the sysadmin role. Still the same error.... Please i am little bit confused. help me out
-
unable to run xp_cmdshell from inside a stored procedurei want to run a DTS package from inside a procedure like this ALTER PROCEDURE [dbo].[usp_ImportData] AS begin DECLARE @DTSRUNCommand as varchar(255) SET @DTSRUNCommand = 'DTSRUN /N ' + 'DumpPRMasterToRadhika /E /S ' + '@@MyServer' EXEC master..xp_cmdshell @DTSRUNCommand end its giving me the error sql server does not exist or access is denied please tell me which access rights i require to run it.. i am the system admin on sql-server.
-
line continuation charactersorry sir but i cannot find any forum for vb6.0 here... plz suggest some remedy for my problem... how to use the line continuation character in vb6.0 when u r going to write a update query in a string which goes more than 1024 characters(max allowed.) ex. strsql="update table set fld1='" & txt1 & "', _ fld2='" & txt2 & "' where id='" & myId & "'" this gives me the error "end of statement expected...." plz give me the exact syntax....
-
needed a grid having more than one header.... [modified]Respected gurus I m working with a windows datagrid.i need two headers in my grid. eg.. Product name cat1 cat2 name1 name2 data data data data data data data data How to achieve it. My data is coming from backend. i need it in the windows application...... -- modified at 8:43 Thursday 20th September, 2007
-
How to run a DTS package from a webpage in asp.neti have done that also.... SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO ALTER PROCEDURE usp_ImportData AS begin DECLARE @DTSRUNCommand as varchar(255) SET @DTSRUNCommand = 'DTSRUN /N ' + 'PackageName /E /S ' + '@@ServerName' EXEC master..xp_cmdshell @DTSRUNCommand end GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO it gives me some permission problem. DTSRun: Loading... Error: -2147467259 (80004005); Provider Error: 17 (11) Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 NULL what to do.. i am system admin on the Server. And i have all the rights.
-
How to run a DTS package from a webpage in asp.netdear all i have to run a dts package to dump a table's data to a shared drive. i want to provide this facility to my End Users. whenever they want they shd be able to run that DTS on click of a button for this i have done the following code...... Try Dim dtsp As New DTS.Package dtsp.LoadFromSQLServer( _ ServerName:="servername", _ ServerUserName:="UID", _ ServerPassword:="PWD", _ PackageName:="PackageName") dtsp.Execute() Catch ex As Exception lblError.Text = ex.Message End Try when i run it it does not give any error neither it gives me the desired file,which should be generated after running the dts. on the other hand when i run it manually it generates the same. any suggetion
-
how to hide a particular editcommandcolumn and button column of a particular row of datagrid at runtime.Respected Gurus i have a datagrid in asp.net like.... <%# container.dataitem("RawMaterial")%> <%# container.dataitem("Micron") %> <%# container.dataitem("Density") %>
-
control datagrid1_.... must be placed inside a form tag with runat=server.Respected Gurus I have to export a datagrid to excel in asp.net1.1 my code is:--- Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click Response.ContentType = "application/vnd.ms-excel" ' Remove the charset from the Content-Type header. Response.Charset = "" ' Turn off the view state. Me.EnableViewState = False 'Dim tw As New System.IO.StringWriter tw = New System.IO.StringWriter 'Dim hw As New System.Web.UI.HtmlTextWriter(tw) hw = New System.Web.UI.HtmlTextWriter(tw) ' Get the HTML for the control. DataGrid1.RenderControl(hw) ' Write the HTML back to the browser. Response.Write(tw.ToString()) ' End the response. Response.End() End Sub whenever i run this code i got the error message that control datagrid1_.... must be placed inside a form tag with runat=server. how to resolve it as all the controls are inside the form tag and runat=server attribute is also there. Plz suggest.
-
control datagrid1_.... must be placed inside a form tag with runat=server.Respected Gurus I have to export a datagrid to excel in asp.net1.1 my code is:--- Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click Response.ContentType = "application/vnd.ms-excel" ' Remove the charset from the Content-Type header. Response.Charset = "" ' Turn off the view state. Me.EnableViewState = False 'Dim tw As New System.IO.StringWriter tw = New System.IO.StringWriter 'Dim hw As New System.Web.UI.HtmlTextWriter(tw) hw = New System.Web.UI.HtmlTextWriter(tw) ' Get the HTML for the control. DataGrid1.RenderControl(hw) ' Write the HTML back to the browser. Response.Write(tw.ToString()) ' End the response. Response.End() End Sub whenever i run this code i got the error message that control datagrid1_.... must be placed inside a form tag with runat=server. i chack the same. Plz suggest.
-
Unable to delete the file saved on the server.Thanks sir resolve it was a permission issue. given the rights and now working smoothly.