|
Hello Experts!!
I m passing parameters customerno. n srno. to crystal report.it must take same record only whose no and srno same wid passed one.But in my report it shown correct record but many times.
e.g.if i pass custno.is 2 and srno. is 3 then it must show corresponding details of match 2&3.Now it shown like this...
Custno Srno name address
2 3 XYZ ABC
2 3 CYZ SED
2 3 XYZ ABC // Extra lines
2 3 CYZ SED
Help Me!!!
|
|
|
|
|
You don't give nearly enough information to get help - but my guess would be that your report links to other tables and so you get one row for each of the records on those tables as your linkage is not correct.
Try looking at the SQL that Crystal generates and running that - it might point you in the right dircection
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
hello
can I generate a test X.509 certificate using "makecert.exe", taking "snk" file from "sn.exe" as input?
Thanks
dev
|
|
|
|
|
I'm having a problem with the ThreeState property. Currently, the checkBox's only have the values of "0" and "1", and I need the ThreeState to equal "2" somehow!
This code creates the checkBox's:
private void makeArea_Click(object sender, EventArgs e)
{
if ((areaXNumber.Value <= 11) && (areaYNumber.Value <= 11))
{
arrX = Convert.ToInt32(areaXNumber.Value);
arrY = Convert.ToInt32(areaYNumber.Value);
panel1.Controls.Clear();
int x, y = 12;
for (int j = 0; j < arrY; j++)
{
x = 12;
for (int i = 0; i < arrX; i++)
{
CheckBox chkb = new CheckBox();
chkb.Location = new Point(x, y);
chkb.Size = new Size(15, 14);
panel1.Controls.Add(chkb);
x += 21;
}
y += 21;
}
}
else
{
MessageBox.Show("Lower your checkbox amount!");
}
}
This code appends it all to a StringBuilder then posts it to a richTextBox:
private void insertArea_Click(object sender, EventArgs e)
{
StringBuilder area = new StringBuilder();
if (panel1.Controls.Count > 0)
{
area.AppendLine();
area.AppendLine("arr" + areaArrayNumber.Value + " = {");
for (int i = 0; i < arrX * arrY; i++)
{
if (i % arrX == 0)
area.Append("{");
area.Append(Convert.ToByte(((CheckBox)panel1.Controls[i]).Checked));
if (i % arrX == arrX - 1)
{
if (i + 1 == arrX * arrY) area.Append("}\n");
else area.Append("},\n");
}
else area.Append(", ");
}
area.AppendLine("}");
}
else
MessageBox.Show("There are no checkboxes!", "Error");
scriptForm.Text += area.ToString();
}
What this code does, is let the user decide how many checkBox's on the X axis, then the Y axis, so let's say numericalUpDown1 and numericalUpDown2 value's are equal to 3. This is what the outcome is currently (1 = Checked/0 = Unchecked):
arr1 = {
{1, 1, 1},
{1, 0, 1},
{1, 1, 1}
}
I want the ThreeState to be able to do this (2 = Third State/1 = Checked/0 = Unchecked):
arr1 = {
{1, 1, 1},
{1, 2, 1},
{1, 1, 1}
}
I hope this is enough information to help! If not, please let me know. I appreciate your time reading this!
|
|
|
|
|
Without going through your code I think you'll find that "3 state" refers to null,0,1 and is not flexible.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Well that's a bummer :\, is there any sort of loophole to always have a "2" in the middle of the checkBox array?
|
|
|
|
|
Xenoserv wrote: is there any sort of loophole
Of course there is, see Luc's suggestion, there is almost always a way round it, defining the cost of the work around is another matter
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
as you don't use the Text property of the CheckBoxes, they aren't much more than a white/gray/black square. Why don't you make your own Control?
You could derive from Panel, and:
- give it a background color;
- a Clicked event to cycle through the possible colors;
- a value (either stored in the Tag, or through a Dictionary which maps colors to values, of any type you choose)
Instead of a color, you could paint a digit in there, by hooking up a Paint event handler; if Tag is a 1-digit string, then e.Graphics.DrawString(((Panel)sender).Tag,myFont,0,0); could be pretty close to what you want.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Something like in Minesweeper?
|
|
|
|
|
Yea, like minesweeper haha
|
|
|
|
|
The CheckState enum is like this
Unchecked = 0,
Checked = 1,
Indeterminate = 2 You can use the CheckBox.CheckState property to get the current value.
If you need to retrieve it via an event when it changes you can use the CheckBox.CheckStateChanged event.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Good people,
Quick question: Is it ok to install application files in the root directory (C:\My App\DataFiles.app)? We have an application and I think the file should be installed in the SpecialFolder.ApplicationData path. I always thought that the root directory should not be a place where app files should be deployed unless absolutely necessary.
Let me know your thoughts?
Thanks,
Blitz
|
|
|
|
|
IMO you should not do so. It gets messy pretty soon. AFAIK Vista and future Windows will prevent regular users from doing that anyhow.
The app itself belongs somewhere under C:\Program Files\ using some folder hierarchy reflecting company and product name and possibly version.
The data files your app needs could go in one of the special folders provided for such purpose.
See Environment.GetFolderPath, and SpecialFolder.ApplicationData/CommonApplicationData. There too some folder hierarchy should be applied.
And the user-visible files your app deals with (its documents) probably belong somewhere inside "My Documents" which also should be reached through the corresponding SpecialFolder.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks Luc,
Where should the LogFile (of database errors) be placed? We may need them to email it to us for support purposes.
Thanks again,
Blitz
|
|
|
|
|
I guess your DB logfiles are common to all users, hence I would suggest SpecialFolder.CommonApplicationData; that is where I put user-agnostic logfiles.
And I try and provide a command inside my app to explore that folder, or mail it to me, or whatever is appropriate; so the users don't have to explore their disk to get hold of it, and I don't have to explain the details in the documentation (since that folder may actually vary depending on the Windows version and some installation choices).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc, what would you do with the Log file?
Thanks,
Blitz
|
|
|
|
|
I would be angry if a program would do that to me..
In fact, I have been angry for that reason quite often already.
Both Java and nVidia see fit to place their crap in C:\
|
|
|
|
|
Thanks to both of you.
By the way, do you know where I can find documentation recommending against using the root directory. The other programmer is a Java programmer and thinks that writing to the root directory is fine.
Thanks again for your help,
Blitz
|
|
|
|
|
It would only be "fine" if the computer that hosts your application is a dedicated PC that will only be used with your application.
If not, then try and integrate with the pre-existing environment; add applications where other applications are found, write docs to the place where documents go, and errors the the EventLog. Though it might sound insane to scatter all data over different folders, there is a rationale behind it. I regularly backup "My Documents", but I hardly ever backup "Program Files" or the crap that's in the root - having the same executable backed up over and over would be inefficient. The moment my PC stops working, the Admin remotely looks into the eventlog and mails me that I should not disable the Norton Antivirus-service. He puts back an image with my applications, and I restore my Documents.
The need to put every existing folder in the PATH has gone. What argumentation is there left in favor of installing to the systemroot?
I are troll
|
|
|
|
|
Hi,
I need a help.
I have a windows service to keep monitoring installed stuffs and at the end like, when i logoff or shutdown, it has to automatically uninstall those dlls and get killed itself.
I could do till uninstall, but i dont know how to make the windows service to get killed by itself.
Any idea/ sample code would be helpful
Thanks
Kumar
|
|
|
|
|
Sounds like you don't want a Service at all, how about a Windows Scheduled Task?
|
|
|
|
|
Thanks.
Ok, what i am looking for is like, when i am logging off, i had made my windows service to uninstall certain dlls. Once it is finished, it has get killed itself and get uninstalled, because, it should not do the uninstall for the next time logoff.
Thanks
Kumar
|
|
|
|
|
I've adapted other code i found on the internet to use postmessage instead of mouse_event i think it was: http://wolfsfiles.googlepages.com/MouseSimulatorPostMessage.cs[^]
So... my goal is to send mouse clicks to a window without bringing it into focus... that code does do the mouse clicks just fine but it automatically brings the window into focus. (if i use sendmessage it does the same behavior... also what's the difference between postmessage and postmessageA? :P)
So is their anything i can do to send the mouse click without bringing the window into focus.
|
|
|
|
|
FocusedWolf wrote: is their anything i can do to send the mouse click without bringing the window into focus.
I don't think so. Depending on what your higher goals are, there may be better ways to achieve them.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
I've made a kind of telnet class that has these methods:
+Connect()
+string Response() : Reads the stream
+string SendMessage() : Writes to the stream and calls response()
The problem is that if call response and there is no response, I get stuck..
I tried using networkStream.DataAvailable but still gets stuck,
algo tried making a
while (timespan.Seconds < timeout) {
..
}
But still.
For example if I conncet to a POP server, this could happend.
I say: RETR 2
1st line of response
I ask another line of response (calling Response())
2nd line of response
Repeat these last two lines until...
I ask another line of response
-here it gets stuck because there arent more lines-
|
|
|
|