|
Hello Edwin,
Thanks for ur rply.
But still same problem.
It is showing all the records.
If I am using only this
crystalReportViewer1.ReportSource = NewReport;
then also it is showing all the records.
Rregards,
rahul saini
|
|
|
|
|
may i know the data type of age in your database?
Regards,
Tomi
|
|
|
|
|
Hello Tomi,
Thanks for ur rply.
Its int.
Regards,
rahul saini
|
|
|
|
|
Hi Rahul,
I wonder if u want to show the data if the age is above 50 right?
if u use query:
SELECT * FROM Your_Table Where age < 50
u got an output data age below 50, if u want to show the data where age is more than 50 than u must change your query into :
SELECT * FROM Your_Table WHERE age > 50
i try to my query analizer thats work
Regard,
Tomi
|
|
|
|
|
TomiEdy wrote: if u use query:
SELECT * FROM Your_Table Where age < 50
u got an output data age below 50, if u want to show the data where age is more than 50 than u must change your query into :
SELECT * FROM Your_Table WHERE age > 50
I think U right Tomi, maybe U must check your query Rahul
Regard,
Edwin
|
|
|
|
|
Thank You Edwin
Regard,
Tomi
|
|
|
|
|
SqlDataAdapter adapter = new SqlDataAdapter(yourQuery, conn);
DataSet ds = new DataSet();
DataTable dt = new DataTable("tablename");
adapter.Fill(dt);
ds.Tables.Add(dt);
ds.WriteXml("C:\text.xml");
Then On your crystal report Database Fields:
change your dataset with "text.xml"
If U have finish it, then create a dataset with your query, then change the code like this:
SqlDataAdapter adapter = new SqlDataAdapter(yourQuery, conn);
DataSet ds = new DataSet("YourDataSet");
DataTable dt = new DataTable("tablename");
adapter.Fill(dt);
ds.Tables.Add(dt);
ReportDocument rd = new ReportDocument();
rd.SetDataSource = ds;
crystalReportViewer1.ReportSource = rd;
Regard,
Edwin
|
|
|
|
|
Hello Edwin,
When i m writing the xml it is giving me following error.
ds.WriteXml("C:\text.xml");
Illegal characters in path.
Regards,
rahul saini
|
|
|
|
|
ds.WriteXml("C:\text.xml");
-- \t is the character code for a tab. You need to escape your backslashes by... using another backslash.
ds.WriteXml("C:\\text.xml");
|
|
|
|
|
Hello Edwin,
One of my friend had told me that this issue can be resolved through SELECT EXPERT. Do you had any idea about this.
Regards,
rahul saini
|
|
|
|
|
Hi there .
Look my friend you set you ReportViewer data source it's wrong . you must create new instance of your CrystalReport.rpt file . for example i have an report file named report.rpt .
// Create new instance of your CrystalReport File
Report _Report = new Report();
// Set Report data source ,no your viewer .
_Report.SetDataSource(Your_DataSource);
// Finally set your report viewer report source to your Report file .
crystalReportViewer1.ReportSource = _Report;
DMASTER
|
|
|
|
|
Hi,
I had use this also but again it is showing the same result.(all the records are showing)
this the code i m using
SqlConnection Connection = new SqlConnection("server='sName'; user id='sa'; password='admin'; database='employee'");
SqlDataAdapter DA = new SqlDataAdapter("SELECT empId,empName,empAge from companyEmp where age < 50", Connection);
DataSet DS = new DataSet();
DA.Fill(DS);
newReport objNewReport = new newReport();
objNewReport.SetDataSource(DS.Tables[0]);
crystalReportViewer1.ReportSource = objNewReport ;
Regards,
rahul saini
|
|
|
|
|
Wow , I got it .you are using untyped dataset , right ?
look answer to my question I hope, I can help you .
1: Did you put any typed dataset in your report form ?
2: Did you used directly connection in report ?
Send your email address to my mail : www.Developermaster61@gmail.com
I hope, I elaborate in more detail .
DMASTER
|
|
|
|
|
Hello everyone,
Is there anyone that I can know there was a Mouse Double Click in the MainForm_MouseDown? I currently can detect if there has been a Left or a Right click but I would like to be able to check for Double Click.
if (e.Button == MouseButtons.Left)<br />
{<br />
MessageBox.Show("You have just clicked on " + e.Button + " button.");<br />
MessageBox.Show("X: " + e.X + " -- Y: " + e.Y); <br />
}<br />
if (e.Button == MouseButtons.Right)<br />
{<br />
MessageBox.Show("You have just clicked on " + e.Button + " button.");<br />
MessageBox.Show("X: " + e.X + " -- Y: " + e.Y);<br />
}
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Hello,
I don't think that it's possible in MouseDown, as MouseDown is fired bevore Click and Double Click.
But MouseUp is fired after Click and DoubleClick.
So this would work:
private bool FlagDoubleClick = false;
protected override void OnDoubleClick(EventArgs e)
{
FlagDoubleClick = true;
base.OnDoubleClick (e);
}
protected override void OnMouseUp(MouseEventArgs e)
{
if(FlagDoubleClick)
{
FlagDoubleClick= false;
}
base.OnMouseUp (e);
}
All the best,
Martin
|
|
|
|
|
Hi,
MouseDown event offers MouseDownEventArgs parameter
its Clicks member contains what you need:
on a double click, the event fires twice, once with Clicks=1, once Clicks=2
|
|
|
|
|
Hello Luc,
I just tested it and saw that it works.
But I don't understand why.
When is the Clicks property reseted?
And isn't a Click only a Click if the MouseUp is excecuted?
I'm sure you will clear my confusion!
Thanks for your time!
-- modified at 5:56 Monday 30th July, 2007
Just did additional tests, and now I think I understand it.
Looks like the DoubleClick is fired only by the correct MouseDown delta time, no second MouseUp needed for the validation.
But it get's fired only after MouseUp is excecuted.
I'm not sure if this behaviour is very logic, but who said that programming has to be logic at all!
All the best,
Martin
|
|
|
|
|
Hi Martin,
Martin# wrote: I just tested it and saw that it works
A click consists of a down followed by an up (both keyboard and mouse)
To count clicks, you could wait until you get a click, then increment counter;
or you could simply count physical downs (cant have two physcial downs without an
up in beteen !)
So you may argue that the member name should have been Count instead of Clicks,
but it is no miracle they can make it work.
And you would be right if you don't like MSDN saying "MouseEventArgs.Clicks gets
the number of times the mouse button was pressed and released"
|
|
|
|
|
Hello Luc,
Luc Pattyn wrote: So you may argue that the member name should have been Count instead of Clicks
Would be better!
Specially when you see a scenario, where you:
Make the double MouseDown fast enough for the DoubleClick (so in MouseDown, you get e.Clicks == 2), and then Move the Mouse over an other Control bevor you release the Mouse.
In this case you would assume the DoubleClick is comming because of MouseDown, but it will never get fired.
All the best,
Martin
|
|
|
|
|
Martin# wrote: then Move the Mouse over an other Control
that is why one should use KeyPress and MouseClicked as much as possible,
and only use KeyDown and MouseDown if something really needs to be done
as soon as the user's action starts.
|
|
|
|
|
Hello,
I'm trying to make an application so that I can display an XML document such that it doesnt show the text in the tag names of the XML document. It should show the text in those tags rather than tag names. e,g
<my_tag>This is my Tag
Then it should display 'This is my tag' instead of my_tag. Please tell me how I can do that. The problem is further increased as I want to provide some filtering capability on the basis of this text prior to populating the treeView.
Any help would be highly appreciated.
Thanks
Rocky
|
|
|
|
|
|
I want to develop an input method (using visual studio 2005 and c#) for my mother_language .
(when inputing a character it will lists the words which begin with the character).
anybody can tell me what should I do? please help me!
Ak Hon From the Middle Asia
|
|
|
|
|
I believe that it's possible to build a list of words and set them up to offer auto complete, either in a textbox, or a list box ( not sure of hte details ). If not, you need a list of words, and you need to show a filtered list as someone types.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ak Hon wrote: when inputing a character it will lists the words which begin with the character
Sounds like you are trying to implement some sort of auto-complete? Correct me, if I am wrong
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|