|
behzadcp wrote: of curse i get this code from this site mean codeproject
Then you should post your question in the forum below the article where you got the code, so the person who wrote the code will see your problem.
It's time for a new signature.
|
|
|
|
|
Hi All,
The Problem:
I currently have a few hundred crystal reports which get populated via an ODBC connection. I have to programmatically change this so I can populate a DataSet from a csv file and then populate a report based on the dataset. The main aim is to do this without actually modifying any of the reports (as that would mean months of re-testing of hundreds of reports....and common, who likes to fight with the testing department ;->)
The ideal solution:
My app gets 3 parameters 1) actual report location, 2) report parameter csv file location 3) report data csv file location. To over-ride the ODBC connection specified in the report and populate the report via a dataset populated from the specified csv file.
So far:
At the moment I load the report, populate the report's parameters with those specified in the csv file, create a dataset based on the data csv file and set the report dataset with cryReport.SetDataSource(ds.Tables["tableX"]). The table name in the dataset has been kept the same as the default table name used in all the reports.
The problem seems to be that the report is not pulling in any of the data specified in the DataSet? As far as I can gather from searching the net, you can only populate a report with a strongly typed dataset? I don't see how you can create a strongly typed dataset programmatically for each dataset every-time the application is called, as this cannot be done beforehand.
I would appreciate any direction or help with this problem!
Thanx,
MC
|
|
|
|
|
I can't help with your problem, but it is a very bad idea to post your email address to any forum - not just codeproject. Unless of course, you really like spam...
Change your name! If anyone really wants to contact you privately, there is a option to allow emails at the bottom of each message - this sends an email to your registered address without revealing it to the sender.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi,
I'm trying to re-host wf 4.0 designer (done that) and use custom activity controls that have similar behavior with FlowSwitch. Could you tell me how I could do a custom FlowSwitch with modifiable content( I need a custom picture and a custom textbox). If anybody could give me an example would be great.
Another question is how do I register to events like FlowNode click on a flow chart?
Thank you
|
|
|
|
|
I would like emptying TexBox who are in treatment but in the event selectedchanger:
texbox.text = String.Empty , find an error message because the content of the TexBox changes.
can you help me??
thank you
|
|
|
|
|
tek 2009 wrote: an error message
interesting
tek 2009 wrote: can you help me??
sure
|
|
|
|
|
|
Maybe he means "an error message". Its very specific and helps to guess what your problem is.
Next time write "My application crashs!" to get some more wild guesses.
Greetings
Covean
|
|
|
|
|
He was making a point of being as unspecific as you were.
If you get an error message and need help with it, then include what the error message was.
|
|
|
|
|
Hi there ,
You can't empty the text box while it's changing , it would be user hostile !
I recommended this :
private void textBox1_Enter(object sender, EventArgs e)
{
textBox1.SelectAll();
}
So the user can empty the text box with one Button click
Please , Don't Mind the Other posters ! , they just didn't read the rules !
I know nothing , I know nothing ...
|
|
|
|
|
Hi,
I'm using picturebox to show some images that my application hold.
I want to mark with some square part of my image ( mark in the code ).
How can i do it ?
Thanks.
P.S I'm using simple winform (not WPF)
|
|
|
|
|
You'll need to create a watermarked version of the Image before setting it into the PictureBox control.
/ravi
|
|
|
|
|
Maybe you want something like the following:
Graphics g = Graphics.FromImage(pb.Image);
g.DrawRectangle(Pens.Red, pbleft, pbtop, pbwidth, pbheight);
g.Dispose();
This will draw a red rectangle in your image. Is that what you want?
|
|
|
|
|
I don't think the PictureBox will even be aware you did that. You would have to reload the image or otherwise signal it about the change.
BTW: I think PictureBoxes are crap anyway, one should not even try and do such complex things to them.
|
|
|
|
|
That's probably true. In that case
Image im = pb.Image;
Graphics g = Graphics.FromImage(im);
g.DrawRectangle(Pens.Red, pbleft, pbtop, pbwidth, pbheight);
g.Dispose();
pb.Image = im;
|
|
|
|
|
I have to Get data from database and fill data into ListBox using javascript. I did like below
var strConn = 'Provider=SQLOLEDB;server=localhost;user id=sa;pwd=***;initial catalog=xxx;';
var cn = new ActiveXObject("ADODB.Connection");
cn.open(strConn);
var rs = new ActiveXObject("ADODB.Recordset");
rs.Open('SELECT EmpId,Name FROM Employee', cn);
rs.MoveFirst
while(!rs.eof)
{
var opt = document.createElement("Option");
opt.text = rs.fields(1);
opt.value = rs.fields(0);
document.getElementById(ListBoxCtrlName).options.add(opt);
rs.movenext;
}
rs.close;
cn.close;
This is working fine in IE only when access datasource across domains enabled otherwise listbox not getting data.How can I fix this issue in IE And FireFox
|
|
|
|
|
Try posting this in the Javascript forum?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
As mentioned you should have posted this to the JavaScript forum.
ActiveXObject is an IE object and not officially supported in FireFox, AFAIK. Most importantly though you are exposing the details of your database, username, password, table, table structure; a huge breach of security.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Oh jeez, not only a conn string in javascript, but a conn string with an sa password!
Looks like im going to be employed for the foreseeable future.
|
|
|
|
|
If you had done little search on internet, you would have found the answer.
Here is your solution.
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Good Day All
I have a Class that is defined like this
namespace EAVV
{
public class EAV
{
private string _Attribute;
private string _Value;
public string Attribute
{
get
{
return _Attribute;
}
set
{
_Attribute = value;
}
}
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
}
}
public EAV(string AttributeEA, string ValueEA)
{
this._Attribute = AttributeEA;
this._Value = ValueEA;
}
public EAV()
{
}
}
}
And I have another one to process this like this
namespace EAVV
{
public class EAVProcess
{
public List<EAV> GetRecords(List<string> ParentRecords,List<string> ChildRecords)
{
List<EAV> Final= new List<EAV>();
for (int i = 0; i < ParentRecords.Count; i++)
{
for (int J = 0; J < ChildRecords.Count; J++)
{
Final.Add(new EAV(ParentRecords[i], ChildRecords[J]));
}
}
return Final;
}
public EAVProcess()
{
}
}
}
And as you can see this will return a list. So I am binding my Grid(Telerik) which is the same as binding the normal asp.net grid like this
RadGrid1.DataSource = EAVobj.GetRecords(ParentRecordsRow, ChildRecordsField);
RadGrid1.DataBind();
And I get the Following Data
http://www.telerik.com/ClientsFiles/212012_grid-hierachy.JPG[^]
from the Image, You can see there is an Attribute Column and there is a Value Column, Now what i want to do is that i want to have only one Country and one Event in the Attribute and the Values must be nested underneath each other in a Grid, so basically i need a nested View and the Attribute is the parent and the Values will be grouped according to their parent.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
If I am not mistaking this may solve your purpose
namespace EAVV
{
public class EAVProcess
{
public List<EAV> GetRecords(List<string> ParentRecords,List<string> ChildRecords)
{
List<EAV> Final= new List<EAV>();
for (int i = 0; i < ParentRecords.Count; i++)
{
--Put a check for child records exists and add
Final.Add(new EAV(ParentRecords[i], ChildRecords[0]));
--Start looping from 2nd J = 1 instead of 0
for (int J = 1; J < ChildRecords.Count; J++)
{
--remove ParentRecords[i]
Final.Add(new EAV("", ChildRecords[J]));
}
}
return Final;
}
public EAVProcess()
{
}
}
}
|
|
|
|
|
This is wonderful
Thank you very much you are a star
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
I wrote some simple class with 3 fields ( lets say that the fields are RGB ).
and i have some UI to define the value of those fields.
The UI is on class A and the class with the RGB values is in other class.
Now, I want to do binding between those two classes -
I mean that i want to do 'auto update' if the value in the UI change - and this 'auto update' will set the field value.
How can i do it ?
Thanks.
|
|
|
|
|
In your RGB class:
Inherit iNotifyPropertyChanged
create the Notifychange event
Create the properties for RGB
Implement the InotifyChanged in the setter
In you UI
Instantiate the RGB class
add a databinging to the controls binding to the rgb properties in that class
Never underestimate the power of human stupidity
RAH
|
|
|
|