Ok, this seems like it would be common knowledge, but I couldn't find a good way to reference controls in a wizards header template. Now, if you look at the MSDN Help it says use the Wizard.FindControl method, but this doesn't work. Looking for it in the Wizard.Controls also doesn't work. The first few implementations that I found on the web suggested using the ClientID of the control and the Page.FindControl method, but this is a bit hacky to me.
After some searching for the answer, 3 pages deep in google found me this gem:
Wizard.FindControl("HeaderContainer").FindControl("ControlName")
Where did this HeaderContainer come from? I don't know, I am just glad that it works.
Thursday, February 14, 2008
Monday, February 11, 2008
Crystal Reports Printing
Had a fun run into the world of crystal reports today, just wanted to get it down here for the masses(yeah, like anyone is reading this.)
I had an issue using the PrintToPrinter function when printing straight to a printer from an ASP.Net app. There were many errors but the end result problem is that printing to a network printer requires you to set the printer up very specifically. During the add printer process you need to set the printer up as a local printer, then the address as the printer's IP. Give the printer a name and use that in your code.
Bam, done. Pretty easy for a slim hours work.
Now I just have to figure out why my fonts are changing from the report preview to the printer.
I had an issue using the PrintToPrinter function when printing straight to a printer from an ASP.Net app. There were many errors but the end result problem is that printing to a network printer requires you to set the printer up very specifically. During the add printer process you need to set the printer up as a local printer, then the address as the printer's IP. Give the printer a name and use that in your code.
Bam, done. Pretty easy for a slim hours work.
Now I just have to figure out why my fonts are changing from the report preview to the printer.
Subscribe to:
Posts (Atom)