I've developed a Crystal Reports, and when exported to PDF, it looks great. It even looks great (to me) when exported to excel. However, one of the business users is stating they have an issue with it. Since some of the cells that are being used are wider than the default for excel it is merging the cell with data with the cells around it, and centering the data in the merged cells. Does anyone know how to tell it I don't want it to do this?
mjmcinto
Posts
-
Crystal Reports XI R2 question -
Changing crystal report connection at runtimeTry this:
Tables tables = reportDocument.Database.Tables; foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables) { TableLogOnInfo tableLogonInfo = table.LogOnInfo; tableLogonInfo.ConnectionInfo = connectionInfo; table.ApplyLogOnInfo(tableLogonInfo); }
reportDocument is your instance of the CrystalDecisions.CrystalReports.EngineReportDocument class, and connectionInfo is the instance of the ConnectionInfo class where you configure the database, username, and password. You can then manage the connection through the web.config (for web) or app.config (for pc based) file, thus allowing you to change it w/out having to recompile. Or you could check certain circumstances, and depending on the outcome, point to different sources. -
Looking for a controlI'm Looking for a control similar to ListBox, but it would be a little different. You would see the options that you can choose from on one side (preferably left), and then you would see what you've selected in the list on the box on the right hand side of control. You would be able to move the items back and forth by double clicking on them, or clicking on arrows that would move them. I've seen this type of control used multiple times, and so I figure it must be in the .Net framework, but I can't think of what it's called to find it. Thanks for the help.
-
C# WebBroswer Event not firing?It looks like I had a different version of the microsoft.mshtml.dll file. Thanks!
-
C# WebBroswer Event not firing?So I have an app that I've written that uses the old WebBrowser COM object (can't use the 2.0 framework yet). It works just fine on my PC (the PC I developed it on), however on the user's PC (and others), it doesn't work as anticipated. It appears that the reason for this is the event (NavigateComplete2) that I'm wanting to use as a trigger for something to happen never fires on the other PCs. I say this b/c in the event handler I put a simple MessageBox to say "navigate completed". That shows on my PC, and does the actions I want. But on the other PCs, it does not. Any thoughts or suggestions?
-
Auto Login on Webpage using C#Some more information: I'm using the old VB WebBrowser COM Component (AxSHDocVw.AxWebBrowser). I think I've narrowed it down to the fact that I need the headers passed to the Navigate method to include the authentication information, but I'm not quite sure how to do this. Does anyone have any sample code (like this for Posting) for the Headers/Authentication? Thanks -- modified at 15:00 Wednesday 30th November, 2005
-
Auto Login on Webpage using C#I have a user that is wanting to automatically log in to some web pages, and I've got most of them doing this, but there's still one that's giving me fits that I'm hoping someone can help me with. I'm writing the code in C#, and am displaying the webpage via the Microsoft Web Browser COM component. The webpage that I'm having issues with is popping up a login box that looks very much like an AD login box. Any idea how I can capture control for this box so I can programatically populate it and hit the "OK" button?
-
automate a login using AxWebBrowserI've got a form that is using an old COM object (AxSHDocVw.AxWebBrowser). Does anyone know how once I navigate to a screen I can automate logins using this control?
-
Re: Extracting IconsDoes anyone know how to extract an icon from a .lnk file? I have to use an icon, but cannot find it anywhere (the person who made is no longer w/the company). The only place I have been able to find this icon is on a shortcut (the actual .exe doesn't use the icon). Thanks
-
Re: wsdl converterI'm having some problems getting wsdl.exe to run (properly) on some wsdls that I have. I am trying to create a client using C# that uses these webservices that someone else created. I think the problem I am having has to do with the webservices were created using Java and the standard they use for WSDLs are a little different from the standards microsoft uses. Does anyone know of a converter that will take a Sun/IBM WSDL and convert it to a WSDL that microsoft can use? Thanks for your help.
-
Re: Add Web Reference ProblemI'm having problems adding 2 web references to my project. 1) When I go to add the web reference, it shows that there is a service, and it has the method querey(). However, when I add it, I do not see this method any where in the c# file. This problem also occurs when I download the wsdl for the webservice and run wsdl.exe. 2) Another web reference, when I try to add it, I can go to it, and see the documentation and methods for it. However, in the "Web services found at this URL:" box it says "The proxy settings on this computer are not configured correctly for web discovery. Click the Help button for more information." and won't let me add the web reference. I've clicked the help button, but haven't seen anything that tells me what I need to do about the proxy settings. Does anyone have any idea on either why the method disappears in #1, or what proxy settings need to be for web discovery? Thanks for your help.
-
Re: Newbie Webservice ProblemI've got a webservice that appears to be working. What I mean is that when I execute it in Vis Studio and bring up the web interface, it works just fine. However, when I try to use it in a program using SOAP I get this: "An unhandled exception of type 'System.Net.WebException' occurred in system.web.services.dll Additional information: The request failed with HTTP status 401: Access Denied." I'm almost sure it's something with the Web Server (IIS), but I'm not sure what I've done that is restricting this access and how I can fix it. Any ideas? Thanks for your help!
-
Re: Multi-threading in a web serviceYes, I've stepped through the method. It gets called, and there is something on the cache when it gets called. Once that method is called the remove succeeds, as does the loading of the data. However when I call add it doesn't seem to add it to the cache, however upon the next request it sees that there is nothing on the cache, loads the data, and readds it with no problem, and what I don't understand is that I call add then with the same parameters as I do in the RemovedCallback method, only this time it does add it.
-
Re: Multi-threading in a web serviceYes that was me, and thank you for your help. I've got the call back working to where it will remove the cached data on a change. However, in the method that does that, I also try to reload and then re-add the data, but it doesn't re-add. Here is the method:
public void TPMDataRemovedCallback(String k, Object v, CacheItemRemovedReason r){ TPMreason = r; string tpmDataKey = "TPMDATA"; if(onTPMDataRemove == null) onTPMDataRemove = new CacheItemRemovedCallback (this.TPMDataRemovedCallback); DateTime NoAbsoluteExpiration = Cache.NoAbsoluteExpiration; TimeSpan NoSlidingExpiration = Cache.NoSlidingExpiration; CacheItemPriority Priority = CacheItemPriority.AboveNormal; Context.Cache.Remove(tpmDataKey); System.IO.FileInfo fileInfo = new System.IO.FileInfo(tpmFileName); tpmData = tpm.LoadTPM(); try{ Context.Cache.Add(tpmDataKey,this.tpmData,this.tpmDataCacheDependency,NoAbsoluteExpiration,NoSlidingExpiration,Priority,onTPMDataRemove); } catch(System.Exception caught){ Console.WriteLine("Exception == " + caught); } }
I don't see an exception get caught, but the cache at Context.Cache[tpmDataKey] doesn't contain anything. What am I doing wrong? -
Re: Multi-threading in a web serviceI've got a service that is dependent on some files, and checks for modification of the files (thanks to everyone who helped me understand how to do this). Now that I've got that done, I think it would be nice to be able to have another thread whose sole responsibility is to check the time stamp on these files and reload the data when needed, that way the users don't have to wait while data is reloadedl My initial thought is to either create another thread and have it sleep or use timers to accomplish this, however I do not know where to place this code in my service. I don't think I would want to put it in the constructor otherwise it would get called whenever anyone made a request, and would result in mutliple threads doing the same thing. Is there anyway to create a new thread when the service starts up (before the initial request) that will do this? Thanks for your help.
-
RE: Web Service StartupWhen I try this: DateTime tpmTimestamp = Application[tpmTimestampKey] as DateTime; the compiler tells me "The as operator must be used with a reference type ('System.DateTime' is a value type). I'm sorry if this seems really trivial, but I'm just learning C# I've found a way to fix this: if(Application[tpmTimestampKey] == null) tpmTimestamp = CurrentTime; else tpmTimestamp = (DateTime)Application[tpmTimestampKey]; Thanks for your help!
-
RE: Web Service StartupSorry for the confusion. What I want is a global value. I think I understand your example (thank you), however, I'm not sure where to put it in my code. The only place I can see to add it would be in the constructor, but I'm not sure if this would cause this code to be run each time the service received a request (I think it would). If I understand everything correctly, then if I put your example in the constructor, then the first time the service handled a request (or when the file was changed) it would get the data, other wise is would skip the step to load the data. Is that right? Thanks for your help!
-
RE: Web Service StartupThanks for the help. However, I'm really new and have another question. Where would I put the CacheDependency?
-
RE: Web Service StartupI've just started to learn C# and am trying to use it to create a web service, and I have a question that I hope can be answered. I have a set of instructions to be run before each instance of the service is started. What I'm trying to do is put some information from a file into memory and then the service will find the information it needs and return that to the user. I currently have it working where it reads the files from disk every time a request is received, but that seems horribly inefficient, and was wondering if there was a way to have this done once? Thanks for your help
-
Re: Installer Package ProblemsI've got a problem and I was wondering if anyone else has had it, and if so, how they fixed it. I've created an installer package using Visual Studio, and it works just fine about 99% of the time. However, a few times when it goes to install the program (on an upgrade), it won't really upgrade the program to the new executable and create another entry in the add/remove programs window. I have the DetectNewerInstalledVersion set to true, along with Remove PreviousVersions, and have incremented the Version. It does install/upgrade correctly most of the time, but on two computers so far, the user has to manaully uninstall the previous version before it will install correctly. Any ideas on what is going on/how to fix it?