Updating Crystal Reports .NET if You Change the XSD

One method of creating Crystal Reports is to use an ADO.NET Dataset (for good advice please read Reporting Off ADO.NET Datasets).  To create the report from a dataset, you have to model the dataset in an XML Schema Document, which has the .XSD extension.  You use the XSD as the ‘source’ of your report at design time, and at runtime, set the data source to the ADO.NET dataset in memory.


From time to time, requirements for your reports change, and you have to change the dataset.  If you used an XSD to design your report, you need to follow these steps to update your report:


1) Update your XSD.  Either make the changes manually, or re-create the entire document, whichever is easier.
2) Open your report in design view in VS .NET.
3) Open the Field Explorer, and right-click on “Database Fields”.
4) Choose “Set Location…” from the menu.
5) Choose the data source you wish to update in the “Current Data Source” dropdownlist.  You can choose either the entire dataset, or just a single table (in many cases, there will only be one table per dataset, so either choice is as good as the other in this case).
6) In the “Replace with” window, expand “More Data Sources”, then “ADO.NET (XML)”.
7) Double-click “Make New Connection”.  You may see your dataset listed, however, I have found from experience that sometimes you need to overwrite the cached version.
8) In the new window, browse to your XSD and choose “Finish”.  Leave “Use Visual Studio Data Class” unchecked.
9) If you have a table chosen in the “Current Data Source” dropdownlist, highlight the replacement table you just added, and click “Replace”.  If you have a dataset chosen, highlight the replacement dataset and click “Replace”.  If the “Replace” button is not activated, you need to make sure you have the correct structure chosen in both places.
10) Click “Close”.  You may be asked to remap fields if any field changed its data type.  To map the fields, un-check “match type”, and match fields one by one, clicking “Map” after each selection.  Do this until all the fields that need to be re-mapped have been re-mapped.
11) You should now see all yoru changes reflected in the Fields Viewer (you may have to expand “Database Fields”).

Awesome iPod Earphones


http://www.etymotic.com/ephp/er6i.asp



6i isolator earphones are designed specifically for use with the Apple iPod and other small portable players, offering 8 dB higher overall sensitivity and slightly more bass than the ER-6 isolator earphones.


I just received a pair for my birthday…incredible!  I use a similar triple-flange earplug when shooting, and these plugs block a ton of background noise.  This means you can keep the volume at a very low level when listening, so your hearing is preserved.  These are awesome for mowing the lawn–can’t hear the lawnmower, and again, the volume can stay low.


The sound quality is very impressive–music is clear and crisp.  It’s a little tricky to insert these correctly the first couple of times, but you can tell easily by the sound.  There are aspects of music I hadn’t heard before!  For instance, in Tom Petty’s “Even the Losers“, there’s a small pause between the intro and the main song.  I always thought it was blank space, but there’s actually a woman’s voice (quietly) shouting “It’s just the normal noises in here!“.  No idea that existed.


I don’t recommend these if you have co-workers who enjoy sneaking up on you, or if you have to answer the phone a lot.  You simply won’t hear what’s going on.  Which is great for mowing the lawn, or travelling on a plane.


(originally posted 2004-09-29 on a different blog site)


<update 2005-07-22>


Now that I’ve been using these earphones for a while, I’m even more impressed.  The soft silicone plug fits my ears very nciely, and blocks a lot of sound.  When mowing the lawn, the lawnmower is a dull hum, and softer sounds aren’t even heard.  I can listen to my iPod at slightly above normal volume, and my ears aren’t ringing when I’m done (which is usually about 2 hours).  Neighbor’s kids screaming in the yard when you want a quiet moment on your deck?  No problem–you won’t hear them with these earphones in, either listening to your iPod or not.


I’ve made several plane flights using these, a few in excess of 5 hours, and it’s amazing to get off a plane without that jet engine hum ringing around in your head.  Very pleasant.  A few times I’ve had to take the plugs out to equilibrate the pressure, but that’s no big deal.


