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?
magedhv
Posts
-
Crystal Report -
Crystal ReportHi 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
-
crystal report problemi don't have crystal report site if u have this depend. just send them please or let me know from can i get them
-
crystal report problemi 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 ??
-
crystal report problemthanks 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 -
crystal report problemi 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
-
Update statementyes that's what i mean i wanna to update 2 tables with one command
-
Update statementcmd.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
-
how can i select two tables in a datagride [modified]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
-
how to show dates in crystal reporti 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
-
crystal reportviewr problems = "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 codeCrystalReportViewer1.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 -
sql statement ..., how can i resolve this errorafter 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. -
sql statement ..., how can i resolve this errori 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 ?? -
help me plziam sorry ok i will put a topic for my question
-
help me plzi 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
-
i need a code for this pleasenow 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 -
urgent plzsorry 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
-
urgent plzno 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"
-
urgent plzafter 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
-
sql statementi 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