
Ellis
Members-
Posts
15 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Ellis
-
I have a data grid with one of the columns displaying amount in currency (See below) Column1 Column2 Column3 Text £12.00 Text Text -£6.00 Text Text £25.00 Text What I was wondering, how would I go about displaying minus amounts in red???
-
Can anyone help? In my application I set the mouse cursor to display the WaitCursor Icon by using the following code... Cursor = System.Windows.Forms.Cursors.WaitCursor My problem is, users can still click buttons, controls etc... and the application executes the mouse click event. Is there a way to prevent user input while the mouse cursor is set to WaitCursor. Any help would be much appreciated.
-
Printing a crystal report to a network printer in code
Ellis replied to Ellis's topic in Database / XML / Reporting
Hi Susana, Is it a crystal report you are trying to print? If so I'd recomment having a look at the dotnet example from crystal decisions. Follow the link below... http://support.crystaldecisions.com/communityCS/FilesAndUpdates/vbnet_win_printtoprinter.exe.asp (This VB .NET Windows application demonstrates how to print a report directly to a printer at runtime using the engine object model. This application is for use with Crystal Reports for Visual Studio .NET and later versions.) Change a font at runtime, I'd recommend the example... http://support.crystaldecisions.com/communityCS/FilesAndUpdates/vbnet_win_changefont.exe.asp (This Visual Basic .NET sample Windows application demonstrates how to change the font of database and text field at runtime. This application is for use with Crystal Reports for Visual Studio .NET and later versions.) As it is Ive solved my issue. My problem was resolved by re-installing the printer on the network and using a different driver. To print to a network printer using script I used the PrintToPrinter method and under the PrinterName property I entered the url location of my network printer. I hope you find these examples useful. I know how frustrating it can be when you cant get it to work. If you need any more help please dont hesitate to ask (, although I cant guarantee I'll always have an answer, I'll try and help if I can). Good luck. Lee :p -
Hi wyrd, Thanks for your reply. The width/height of my datagrid does go past the edges. Im not sure which property is used to enable scrollbars on a datagrid. The datagrid doesnt seem to have one??? It just seems strange that although the scrollbars appear after the data is filled, it wont let me use them until ive adjusted the row height or column width (during runtime).
-
For some reason, when I fill my datagrid with data. The scrollbars dont seem to be enabled until I adjust the width of one of the columns manually. How could I do this in code so the scrollbars are available immediatley, straight after datagrid has been filled? Any help would be appreciated.
-
When I print to one printer on the network (HP LaserJet 8100 Series PCL 5e) the report comes out fine, however when I print to another printer on the network (RICOH Aficio 1022 PCL 5e) the report comes out as gobble-de-gook. The printer drivers for both printers are installed on the client machine I use. The machine is running on windows 2000. I then downloaded 'vbnet_win_printtoprinter.exe' from Crystal Decisions and ran the application, printing the sample reports to the two different printers again, the same thing happened. It seems the font types aren�t recognised. I then decided to try this on an XP machine instead of a windows 2000 machine, it printed perfect again on one printer but gobble-de-gook again on the other (however some font types printed ok this time). The strange thing is, this only happens when the report is printed using code. When the reports are printed using the printer button of a crystal report viewer these reports print off fine on all machines. My problem is I need to be able to print the reports using.
-
Olaf, I posted this thread, and got a similar response... http://www.xtremedotnettalk.com/showthread.php?s=&threadid=72356 have you had any luck in confirming the windows password a second time??
-
Does anyone know why I would be getting this error message? It seems to only appear when switching from code view to designer view or when the designer view is being closed down. Any help or info on why Im getting this error and how I could prevent it would be much appreciated, Lee errormessage.bmp
-
The reason im after this is if a user left there machine logged on and left their pc running. I dont want another user to be able to log into the application, hence requesting the user to validate there username and password again. Im not sure if it can be done. I do have a log on form at the moment that uses Environment.UserName, but I was after something a little more secure. Any help would be much appreciated.
-
I know it's not possible to get the password from NT, but is it possible in dot net to validate whether a username/password combination is correct. Any help would be greatly appreciated.
-
This is getting quite absurd... vb.net programmers help solve..
Ellis replied to Winston's topic in Windows Forms
Orbity, Splash.zip is an excellent example. Simple and to the point. It was a great help. Thanks -
As far as im aware Ive been using... Application.DoEvents() (Hope this helps you)
-
Passing Parameter Values to Crystal Report Viewer
Ellis replied to Ellis's topic in Database / XML / Reporting
Thanks for you quick reply hog. I found out what I was doing wrong, my report variables where like the stored procedure it used variables, they were all preceeded with a '@' character. Doh! -
Passing Parameter Values to Crystal Report Viewer
Ellis posted a topic in Database / XML / Reporting
Hi, Im trying to open a letter which is a crystal report. I need to pass the report parameters. However although the crystal report viewer recognises Ive passed 3 parameters, I still get the dialog box requesting me to "Enter Parameter Values", how do I prevent this and get the report to use the parameters Ive added? Here is my code... (any help or advice would be much appreciated) ''CR Variables Dim crReportDocumentPath As String Dim crParameterFields As ParameterFields Dim crParameterField As ParameterField Dim crParameterDiscreteValue As ParameterDiscreteValue Dim crParameterValue As ParameterValue ''Report Variables Public sReference As String Public iCustomer As Int16 Public iAddrType As Int16 ''Get full path of the report to open crReportDocumentPath = "\\SERVER\Letters\Letter Template.rpt" ''Create a new instance of a discrete parameter object to set the value for the parameter. crParameterDiscreteValue = New ParameterDiscreteValue() crParameterDiscreteValue.Value = sReference ''Define the parameter field to pass the parameter values to. crParameterField = New ParameterField() crParameterField.ParameterFieldName = "chrRef" ''Pass the first value to the discrete parameter crParameterField.CurrentValues.Add(crParameterDiscreteValue) ''Destroy the current instance of the discrete value crParameterDiscreteValue = Nothing ''Create an instance of the parameter fields collection, and ''pass the discrete parameter with the two discrete values to the ''collection of parameter fields. crParameterFields = New ParameterFields() crParameterFields.Add(crParameterField) ''Destroy the current instance of the parameter field crParameterField = Nothing ''Create a new instance of a discrete parameter object to set the '' value for the parameter. crParameterDiscreteValue = New ParameterDiscreteValue() crParameterDiscreteValue.Value = iCustomer ''Define the parameter field to pass the parameter values to. crParameterField = New ParameterField() crParameterField.ParameterFieldName = "inyCustomer" ''Pass the first value to the discrete parameter crParameterField.CurrentValues.Add(crParameterDiscreteValue) ''Destroy the current instance of the discrete value crParameterDiscreteValue = Nothing 'Add to collection of parameter fields crParameterFields.Add(crParameterField) ''Destroy the current instance of the parameter field crParameterField = Nothing 'Add to collection of parameter fields crParameterFields.Add(crParameterField) ''Destroy the current instance of the parameter field crParameterField = Nothing ''Create a new instance of a discrete parameter object to set the '' value for the parameter. crParameterDiscreteValue = New ParameterDiscreteValue() crParameterDiscreteValue.Value = iAddrType ''Define the parameter field to pass the parameter values to. crParameterField = New ParameterField() crParameterField.ParameterFieldName = "inyAddrType" ''Pass the first value to the discrete parameter crParameterField.CurrentValues.Add(crParameterDiscreteValue) ''Destroy the current instance of the discrete value crParameterDiscreteValue = Nothing 'Add to collection of parameter fields crParameterFields.Add(crParameterField) ''Destroy the current instance of the parameter field crParameterField = Nothing ''The collection of parameter fields must be set to the viewer CrystalReportViewer1.ParameterFieldInfo = crParameterFields ''Set the viewer to the report object to be previewed. This ''must be done after the parameter information has been set. CrystalReportViewer1.ReportSource = crReportDocumentPath 'CrystalReportViewer1.ReportSource = crNewReport CrystalReportViewer1.Zoom(1)