On a sweaty day, or after a lot of use, you can build up a little crud on the plugs.  That’s easiest to clean off just after you take these earphones out.  Use a dry cotton swab and gently run the tip between the flanges.  Good as new.

SQL Server Reporting Services and Crystal Reports: A Competitive Analysis

Brian Bischof, author of Crystal Reports .NET Programming, has posted a comparison of SQL Server Reporting Services and Crystal Reports:



During 2004, Microsoft grabbed the attention of the Visual Studio .NET community by announcing a new reporting product: SQL Server Reporting Services (SSRS). Not only did they promise to give programmers a new reporting tool, but it was going to be free as well. Suddenly everyone was comparing Reporting Services to Crystal Reports – the report designer that has been bundled with VB since VB 3 and integrated into Visual Studio .Net (and will also be included in the next release of Visual Studio .Net 2005).


The goal of this paper is to illustrate differences between SSRS and the current version of Crystal Reports, Crystal Reports XI (version 11). Each product has its strengths and weaknesses and these are highlighted here. It’s important to evaluate each product and consider which one works best for your application’s reporting requirements.


 

Open PDF Outside of Browser

This question has passed my threshold of answering as forum posts, so it’s going on the blog:



Does anyone know how to export a crystal report into a seperate adobe reader instead of embedding the reader into the current browser window?

I am successful in exporting to pdf and excel, but it would be great if I could bring up a “save as or open” prompt.

Any ideas would be greatly appreciated.


The “save as or open” prompt is something the browser does automatically when it encounters a file type it can’t open itself (either unknown file type or viewer program unknown).  There is a setting in Acrobat Reader you can use to override this, but it’s one the clint has to make–you can’t script it.  For Reader 6, go to Edit >> Preferences >> Internet, and uncheck “Display PDF In Browser”.


If this doesn’t solve your problem, try reading CodeSnip: Opening Crystal Reports in a New Window in ASP.NET.

MP3 Driving Directions

IPoding reports on MaP3, which uses Text-to-Speech to convert driving directions into MP3 files.  From Map3’s website:



MaP3 will give you the best driving route to take between any two addresses in the United States and Canada. While there are other websites that give driving directions, MaP3 is the only website that gives them to you as spoken directions, delivered in MP3 format to your email inbox! Instead of reading your directions as you drive, you’ll be listening to them on your MP3 player or, by burning them to a CD, in your car’s stereo deck!


MaP3 provided a sample to IPoding you can listen to.  Definately a cool idea, but you’ll need cat-like reflexes to keep up with the spoken directions.

Thank You Mindsharp!

I received my free SharePoint posters today, and I can only say “Wow!  Thanks Mindsharp!”.  They are detailed and yet still nicely laid out.  My mental image of SPS configuration is no longer an endless maze with randomly moving walls (and no cheese).  The SPS poster very nicely turns the mess into a tree diagram.  If you plan on hanging them up, make sure you plenty of wall space available.  The WSS OM is big–about 4 feet wide (about 1.3m)!  The other two combined are just about as wide.

Free SharePoint Posters

Mindsharp is offering as set of SharePoint posters free if you register at their site.  There are three posters in the set:



Windows SharePoint Services Object Model Poster
The Windows SharePoint Services (WSS) object model consists of eighteen namespaces in nine assemblies. It is written in .NET managed code using C# so it is easily accessible via ASP.NET or any other server process. Anything that can be done using SharePoint’s application and administrative interfaces can also be done using it’s object model. Although the SharePoint SDK is helpful, it can be difficult to see the big picture.
Mindsharp’s FREE* WSS Object Model is a 3’x4′, color-coded, graphical depiction of the relationship between WSS collections, object, methods, fields (constants), properties, and enumerations in several core namespaces.


Windows SharePoint Services Administration Roadmap
Increase your productivity with Mindsharp’s FREE* Windows SharePoint Services (WSS) Administration Roadmap. This 2’x3′ poster presents the complex infrastructure of the administrative links presented by Windows SharePoint Services.


