Exporting Crystal Reports
Here's an example how to easily export your Crystal Report to xls, pdf...
First thing, you need to have:
using CrystalDecisions;
using CrystalDecisions.Shared;
And, here's a code that exports to xls:
CrystalReport0 crReport0 = new CrystalReport0();
ExportOptions crExpOpt0 = crReport0.ExportOptions;
DiskFileDestinationOptions crExpDest0 = new DiskFileDestinationOptions();
crExpDest0.DiskFileName = sPath;
crExpOpt0.ExportDestinationType = ExportDestinationType.DiskFile;
crExpOpt0.ExportFormatType = ExportFormatType.Excel;
crExpOpt0.DestinationOptions = crExpDest0;
try
{
crReport0.Export();
}
catch
{
throw new Exception ("Error");
}
You can just change ExportFormatType and get rtf, pdf...
[.Net Framework 3.0] Visual Studio extensions
I installed .Net 3.0 VS2005 extensions and I'm very disappointed about it... It doesn't even create default EventHandlers when you double click on some control... You need to write XAML tags to define EventHandlers, and then write EventHandler in code-behind file on your own... You don't even know how it's delegate looks like! I know it's in CTP version, so I think I'll work on .Net 2.0 until new version get's out...
As Microsoft released .Net framework 3.0, they put some free learning materials on eLearning portal. I completed WPF training. It's nothing special, only some core stuff. But it's worth seeing...
Link to eLearning materials
[ASP.Net] validateRequest
Every time we submit some data on the site, ASP.Net is requests validation of user input on the page and if user, for example, wrote <br> in some textbox, you get Server Alert, and page stops execution.
To avoid this, you need to put validateRequest = false; in the Page directive or in the configuration section.
By default, this property is set to true.
System.Data.OleDb.OleDbException: Operation must use an updateable query
I've been working some small web site and on my personal server everything was ok, but when I uploaded site on it's server, this is what I got when I tried to insert some data in my Access database:
System.Data.OleDb.OleDbException: Operation must use an updateable query
There were almost no detalis about the problem... After almost hour of debuging, I discovered that I didn't have permissions to write to my database. Who would think of that!? The funny thing is that this database was created by my provider! I don't know what's the point of database if you can't write into it... I sent email to their admin who gave me appropriate permissions and told me that they never give such permissions by default!
MSCommunity is organizing their first CodeCamp!
It will be held in Zagreb on 16 December, 2006.
I got invitation mail few minutes ago I am very happy about it. I think that such meetings are excellent way to improve your knowledge, and I recommend it to everyone!
You can get more details on
http://codecamp.mscommunity.netSee you there!
And here's my first post...
Today I had a bad experience with Vista RC1 :(
Finally, I found drivers that may work with my Siemens USB Wireless Adapter but at once, there's no Control Panel :)
Weird... I click on Control panel, it opens a window but there's nothing in it...
Then I tried Win+Pause to run System properties, but that didn't work too.
I hope RC2 is better...