|
Hi,
am using crystal report in my application.Am binding a stored procedure to populate the data on to the crystal report. These days i used to pass only one parameter to stored procedure and i get the data accordingly. But now i need to pass two discrete parameters, based on which the data has to be populated.
I posted the old code below which i use now. In that i send MONTH(@month) to the stored procedure and i get the corresponding data. but now i want to send both month and year to stored procedure and get the crystal report populated..
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
crParameterFieldDefinitions = rptDocument.DataDefinition.ParameterFields
crParameterFieldLocation = crParameterFieldDefinitions.Item("@month")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = month
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
Please help me out .......
|
|
|
|
|
Hi i want to change listindex of DataGridViewComboBoxCell, it can be changed by assigning value to cell like DataGridView1.Rows(1).Cells(1).Value = 1, but my DataGridViewComboBoxCell is dynamic so it updates runtime also, when it reinitiated its default values got null and it displays blank. because it is reinitiated at runtime so i dont know what could be its default value next time, i want to change it to first item in the list as default value, but DataGridViewComboBoxCell dont allow any change in listindex. can anyone help
|
|
|
|
|
I have no idea what you're trying to get at. Perhaps a simpler explanation would help.
|
|
|
|
|
The basic question is this: How do you set the value of a combobox cell? Example:
At runtime, you create a comboboxcell, and add Yes and No as items.
Now, you want to display the Yes in the cell. No luck. Setting .Value does not help. The Yes does not appear.
|
|
|
|
|
Hello friends,
I am using VB Appliction(let it be X) to load the txt files to SQL server. The application is taking the files from a shared folder. Some other tool(Y) is creating these txt files and placing them in the shared folder.
By chance, a situation happend if both application is running simultaneously. Then my application may getting a chance of loading half created files(creating by Y) to the server.
I dont want to load such files.Want to load it to the server by next time,by that time the files will be fully generated by y.
What i want is want to check last folder update time. If the folder is recently updated(means some files recently added) then dont want to run my application.
So please help me to get the last folder update time. So i can compare it with system time and can decide, whether i want to run my application
Thanks and regards
Jishtih
|
|
|
|
|
What you're asking isn't really reliable. The folder will not change it's Last Modified Time upon a write of a file inside it. It will only do this upon the creation or delete of a file.
You should be inventorying the files in that folder, checking the time the files was created, then giving an appropriate amount of time for the other process to complete before opening those files and processing them.
|
|
|
|
|
Hi,
If you are going to write any code that manipulates files or folders then you need to become familiar with the classes in the System.IO namespace. There aren't many and it won't take you long to browse through the documentation and get an idea of what they do.
In answer to your specific question about folder update time take at look at either System.IO.Directory or System.IO.DirectoryInfo and you will find the answer.
Alan.
|
|
|
|
|
Hi,
I'm currently working on a VB6 project witch has to be able to display texts in different languages(NL/US/FR/RU ect.). The problem as you all know with this is that the text end up looking like "???". To solve this i can set the regional settings in the control panel to the corresponding language. But this means that the computer has to restart every time you setup a different language.
All controls also have a Charset property but if i set those to the right value(for instance 204 for using russian) it doesn't seem to have any effect.
After some searching on the net i found out this is caused by the translation of unicode to ansi in the controls of VB6 (i don't know for sure that i'm using unicode). To solve this you can buy libaries that do this translation for you so the VB6 controls can't mess it up. But i have no money;)
Another solution would be to use Forms 2.0 controls that are able to handle unicode. But then i cannot redistribute my software. And they also didn't work (still showing ???).
After all of this it seems kind of impossible to solve this problem, but i cannot believe there isn't a solution. It does work if i set the regional settings to the right language, can't i do the same thing without using the regional settings? I really need help here.
Greetz, Willem
|
|
|
|
|
willempipi wrote: But then i cannot redistribute my software.
Why not? The .NET runtime is a free download, AFAIK.
|
|
|
|
|
|
I mistook the term "Forms 2.0" for the .NET version.
Microsoft has an Interop Toolkit, which can be used to easily integrate forms from VB.NET in VB6 applications. That gives the option to use .NET to add new functionality to an old VB6 executable.
Not an answer to your question, but perhaps an option nonetheless.
|
|
|
|
|
Okey i thought you where talking about that...
I really need an answer for this question...
|
|
|
|
|
While using vb6 u can use resource file for multi language support
|
|
|
|
|
Could you be more specific?
Witch resource file?
|
|
|
|
|
my understanding is you want to give caption of control on ur forms in different languages, in vb addons there is an option to add resource file to ur project, just add resource file, in its text area add captions in different language, then programaticaly u can get captions of controls from resource file. for input text boxes you change their fonts to related language
|
|
|
|
|
The captions of my buttons/textboxes ect. are filled from a database, I cannot convert this to the usage of resource files cause of the functionallity of the program. I already tried changing the fonts and the charset property of the fonts but that didn't work as well.
|
|
|
|
|
this is the point where you are making the mistake, dont use database for captions, instead of database use resource file, please find example regarding using resource file in project, see msdn samples, there u find a sample using resource file, it is solution of ur problen coz it is also made for mulitlanguage support, if u cant file this sample i can mail u or tell u its exact name,
|
|
|
|
|
I'm sorry, but the usage of resource files is really not an option for me.
The application that i'm programming makes use of a database witch is also used by a remote application where you can dynamically update the captions(like an update server). I could use the resource file as a shadow for the database but that would mean reprogramming the hole application into the usage of resource files. And making a interfase for the shadown resource files and the database itself. This simply is too much work (application source is more than 65 mb).
|
|
|
|
|
This[^] resource might help you.
|
|
|
|
|
Thank you for your link, i've seen it before. Maybe it's me, but i cannot read a solution for my problem on this page, although the title of this webpage refers to my problem.
|
|
|
|
|
That site contains controls and code that you can purchase to use in your projects...
|
|
|
|
|
I have a similar project that currently use resource string. I need to support Arabic at run time. I got the same problem with switching languages in the control panel otherwise it will display ????
Have you found your solution? Please share. I'd move to database for the string table if I have to.
|
|
|
|
|
hi all,
how can i check whether any folder contains the permission for write ?
Please suggest.
|
|
|
|
|
Try this code.
This code set the permission. may be this Helps you.
Function SetPermissions()
Dim strHomeFolder, strHome, strUser
Dim intRunError, objShell, objFSO
strHomeFolder = "C:\Test"
objShell = CreateObject("Wscript.Shell")
objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strHomeFolder) Then
intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " & strHomeFolder & " /t /c /g everyone:F ", 2, True)
If intRunError <> 0 Then
Wscript.Echo("Error assigning permissions for user " _
& strUser & " to home folder " & strHomeFolder)
End If
End If
End Function
Thanks
Khatri Mitesh
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
I am writing a code where I need to construct a chain of points. I have the code in C, but for my limitations in this language I am trying to convert it to VB.NET. The problem is:
My main class is
public class Point
public x as double
public y as double
public shrared pl, pr as new point() 'previous and next point
End class
My goal is to be able to access the evolution of the point. So, I need this type of declaration
...
dim p0 the new Point()
...
p0.pr.x = 2
p0.pr.y = 4
...
What's happening is that when I that when I set p0.pr.x = 2 or p0.pr.y = 4 (or another property of pl or pr) all the values of x and y are changed. That is, p0.pr.pr.pr.pr...pr.x = 2 and p0.pr.pr.pr.pr...pr.y = 4. That should not happen. Can you tell me how to change the value of a variable only at a level of p?
Sorry but my english is terrible!!!
Thanks in advance
Wilson
|
|
|
|