SharePoint Portal Server Administration Roadmap
Mindsharp’s FREE* Sharepoint Portal Server (SPS) Administration Roadmap is a 2’x3′ poster containing all Site Settings and Central Administration menus. This enables you to see the complex infrastructure of Portal’s administrative links.


*Note: One set of posters is available at no cost to residents of the US, UK, and Canada. Additional sets can be purchased for $20 (our cost to produce, package, process, and post). Electronic versions of the posters are also available for $45/each (entire set must be purchased).


You can get a good view of the WSS Object Model poster at http://MindsharpBlogs.com/Todd/archive/2005/02/23/330.aspx.


Mindsharp was founded by Bill English and Todd Bleeker, both of whom have blogs at www.mindsharpblogs.com, all of which I’ve found to be very interesting so far (some of the posts are deep topics–not so much for beginners).  Bill is also part of the new SharePoint Advisor magazine.

Deciphering Microsoft-ese

We’re all familiar with MS’s “marketecture”, and its coopting of whatever buzzwords are hot in the newspapers at the time of announcement into strange acronyms.  Generation X gave us “ActiveX”, the Human Genome Project gave us “Windows DNA” (WTF?), and the Internet gave us, well, Dot Net.  MS is also famous for its creative names for everyday items.  For the beginner, here’s an introduction to Microsoft speak, as deciphered by an outsider:








































Microsoft Term Real Life Translation
Guide Book
Resource Kit Big book with a CD
Book Guide published by someone else
Software Development Kit Guide, downloadable as CHM file only
Help file Confusion
Code Sample Don’t do it this way, but here’s some code to make you happy, unless you program in the other language
Demonstration Useful information in between technical difficulties
Level 100 Lots o’ Powerpoint Slides
Level 200 Less slides, some code samples (see above)
Level 300 Fewer slides, some code samples, and some demos (see above)
Level 400 One slide for the cover, and one slide to introduce 60 minutes of code samples and demonstrations


I am seriously of the opinion that Microsoft’s marketing group stands much bigger in the marketing world than MS’s programmers do in the programming world.

Color Picker w/ Colorblindness Settings

On my CAPTCHA Images post, Patrick Santry mentioned he ran into one he couldn’t decipher due to his colorblindness.  I’m also colorblind, but have yet to hit one I couldn’t figure out, and that may be due to luck, or varying degrees of colorblindness.  I do, however, master a website I can barely read.  It was designed by women (and targeted mainly for women), who claim they have no problems whatsoever.  Its frustrating for me, especially since I’m “in charge“ of the thing.


Color blindness affects about 15% of the overall population, nearly all of whom are males (sex linked trait–I’ll explain it in another post if you ned me to).  When choosing colors for a website, especially one where you’re likely to have a large numebr of male visitors, color selection can be important.  My favorite color picker allows you to choose web safe colors that take into account colorblindness.


http://www.pixy.cz/apps/barvy/index-en.html

Set Number Of Copies When Automatically Printing Crystal Reports .NET

These questions were received as a private comment in response to my Automatically Printing Crystal Reports in ASP.NET article:



Very useful and interesting article. Thanks a lot. I wanted to use this in a .Net app. Can we determine the number of copies to be printed dynamically using the second method(javascript)? Say If the user clicks on the print button (HTML submit button), the application would pre-determine how many copies can be printed for that user and automatically print them?
Also, the second window was opening in full size for me instead of 0 height and width. Please let me know what I’m doing wrong here?
Again…this is a wonderful article.


To the best of my knowledge, I don’t think you can set the number of copies to print through JavaScript.  When printing from a browser, all print settings are handled through the browser’s print dialog, and I don’t know of any way to script that without getting into ActiveX and trust permissions.


It’s tough to tell what’s going on in the second question because there are a couple of code snippets that open new windows.  My best guess would be that the script string isn’t being renered correctly.  View the source of the parent page, and look for the rendered script string.  Make sure it’s correct after it’s rendered.