|
I have used the Dundas Chart for Reporting Services component to solve a similar problem, i.e. applying custom rendering to a Reporting Services chart. The Dundas Chart component exposes a PostPaint event which allows a developer to draw onto the chart surface area. Code is written against the chart control in C#.
The component isn't cheap, but it does open up new possibilities for charting with Reporting Services. It is especially useful when you need to apply your own customizations to a chart that don't come out of the box.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks, that's one of the solutions I am looking at. However, this is the only requirement I have (so far) which doesn't come out of the box. So I'm not sure if I can get approval to purchase a license just so I can draw a couple rectangles. Of course it's beginning to look like my time to develop it myself will cost a lot more than just to license a 3rd party charting solution.
|
|
|
|
|
Something else I have tried in the past is writing a custom assembly in .NET that internally renders a Reporting Services chart. This can be achieved by using the web services that Reporting Services exposes to programmicically render a report. You could develop a report that simply consists of the chart you want to display. If you request this report through the web service, the data for your report will be returned as a byte array. You can create an image from this data and then use the graphics capabilities in the .NET Framework to alter the image to your requirements. You could create a custom component to do all this by following the Microsoft article.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thanks, that's a good idea. I'll give it a shot.
|
|
|
|
|
Hi,
Problem:
I'm using C# 2005. The data type of the bitmap file saved to database is "long binary data". It should be "OLE Object".
Source Code:
Bitmap myBitmap = new Bitmap(@"c:\Picture1.bmp");<br />
OleDbConnection conn = new OleDbConnection("<<My Connection String>>");<br />
conn.Open();<br />
string sql = "UPDATE Table1 SET fldOLE = @fldOLE WHERE fldID = 5";<br />
OleDbCommand command = new OleDbCommand(sql, conn);<br />
command.Parameters.Add(new OleDbParameter("@fldOLE", myBitmap));<br />
int rowsAffected = command.ExecuteNonQuery();
Question:
How can I save Bitmap to database with data type "OLE Object"?
Thanks in advance
|
|
|
|
|
Please don't cross post.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All,
I am trying to get a file from an Ftp and Copy data (*csv file) on to one of my tables in SQL 2005 database.
I am not sure but SQL server 2005 integration service has a way to create a package that allows me to do this task.
Can any one tell me how to go about it?
your ideas are much appreciated.
Thank you
|
|
|
|
|
Use the FTP task to copy the file to an accessable directory, then you can create a data flow task which uses a flat file source, processes the file and then puts the data in the appropriate data flow destination.
Your package designer should resemble this:
<br />
FTP Task --> Data Flow Task<br />
Open the Data flow task (double-click) and it should resemble this:
<br />
Flat File Source --> [intermediate transformations you may need (if any)] --> Sql Server Destination<br />
Just drag the items mentioned to the designer surface, open each item and set the properties needed.
|
|
|
|
|
Hi,
Can I total a detail column at group level on reprting services. I can see how I would put a footer in and total from the SQL but I need things totalling down the page at a smaller level.
e.g.
Sales
Product Type
House Product Uk Sales India Sales
DVD 6 10
Oven 7 12
Total 13 22
Garden Trees 10 15
Fences 34 10
Total 44 25
Any help welcome !
Thanks in advance
|
|
|
|
|
Hi
i am creating dataTable at runtime and binding rows at runtime . how to insert the all the rows in dataTable to database
|
|
|
|
|
Create a Command object which defines the INSERT command then create a DataAdapter object and assign your Command object to the adapter's Insert command. Make sure when you define the data table object to map the datatable's column names to the parameter objects in the insert command you created.
|
|
|
|
|
the code in my application is:
OleDbCommand com = new OleDbCommand();
com.Connection = con;
com.CommandText = "UPDATE tblUsers SET Password=? WHERE UserName=?";
com.Parameters.Add("UserName", OleDbType.WChar);
com.Parameters.Add("Password", OleDbType.WChar);
com.Parameters["UserName"].Value = this.UserName;
com.Parameters["Password"].Value = this.txtPassword1.Text;
-------------------------------------------------------------------------------
When I run the application , it gives the syntax error in update query.
I am unable to find where I am going wrong
Kindly help me!
Sadaf
|
|
|
|
|
Why not you try this:
com.CommandText = "UPDATE tblUsers SET Password='" + this.UserName.Text + "' WHERE UserName='" + this.txtPassword1.Text + "'"
Do good and have good.
|
|
|
|
|
Silent Eagle wrote: com.CommandText = "UPDATE tblUsers SET Password='" + this.UserName.Text + "' WHERE UserName='" + this.txtPassword1.Text + "'"
Shouldn't that be:
com.CommandText = "UPDATE tblUsers SET Password='" + this.txtPassword1.Text + "' WHERE UserName='" + this.UserName.Text + "'"
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks, Yes you are right. It is written mistakenly but i think it conveys the concept.
Do good and have good.
|
|
|
|
|
Thanks all for ur kind help but its still giving the same error!
Sadaf
|
|
|
|
|
There are two major flaws in your code:
1. Generating SQL statements on the fly is generally considered bad practice. It leaves you exposed to SQL injection attacks. Instead, consider writing a stored procedure to perform your update and call it from your .NET code.
2. You appear to be storing your user's passwords in clear text. This is very insecure. You should consider encrypting your password using a 1-way salted hash algorithm.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
try this code
OleDbCommand com = new OleDbCommand();
com.Connection = con;
com.CommandText = "UPDATE tblUsers SET Password=? WHERE UserName=?";
com.Parameters.Add("UserName", OleDbType.WChar);
com.Parameters.Add("Password", OleDbType.WChar);
com.Parameters["UserName"].Value = this.UserName.Text;//Error was here
com.Parameters["Password"].Value = this.txtPassword1.Text;
|
|
|
|
|
try this
com.CommandText = "UPDATE tblUsers SET [Password]='" + this.txtPassword1.Text + "' WHERE [UserName]='" + this.UserName.Text + "'"
I Love SQL
|
|
|
|
|
No. Don't do this. Haven't you heard of SQL Injection Attacks? Have a read through the many wonderful articles before you find out why this is wrong, oh so wrong.
|
|
|
|
|
Sure I have attention about SQL injection attacks...
I Love SQL
|
|
|
|
|
If you are aware about SQL Injection Attacks, then why do you recommend something that is wide open to such an attack? It's your responsibility when posting an answer to give good advice and not to post something that is such blatant bad practice.
|
|
|
|
|
but it's not my responsibility to teach others about SQL injection all of programmers must know about SQL injections...
Why you not gonna explain him about SQL injections?
I Love SQL
|
|
|
|
|
Hi,
I have a database called MyDatabase and I am looking to create another datebase called MyDatabase_Dev with the exact same tables and data in it, I want no primary keys that are lost and no auto numbering that it not set.
I can't remember how to do this. I tried Import data on the MyDatabase_Dev, but I loose primary keys and auto numbering. I am using SQL Server 2005.
Thanks
Brendan
|
|
|
|
|
Backup your database, then restore it under a different name.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|