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
M

magedhv

@magedhv
About
Posts
62
Topics
28
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Crystal Report
    M magedhv

    First i'd like to thank you for you reply but i kow this option and i have already unchecked it with no avail the problem that when i run the RPT file it works good but when it run under VB through code it displays the report in wrong way is it because i did inner join in my SQL Statement?

    Visual Basic database sysadmin

  • Crystal Report
    M magedhv

    Hi I need to know the Crystal report4.6 and 9 and 10 code to display the report from VB6 actually i have wrote the below code and it displays the report but not results is not right however it was right when i was designing the report the code is

    Dim cn1 As New ADODB.Connection

    cn1.Open ("provider=SQLOLEDB;server=CAI-MAGEDH-DT;database=Att;user id=-;pwd=-")

    cn1.Execute "drop view CAR"

    cn1.Execute "Create View CAR as SELECT Badgeholder ,Count(DISTINCT bdate) as Days ,9 as rate, Count(DISTINCT bdate) * 9 as Total from Newatt n inner join Bnames b on n.badgeholder = b.Snames group by badgeholder"

    Dim reportfile As New CRAXDRT.Application

    If cn.State = 1 Then cn.Close

    If rs.State = 1 Then rs.Close

    cn.Open ("provider=SQLOLEDB;server=CAI-MAGEDH-DT;database=Att;user id=-;pwd=-")

    rs.ActiveConnection = cn

    rs.CursorType = adOpenKeyset

    rs.LockType = adLockOptimistic

    rs.Source = "SELECT * FROM NewAtt"

    rs.Open

    Dim reports As report

    Set report = reportfile.OpenReport(App.Path & "/car1.rpt")

    report.Database.SetDataSource rs

    Form2.CRViewer91.ReportSource = report

    Form2.CRViewer91.EnableExportButton = True

    Form2.CRViewer91.DisplayGroupTree = False

    Form2.CRViewer91.EnableProgressControl = True

    Form2.CRViewer91.EnableProgressControl = True

    Form2.CRViewer91.ViewReport

    Form2.CRViewer91.Zoom 1

    Form2.Show

    Visual Basic database sysadmin

  • crystal report problem
    M magedhv

    i don't have crystal report site if u have this depend. just send them please or let me know from can i get them

    Visual Basic help sysadmin question

  • crystal report problem
    M magedhv

    i have made a form that can get a kind of search then the user can print it when i was trying this form in my computer it was working but when i make deployment and installing it on another computer he gives me this error could not load file or assembley crystal dedecision .windows form what should i have to do ??

    Visual Basic help sysadmin question

  • crystal report problem
    M magedhv

    thanks so much for ur help but iam beginner so i would like to see an example because i can't get all ur reply any way i will give one of my sql statement but u have to know that each sql statement is different from the other here is the example Dim s As String Call conn() '''''''''''''''''''''''''''' s = "drop view sanad1" cmd.CommandText = s dr = cmd.ExecuteReader() dr.Close() ''''''''''''''''''''''''''''''''''''''' s = "create view sanad1 as select number from sanad where number = '" + TextBox97.Text + "' " cmd.CommandText = s dr = cmd.ExecuteReader dr.Close() s = 0 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Call conn() '''''''''''''''''''''''''''' s = "drop view sanad2" cmd.CommandText = s dr = cmd.ExecuteReader() dr.Close() ''''''''''''''''''''''''''''''''''''''' s = "create view sanad2 as select topic from sanad where number = '" + TextBox97.Text + "' " cmd.CommandText = s dr = cmd.ExecuteReader dr.Close() s = 0 so please tell me what should i do practicaly thanks so much

    Visual Basic help database

  • crystal report problem
    M magedhv

    i have made report of 115 query and it's working well but the problem here is the report is tooooooo slow what can i do please help

    Visual Basic help database

  • Update statement
    M magedhv

    yes that's what i mean i wanna to update 2 tables with one command

    Visual Basic question announcement

  • Update statement
    M magedhv

    cmd.CommandText = "update ceasrjuice set fatname = " & x & " and reglz set fatrname = " & x & " where fatname LIKE '%" & TextBox1.Text & "%' " how can i update two tables with on word according to this condition plz it's urgent

    Visual Basic question announcement

  • how can i select two tables in a datagride [modified]
    M magedhv

    cmd.CommandText = "select * from reglz where fatrname LIKE '%" & TextBox1.Text & "%' " DataGridView1.Refresh() ad.SelectCommand = cmd ad.Fill(ds, "reglz") DataGridView1.DataSource = ds.Tables("reglz") this code for the table that called reglz what i want to do is how can i make this sql statement on 2 tables together at the same time in a datagride in other words i wanna see the 2 tables in the datagride with me condition that i have made in sql statement in reglz which is (where fatrname LIKE '%" & TextBox1.Text & "%' ") then i want to save another word instead of the current one in database and here my working code Dim x As String x = "'" & TextBox2.Text & "'" Call conn() cmd.CommandText = "update reglz set fatrname = " & x & " where fatrname LIKE '%" & TextBox1.Text & "%' " DataGridView1.Refresh() ad.SelectCommand = cmd ad.Fill(ds, "dd") DataGridView1.DataSource = ds.Tables("dd") but how can i apply this code to the 2 table SO what i want is :- how can i select 2 tables to show them in a datagrid how can i save any word for the two tables accroding to my condition . plz help me and thanks

    Visual Basic database help question announcement

  • how to show dates in crystal report
    M magedhv

    i have made sql statement this stamene between 2 dates I mean between datepicker 1 and datepicker2 and i use the results to show it in report what i need is how to put this 2 dates in the report to spacify this report between these two dates so that the report will be this is the results from date1 to date2 and the results is 2467,2378,238732 and so on

    Visual Basic database tutorial

  • crystal reportviewr problem
    M magedhv

    s = "drop view q1" cmd.CommandText = s dr = cmd.ExecuteReader() dr.Close() s = "create view q1 as select sum(fatrq1)reglz from reglz where fatrdate between '" + str + "'and'" + str2 + "'" cmd.CommandText = s dr = cmd.ExecuteReader dr.Close() Form7.Show() in form 7 i put this code CrystalReportViewer1.ReportSource = ("CrystalReport1.rpt") and i saved my report in debug and when i when i click the bottom to show the report he tell me error loading the report is there any one to help me

    Visual Basic help debugging

  • sql statement ..., how can i resolve this error
    M magedhv

    after editing my code like that Dim x, y As String x = DateTimePicker1.Value y = DateTimePicker2.Value cmd.CommandText = "select sum(fatrq1)reglz, convert(varchar,fatrdate,101) from reglz where fatrdate between '" + x + "'and'" + y + "'" dr = cmd.ExecuteReader the vb gives me error Column 'reglz.fatrdate' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.

    Visual Basic question database help

  • sql statement ..., how can i resolve this error
    M magedhv

    i have made this sql statement and it works well but sometimes it show the result and sometimes not this sql statement between two datepicker it works with some date and the other no and sometime it gives error (out of range date) here is my code cmd.CommandText = "select sum(fatrq1)reglz from reglz where fatrdate between '" + DateTimePicker1.Value + "'and'" + DateTimePicker2.Value + "'" 'fatrq1 dr = cmd.ExecuteReader when i want to put these dates it doesn't works (from 1/1/2007 To 1/7/2007) it may work if i enter another dates what ca i do ??

    Visual Basic question database help

  • help me plz
    M magedhv

    iam sorry ok i will put a topic for my question

    Visual Basic database sql-server sysadmin help tutorial

  • help me plz
    M magedhv

    i have a table contain names of clients using sql server 2000 this name contain ("maged","ehab"...... and so on my question is is there anyway to change all this names to one name at runtime by writing any other name in textbox Example: i have in my table : maged ehab hayny i want to change all those for example to: maged maged maged that's all it's urgent plz

    Visual Basic database sql-server sysadmin help tutorial

  • i need a code for this please
    M magedhv

    now i made this code cmd.CommandText = "select distinct * from reglz where fatrname LIKE '%" & TextBox1.Text & "%' " DataGridView1.Refresh() ad.SelectCommand = cmd ad.Fill(ds, "reglz") DataGridView1.DataSource = ds.Tables("reglz") this code will give me some data in the datagride so what i need to do now is ,to select a number of records to edit in the "fatrname" filed from datagrideview but after i select these number of records i dont know how to edit all the field of this "fatrname" or any field for all the records that i select please help me very importnat

    Visual Basic help tutorial

  • urgent plz
    M magedhv

    sorry to tell u that's wrong too i have table here contain some itmes after search he gave me this results maged1 maged2 maged3 .... and here is my sql statement :select fatrname from reglz where fatrname LIKE '%" & TextBox1.Text & "%' after that i want to edit them to only the word maged

    Database database help

  • urgent plz
    M magedhv

    no that's not what i mean but thnaks 4 ur reply i mean when i made this statement he gave me a coloum called fatrname this coloum contain some names like this : maged1 maged2 maged3 all what i mean is if there is any way to type insetad of all these names one word as "maged" only or whatever in another words i want to integrate all these (maged1,maged2, .... )to the word that i want which is "maged"

    Database database help

  • urgent plz
    M magedhv

    after a spacific search criteria (sql statement ) the results was some names required : i want to edit all this records with another name plz help me

    Database database help

  • sql statement
    M magedhv

    i have made this statement "select distinct fatrname from reglz where fatrname LIKE '%" & TextBox1.Text & "%' " then he has display all the results in datagride in this datagride there is some names "mark" and there is some names "marko" what i need is to select all these records to edit them and from textbox we can write marko for all current records to edit all these names how can i do that this is very very urgent plzz

    Visual Basic database 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