Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

Girish_Sharma

@Girish_Sharma
About
Posts
8
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Checkbox List help
    G Girish_Sharma

    I am using Visual Studio 2012 C# ASP.NET on Windows 8 Virtual Machine. In the aspx page I am having below code :

    Act1
    Act2
    Act3

    Act1
    Act2
    Act3

    In the GridView1_RowDataBound I want to write the code for checked options of checkboxlist from database table column name Active_status; i.e. in the table I am storing values like "Act1,Act2,Act3" or "Act1" or "Act2, Act3" etc. So, as user clicks on Edit link button (i.e. putting Gridview in Editmode) the options of this checkboxlist should be checked marked respectively from table. Simultaneously, I wish to update the table as user changes the check option in the table something like "Act1,Act3" if user checked marked on Act1 and Act3 check options like wise in a single string column length 50. I tried to search in google, but no luck. I am not sure, how clear I am asking the question, but if anything confusing or left by me, please let me know. Thanks and Regards Girish Sharma

    ASP.NET csharp asp-net database visual-studio help

  • Complete Editable Datagrid
    G Girish_Sharma

    Hi, Using Visual Studio 2012 Ultimate on Windows 8 64 bit Virtual Machine Using Oracle Database 11.2.0.1 Enterprise Edition I want to develop a web page with a gridview on it which will be populated with Oracle database's 4 tables having all features like add, delete and edit the rows without pressing update/cancle link buttons which I found on my google links. Gridview must have radio button, dropdownlist, textboxes, checkboxes and datatime control with it. The control's values are to be populated from different tables join on a common column customer_id number(5). When I google for it, I found many good links like : Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List[^] and Editable GridView in ASP.NET 2.0[^] and many more. I am not going to request you to provide me the complete code (like spoon feed), but if anyone can share with me link(s) for it, I shall be thankful to you, in which different controls are being populated from different tables and that grid view should be available for update without any click on further link/button etc. How it should function : Suppose below is Grid view looks: Customer_Id (TextBox) Registered On (DateandTime Control) Status (Radio Button) Country (DropDownList) Phone (TextBox) Services (CheckBoxes) Customer_Id from all 4 tables. Registered On from Reg_Master table Active from Customer_Active table (customer_id, status number(1)); If status = 1 then it is active, else inactive) Country from country_master table (customer_id,country_name) Phone from cust_phone table (customer_id,phone_no) Services from service_list table (customer_id,service_code) [Dynamic, i.e. 1 to 20 services are there] and parent table service_master table (service_code, service_name) Now, if user changes status as inactive to active or vice versa, so its effect should only be in customer_active table. If user changes country from country1 to country4 and check/uncheck on its existing service, then its impact should be on country_master and service_list table only. I am not s

    ASP.NET csharp css asp-net database oracle

  • Crystal Report Direct Print
    G Girish_Sharma

    Thank you for your replies. Yes now object error has been removed; but now i am getting further error : Dim host As New System.Net.IPHostEntry host = System.Net.Dns.GetHostEntry(Context.Request.ServerVariables("REMOTE_HOST")) Dim strSystemName As String = host.HostName Dim strPrinterName As String = "Generic / Text Only" TextBox1.Text = strSystemName 'Here i am getting 127.0.0.1 not \\mymachine name as you said i.e. \\RAJA In my case it should be \\GIRISH (as this machine where i am using) or on another client machine it should be that client machine's name. rptprint.PrintOptions.PrinterName = strSystemName + "\\" + strPrinterName rptprint.PrintToPrinter(1, False, 0, 0) So, i am getting error : (A new error windows pop up) COMException was unhandled by user code Invalid printer specified. Troubleshooting tips: Check the ErrorCode property of the exception to determine the HRESULT returned by the COM object. Get general help for this exception. Regards Girish Sharma

    ASP.NET com question

  • Crystal Report Direct Print
    G Girish_Sharma

    Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ocn As New System.Data.OracleClient.OracleConnection Dim oda As New System.Data.OracleClient.OracleDataAdapter("select empno,ename from emp", ocn) Dim ods As New System.Data.DataSet() ocn.ConnectionString = "Data Source=orcl;User ID=scott;Password=pw;Unicode=True" oda.Fill(ods) Dim rptprint As New CrystalDecisions.CrystalReports.Engine.ReportDocument() rptprint.Load(Server.MapPath("Reports").ToString() + "\\CrystalReport.rpt") 'TextBox1.Text = ods.Tables(0).Rows(0).Item("empno") 'This is no error rptprint.SetDataSource(ods) 'This is no error CrystalReportViewer1.ReportSource = rptprint 'This is error of object instantiate. 'CrystalReportViewer1.DataBind() ''rptprint.PrintOptions.PrinterName = DefaultPrinterName() ''rptprint.PrintToPrinter(1, False, 0, 0) 'TextBox1.Text = DefaultPrinterName() rptprint.Close() rptprint.Dispose() ocn.Close() ocn.Dispose() ods.Dispose() oda.Dispose() 'Dim host As New System.Net.IPHostEntry 'host = System.Net.Dns.GetHostEntry(Context.Request.ServerVariables("REMOTE_HOST")) 'Dim strSystemName As String = host.HostName 'Dim strPrinterName As String = "Generic / Text Only" 'rptprint.PrintOptions.PrinterName = strSystemName + "\\" + strPrinterName End Sub Public Shared Function DefaultPrinterName() As String Dim oPS As New System.Drawing.Printing.PrinterSettings Try DefaultPrinterName = oPS.PrinterName Catch ex As System.Exception DefaultPrinterName = "" Finally oPS = Nothing End Try End Function End Class This is what i have in default.aspx.vb file. I have : 1.one crystalreportviewer control 2.one button control 3.one textbox control I have not yet used your code, because this object instance error is frustraing me. Regards Girish Sharma

    ASP.NET com question

  • Crystal Report Direct Print
    G Girish_Sharma

    First let me thank you again. Here 3 issues : 1."Object reference not set to an instance of an object." I am not getting why it is giving me this error... TextBox1.Text = ods.Tables(0).Rows(0).Item("empno") -- No error rptprint.SetDataSource(ods) -- No error 'CrystalReportViewer1.ReportSource = rptprint -- Error I have already placed the crystalreportviewer1 control on the page. 2. Since i am using VB for this page, so i am not able to write the System.Net.IPHostEntry host; code. So, please check the VB conversion is right ? Dim host As New System.Net.IPHostEntry host = System.Net.Dns.GetHostEntry(Context.Request.ServerVariables("REMOTE_HOST")) Dim strSystemName As String = host.HostName Dim strPrinterName As String = "Generic / Text Only" rptprint.PrintOptions.PrinterName = strSystemName + "\\" + strPrinterName 3. As far as backend concern, i do'nt think that oracle or sql server is playing any role in this case. I am just using a table and not able to get the error reason. Actually, i am having less experience in dotnet (printing issues). If my client side printing issue (line matrix / dot matrix, because we need thousands of page printing, after data processing) solves, then i think i would be able to convert my all current foxpro based applications into dotnet using oracle (because i am an OCP). Thanks with Kind Regards Girish Sharma

    ASP.NET com question

  • Crystal Report Direct Print
    G Girish_Sharma

    Thanks again for your reply. I am using below code with one crystalreportviewer and one button control on web page.

    Protected Sub Button1\_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ocn As New System.Data.OracleClient.OracleConnection
        Dim oda As New System.Data.OracleClient.OracleDataAdapter("select empno,ename from emp", ocn)
        Dim ods As New System.Data.DataSet()
        ocn.ConnectionString = "Data Source=orcl;User ID=scott;Password=pw;Unicode=True"
        oda.Fill(ods)
        Dim rptprint As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
        rptprint.Load(Server.MapPath("Reports").ToString() + "\\\\CrystalReport.rpt")
        rptprint.SetDataSource(ods)
        CrystalReportViewer1.ReportSource = rptprint
        CrystalReportViewer1.DataBind()
        ''rptprint.PrintOptions.PrinterName = DefaultPrinterName()
        ''rptprint.PrintToPrinter(1, False, 0, 0)
        TextBox1.Text = DefaultPrinterName()
        rptprint.Close()
        rptprint.Dispose()
        ocn.Close()
        ocn.Dispose()
        ods.Dispose()
        oda.Dispose()
    End Sub
    Public Shared Function DefaultPrinterName() As String
        Dim oPS As New System.Drawing.Printing.PrinterSettings
        Try
            DefaultPrinterName = oPS.PrinterName
        Catch ex As System.Exception
            DefaultPrinterName = ""
        Finally
            oPS = Nothing
        End Try
    End Function
    

    But i am getting error "Object reference not set to an instance of an object." at line CrystalReportViewer1.ReportSource = rptprint. And one more thing it is not returning me the correct default printer name as i have shown in textbox1 control. Kindly help me to get the direct print using crystal report on clicking of a button on client's line matrix / dot matrix printer. I have set "Generic / Text Only" as their default printers. Regards Girish Sharma

    ASP.NET com question

  • Crystal Report Direct Print
    G Girish_Sharma

    Thanks for reply and your concern for answer. I just want to know how it will print on client machine using above code. I mean what should i write in : string strSystemName = "\\\\RAJA\\"; string strPrinterName = "SAMSUNG"; Let me once again clear my question. I need to send the crystal report output directly on different cleint machines, on clicking of a button. In the above example how do i get the strSystemName and strPrinterName for unknown client machines. Regards Girish Sharma

    ASP.NET com question

  • Crystal Report Direct Print
    G Girish_Sharma

    Hello, I have created one crystal report. On the default.aspx page, i have added crystalreportsource and crystalreportviewer and set its report sources. Crystalreport.Printmode=Activex. I want the output should come : (A) On screen (B) Directly to the client printer machine simantenously. On client machines i have set Generic printer as default. How do i get the output on page and directly on printer simantenously on clicking of a button. Regards Girish

    ASP.NET com question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups