| Crystal Report: Format Horizontal Alignment |
|
 |
Index ‹ Visual Studio ‹ Visual Basic [VB]
|
- Previous
- 1
- MFC >> Does MSHTML handle script?When a web page contains script codes like JavaScript or VBScript, IE
can view the page correctly as long as you don't make configurations to
disallow it.
I am wondering where does IE handles these scripts. Something out of IE
like WSH, or something inside IE? Can I do that in MSHTML?
If a page contains a piece of script that draws an image at a certain
location, can MSHTML understand that?
I mean, in the HTML DOM tree, there is only a script element;
or, there are two elements - the script element and the image element?
Thank you.
- 2
- Visual Basic [VB] >> Copying from one db into anotherHi
I am trying to copy data from one db into another. Thanks for everyone who
suggested ways to do that. After some more research I have come up with the
below simple looking way. My question in, is it supposed to work this way
and will it work?
LocalConn.Open()
Dim DBCommand As New System.Data.OleDb.OleDbCommand("SELECT id, name, date
INTO (localtable) FROM remotetable IN [Data Source=<ip address>;Initial
Catalog="RemoteDB";Persist Security Info=True;User
ID="username";Password=password];", LocalConn)
DBCommand.ExecuteNonQuery()
LocalConn.Close()
The remote db is a sql server.
Many Thanks
Regards
- 3
- 4
- Visual Basic >> COMM and IVB6SP6
Someone please point me to where I can find some sample code or
enlightenment to do Serial COMM without the MSCOMM1 component (using APIs
etc.).
Would like the ONCOMM event type capability rather than polling.
- 5
- MFC >> strange ShellExecute behaviourHi all
In all my MFC (and normal win32) programs ShellExecute has stopped working
and now returns SE_ERR_DDEFAIL .
I'm sure that the code used to work eg. (ShellExecute(GetSafeHwnd(), "open",
"http://www.abc.com", NULL, NULL, SW_SHOWNORMAL);)
Inter explorer is registrered to open http
ShellExecute(GetSafeHwnd(), "open", "c:\\abe.doc", NULL, NULL,
SW_SHOWNORMAL);
also fails, MS Word is associated with doc
However ShellExecute(GetSafeHwnd(), "open", "c:\\abc.mp3", NULL, NULL,
SW_SHOWNORMAL);
works, Winamp is Associated with mp3
Cheers
Peter Stausholm
- 6
- Visual Basic [VB] >> me.controlsme.fraDate.Top = Me.Controls("fra" & Me.cboDate.Text).Top
The top line is from vb6 how can I do the same thing in
vb.net?
fraDate is a panal
me.cbodate is a combo box with a value of 1 - 6 in it.
I also have 6 panals named fra1, fra2, fra3, etc.
Thanks for the help!
- 7
- Visual Basic [VB] >> button to get a directoryHi,
I have a textbox where users can enter a directory which the program then
uses. How can I add a button to let the users select a directory and the
selected directory be placed in the textbox? (I know how to add a button,
but I don't know the code for this).
Thanks
Joris De Groote
- 8
- Visual Basic >> Finding the group for a userI am using VS2005 and can find a users name by using the
System.Environment.Username code. With this, I know there should be a way to
find out what group this user is a member of.
My program will process one function if the user is a member of windows
group named GROUP1 and if the user using my program is a member of GROUP2 it
performs a different function.
How can I easily check if a specific user using the program is a member of
GROUP1?
Any help is appreciated
--
Lost in the Vast Sea of .NET
- 9
- Visual Basic [VB] >> DatagirdView in VB.netHi
I'm working with datagrid view and I want that one line of the columens will
be with more than one cell somthing like this:
--------------------------
| a | b | c |
| | | |
--------------------------
| | | |
| | | |
| | ---------
| | | |
| | | |
| | ---------
| | | |
| | | |
--------------------------
| | | |
| | | |
| | ---------
| | | |
| | | |
| | ---------
| | | |
| | | |
--------------------------
| | | |
| | | |
| | ---------
| | | |
| | | |
| | ---------
| | | |
| | | |
--------------------------
any idea how to do it, i tried to use combobox but it didn't work well
Thanks
- 10
- Visual Studio C++ >> Icon, Version 2. Programmation!Well, now I have a bigger job. Yay.
My manager wants me to change "manually", as in from code, the lil topleft-y
icon. For example, the app gets called with the option "m30w", and the
toplefty icon is a cat. If the app is called with the option "w00f", it
displays a dog.
See my drift? Can someone POINT ME to resources for that? I'm still in
learning phase.
Thanks in advance.
- 11
- VB Scripts >> Using onmouseover on Image Map of the USA<Table><TR>
<! Wyoming ->
<TD><area shape="polygon" coords="119, 68, 111, 111, 132,
115, 168, 119, 173, 77, 146, 73, 119, 68" a
href="NPAGEA.asp?STCODE=WY">
<Style="CURSOR: hand; BackGround-Color:Yellow"
onmouseover="this.style.backgroundColor='Red'"
onmouseout="this.style.backgroundColor='Green'"></TD></TR>
</Table>
I am trying to write a Geography Test for students. I am
using the above code to try to change the color of the
State they position their mouse. It goes to the page on
the question I have for that State of the Union, but I
cannot get the color to change inside the polygon on the
image map. Does anyone know what I am doing wrong or if
it can be done?
Thank You in Advance
Tony
- 12
- VB Scripts >> Script to Auto Insert Images into MS FrontPage?I need a script that will examine a folder to discover all the files (jpg
images) in the folder and then create html that displays the images in my
current FrontPage web page . I can then move the images around on the page
and then save the page which will place the images in the web's images
folder.
If I do it manually using Insert/Picture etc then I get html which looks
like:
<p><img border="0" src="../../Data/LEASURE/Places/Newbury/DSC01160.JPG"
width="480" height="640">
I am puzzled that the drive and highest level folder which contains the
image is not shown.
I have only a little experience of VB and none of using VBA in FrontPage (if
VBA CAN be used in FrontPage)
any thoughts?
Davy
- 13
- Mcse >> Exchange 2000 - move existing server to new hardwareI need to move our exchange 2000 server to a new hardware
and need some advice.
In Microsoft Knowledge Base Article - 297289 - a method
is described where the the computer account is reset so
that the network name can be reused with the new
hardware - Has anyone done that before?
I seems to me that will be safer and easier to a add
second exchange server to my environment and then after
all mailboxes and folders have been moved/replicated I
can just demote the first/old server...
appreciate all comments of professionals who have been
down that road before
thanks
- 14
- MFC >> How to filter lower case characters in an edit control?Hi to all,
I created a class that enherits from CEdit and overrode its OnChar() message
handler to intercept the entered keys and filter only those that are lower
case. It also verifies if an entered key is upper case to convert it to lower
case and filter it.
Everything works good except the conversion from upper to lower case. The
problem is that even if the OnChar() handler does convert the character to
lower case, the character is still displayed in the edit box as it was
entered, i.e. in upper case.
Please note that if I remove the line: "nChar = tolower(nChar);", the upper
case characters will be rejected and this is not what I want. I want the same
behaviour than the edit control's Lowercase property, which will convert all
characters to lowercase as they are typed into the edit box. However, this
property allows all other character types to be output.
Here's the code of the OnChar() message handler:
#define BACK_SPACE 8
void CEditLoCase::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
TRACE("OnChar(): %c ; %d\n", nChar, nFlags);
// Filter all the characters in 'm_pFilter' to be processed.
nChar = tolower(nChar);
if ((nChar >= 'a' && nChar <= 'z') ||
nChar == BACK_SPACE)
{
CEdit::OnChar(nChar, nRepCnt, nFlags);
}
else
{
MessageBeep(MB_OK);
}
}
I appreciate any help and thank you in advance.
Geo
- 15
- Visual Studio C++ >> WinInet-FtpGetFile errors 12003 and 12030(Note, this happens under both Windows XP (VC++6.0) or WinCE 4.2 (eVC++4.0
SP3), which is why I'm posting this question under both newsgroups).
I'm using FtpGetFile() repeatedly to copy a folder structure that contains
222 files (total 27Mb), of which one file is 17Mb and the rest are smaller.
The 17Mb file is one of the first (#8) to copy, and it does OK, but after
14-80 files are copied (around 18-19 Mb) I get error code 12003 from the
first file that fails, then 12030 from subsequent files. Codes in the 12000
range are not included in my message list in either environment, so I don't
know what this error means. Questions:
1. What do error codes 12003 and 12030 mean? (I can't find them in MSDN or
CE Help). What is actually failing here?
2. Is there any way to get the WinInet error messages (I've seen other Ftp
routines report 12xxx error codes) included in my XP and CE environments?
I thought maybe this was a limitation of our FTP site, but our IT group says
they can copy Gbs of data with no problem.
I tried skipping over the 17Mb file, and the other 221 files (10Mb) copy
just fine.
Then, even more mysterious, I tried copying the 17Mb file last (after the
other 221), and that works fine as well!
Any ideas? Can I depend on the workaround of copying the biggest file last
always working?
Thanks,
Michael Schwab
|
| Author |
Message |
dstemarie

|
Posted: Thu Jul 29 03:39:45 CDT 2004 |
Top |
Visual Basic [VB] >> Crystal Report: Format Horizontal Alignment
Hello,
Is there a way to format the data when it is passed into the Crystal
Report(CR).. for example.. In the original table, a number may be
left aligned, how to change it to right alignment?.. in other words I
want to change it's Format: Horizontal Alignment
from Left To Right if the
data passed in is an Integer, Currency, or
DateTime.
thanx
Visual Studio252
|
| |
|
| |
 |
Jorge

|
Posted: Thu Jul 29 03:39:45 CDT 2004 |
Top |
Visual Basic [VB] >> Crystal Report: Format Horizontal Alignment
Hi BlackDevil,
This is how i do it :
Dim crreportobject As
CrystalDecisions.CrystalReports.Engine.ReportObject
For Each crreportobject In
crReportDocument.ReportDefinition.ReportObjects
'' formats text object
If TypeOf (crreportobject) Is
CrystalDecisions.CrystalReports.Engine.TextObject Then
Dim crtextobject As
CrystalDecisions.CrystalReports.Engine.TextObject
If Trim(crreportobject.Name) = "Text2" Then
crtextobject = DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.TextObject)
crtextobject.Text = "Hi"
End If
End If
'' formats field object
If TypeOf (crreportobject) Is
CrystalDecisions.CrystalReports.Engine.FieldObject Then
Dim crtextobject As
CrystalDecisions.CrystalReports.Engine.FieldObject
If Trim(crreportobject.Name) = "Field73" Then
crtextobject = DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.FieldObject)
crtextobject.ObjectFormat.HorizontalAlignment =
Alignment.RightAlign
End If
End If
Next
Kind Regards
Jorge
>-----Original Message-----
>Hello,
>
>Is there a way to format the data when it is passed into
the Crystal
>Report(CR).. for example.. In the original table, a
number may be
>left aligned, how to change it to right alignment?.. in
other words I
>want to change it's Format: Horizontal Alignment
>from Left To Right if the
>data passed in is an Integer, Currency, or
>DateTime.
>
>thanx
>
>.
>
|
| |
|
| |
 |
blackdevil1979

|
Posted: Thu Jul 29 22:02:41 CDT 2004 |
Top |
Visual Basic [VB] >> Crystal Report: Format Horizontal Alignment
Hello Jorge,
Sorry, need to ask you something.
1. What crReportDocument? Is it the name of your Crystal Report or
something else?
a)........because when I change from
crReportDocument.ReportDefinition.ReportObjects()
to
[b:ba3448b144]report[/b:ba3448b144].ReportDefinition.ReportObjects()
(dim Public report As CrystalReport1 = New CrystalReport1) it there
are some incorrect syntax such as with
crreportobject.Name,
[i:ba3448b144]DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.TextObject) [/i:ba3448b144],
and [i:ba3448b144]crtextobject.Text[/i:ba3448b144],
[i:ba3448b144]crtextobject.ObjectFormat[/i:ba3448b144],
[i:ba3448b144]Alignment.RightAlign().[/i:ba3448b144]
b) if i dont change it, [b:ba3448b144]crReportDocument[/b:ba3448b144]
needs declaration..and
[i:ba3448b144]crtextobject.Text[/i:ba3448b144],
[i:ba3448b144]crtextobject.ObjectFormat[/i:ba3448b144],
[i:ba3448b144]Alignment.RightAlign().[/i:ba3448b144] and
[i:ba3448b144]DirectCast(crreportobject,
CrystalDecisions.CrystalReports.Engine.FieldObject)[/i:ba3448b144]
has syntax error.
c) If I change it to
[b:ba3448b144]OrrasReport.[/b:ba3448b144]ReportDefinition , it stated
that reference to non-shared member requires an object reference. and
the same other syntax error in b).
thanks
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ Visual Basic [VB] |
- Next
- 1
- 2
- 3
- Visual Basic [VB] >> Set FlatStyle to SystemHello,
My code
***********************************
Me.BackgroundImage = BG 'BG is a BMP resource
Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Panel1.BackColor = Color.Transparent
GroupBox1.FlatStyle = System 'On Panel1
***********************************
The GroupBox1 is ugly, why? How to correct it?
Thank you
- 4
- VB Scripts >> Comparing two time values for DifferenceHi
Trying to create a basic simple script to copy a file and see how long it
takes to copy the file.
Is this a way to compare the start and finish times I output from the Time
function and then display the result in seconds for how long it took to copy.
Code shown below
Thanks
Set objFSO = CreateObject("Scripting.FileSystemObject")
'WScript.StdOut.WriteLine ("Start Time: " & Time)
StartTime = Time
objFSO.CopyFile "S:\_TEMP_\clienttest\test", "C:\PC_MIG\Test\",
OverwriteExisting
FinishTime = Time
CopyOutput = "File Copy Test" &vbCRLf &vbCRLf
CopyOutput = CopyOutput & "[This Test should take no longer 10 Seconds]"
&vbCRLf &vbCRLf
CopyOutput = CopyOutput & "Test Started : " & StartTime &vbCRLf
CopyOutput = CopyOutput & "Test Finished : " & FinishTime &vbCRLf
WScript.Echo CopyOutput
- 5
- 6
- MFC >> Authentification from flash deviceGreetings!
I want to create GINA module, which will replace Microsoft Gina dll.
The main purpose is to enter to Operation System using flash device.
Let me describe more my idea by steps:
1) Windows is loading.
2) Gina dll module finds flash device in USB port.
3) Gina dll module reads id of flash device and uses this id in order
to enter to Windows.
At this time I wrote Gina module and it enters operation system using
password and login, but not id of flash device.
So here is my question can I come in into operation system using only
id of flash device?
So I want to read id in Gina module and enter like user (registered in
system) only using id of flash device and not to enter login and
password of this user (or only enter login).
Sorry for my terrible English.
Thank you in advance!!!
- 7
- Visual Basic >> Way to check logged in by week HELP!!!In need of a way to check whether or not a person logged in every day within
a week (week starts Monday through Sunday). Does anyone know of a good way
to accomplish this?
In the table below, User #2 did log in each day within the week. I would
need to check every week in this manner.
Table looks like this:
User Date
1 4/3/2006
1 4/4/2006
1 4/5/2006
1 4/6/2006
1 4/8/2006
2 4/3/2006
2 4/4/2006
2 4/5/2006
2 4/6/2006
2 4/7/2006
2 4/8/2006
2 4/9/2006
- 8
- 9
- MFC >> MFC and number of times COM intializedGreetings,
I was told that COM should be intialized only once in application or
once per thread. I was reading SDK samples and it says:
"CoInitialize could be called more than once in an application. The
first successful call will return NOERROR; subsequent successful calls
will return S_FALSE. Each successful nested call to CoInitialize must
be matched with a corresponding call to CoUninitialize. CoUninitialize
frees resources the COM libraries have allocated and unloads the
libraries themselves. "
I have a working MFC based application which intializes COM only once
and it works great. So my conclusion is that it can be done multiple
times too. That is, both approaches are correct. Please, if someone
can verify that if both approaches are correct. Thanks.
- 10
- Visual Basic [VB] >> Panel BordercolorHello
I am having an issue with changing the bordercolor of the panel control
I have got to a point where I have created my own control and inherited the Panel control, then in the Overrides Sub OnPaint I draw a rectangle. My code below
The problem I am having is when the new control is resized the border lines are being redrawn over an over again. I guess that makes sense. But how do I clear what was drawn there before
Or I guess the better question would be does anyone else have a better idea on how to change the bordercolor of the panel control
Thanks Jef
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs
MyBase.OnPaint(e
Dim _PenBorder As New Pen(Color.Black, 1
_PenBorder.Color = BorderColo
e.Graphics.DrawRectangle(_PenBorder, 0, 0, MyBase.Width - 1, MyBase.Height - 1
_PenBorder.Dispose(
End Sub
- 11
- Visual Basic >> Getting Pictures from Image list into PictureBoxI have a control array with 37 picture boxes and an image list loaded with
jpg picture.
How do I load the pictures from the image list into the picture boxes -
everything I have tried fails.
I intend to use a random number for the index so each time they load the
pictures will be in a different sequence.
any help appreciated
Gary
- 12
- MFC >> hiHi all
Recently i have joined the forum
I hope for good support.
Thanks and Regards
darpan
- 13
- MFC >> CTreeCtrl first item selected on click anywhereI put a tree control in a dialog launched from a doc/view app, put several
items in the tree during OnInitDialog and then click anywhere in the tree
not on an item, the first item gets selected in the tree even if that item
is not clicked on.
Tracing messages noted that the tree gets both an OnSelectionChanging and an
OnSelectionChanged message even though the selection is not changing as
there was no previous selection .
I've googled for this behavior and seen some recommend using
Select(NULL,TVGN_CARET)
on the treectrl getting focus as a way to prevent the first item being
selected automatically.
However if I do this it prevents being able to select the first item with a
single click if the tree was not already in focus.
Any help appreciated,
Johnny
- 14
- Visual Basic >> Error 3421Hi...... i have an application in VB6 and Access97 as backend, a workstation
with WinXP has to be formtated because virus, and now in a module for data
capture of the system that presents some textboxes and a flexgrid presents a
3421 Error (data type conversion error). The workstation has again WinXp
Professional Edition. No other workstation in the net has this error with the
system. can somebody tell me something about it to correct this behaivor?.
Thanks a lot.
Atte. Lic. Miguel A. Sánchez
- 15
- VB Scripts >> SQL constraint rule probelmHi there,
I'm having a hard time automatically editing some users to my SQL DB.
I established it is because the surname of the people I am adding
contains an " ' ", eg surname = O'Connel
What I am sending SQL looks like:
sQLUpdateString = "UPDATE Users SET " & updateString & _
" WHERE (UserName='" & userName & "')"
conWrite.Execute(sQLUpdateString)
My script generates updateString automatically and in the case where
it updates the users full name;
updateString = FullName='John O'Connel'
In this case userName = "JohnO"
This normally works fine, (I can update all the other users in my DB
this way), however in cases like this where the surname includes the "
' " the full name in read in as being "John O" then an error because
the "Connel" part still remains and is invalid SQL. I am told that I
should probably use a rule or a constraint to fix this, however SQL is
not really my strong suit, so any pointers on how to go about this
would be greatly appreciated.
Thanks in advance
|
|
|