|
Hi,
I'm a newbie in this but I what to make a VB.NET application that adds a jpg picture to row in a SQL Server 2000 database.
Thanks in advance.
Dino Sousa
|
|
|
|
|
|
I'm doing a vb application, and there is one problem I have and I don't know how to do it from VB. One sheet 8.5"x11", 6 Labels 3.333"x4" each Label, this is the Label sheet standar. I have to create a form to print this Labels in correct position. I don't have any idea to do this in VB form. should I have a datagrid and bind the mail address data to it, or a textbox or other controls, any ideas?
Lisa
|
|
|
|
|
Try using Crystal Reports, this will help you in getting the right position..I\m afraid you have to do it in a manual way till you get the right x,y
but it's i'll be really easy once you have an out line for the labels,,you just have to position the report against the real labels to check
|
|
|
|
|
I have tried using Crystal Reports, And I have problem with it.
First, I have 6 parameters for the 6 labels entityID, the query like this: Select name, address From company -- In the select expert Company.entityid is one of ?ID1, ?ID2, ?ID3, ?ID4, ?ID5, ?ID6..when I input values, nothing shows in preview. I don't know how to correct bind to the 6 labels when the parameters have input. and how can I put the right label, the first two labels already used, so I want to choose the third label to print, how can I do that in the Crystal Reports?
Lisa
|
|
|
|
|
Lisa, I'm not sure if i got you right...but here it is
First you have to create a parameter field
To create a parameter field
Check to make sure your report is open in the Design tab.
On the View menu, click Field Explorer.
The Field Explorer dialog box appears.
Select Parameter Fields and click New.
The Create Parameter Field dialog box appears.
Enter a name for the parameter in the Name field
Lets say (ID)
Enter the desired prompting text in the Prompting text field
Select the appropriate Value type from the list.
Since you have 6 IDs , check (Allow multiple values) then Click Set default values.
The Set Default Values dialog box appears.
Make sure the Browse table is set to Company.
From the Browse field drop-down list, select entityid.
Start moving your Defaults IDs
This will enables you to choose from any of the IDs.
Click OK.
The Create Parameter Field dialog box appears.
Click OK.
The Field Explorer dialog box appears with the ID parameter selected.
Drag and drop the ID parameter into your report.
Note: If you don't want to see the parameter field you dropped in your report, place it in a section you can suppress, such as a report header or footer.
To incorporate the parameter into the selection
On the Report menu, click Select Expert.
The Choose Field dialog box appears.
Select entityid from the Company table, then click OK.
The Select Expert appears.
Choose is equal to from the drop-down list.
Choose the parameter from the adjacent drop-down list.
{?ID}.
Click OK.
Click the Preview tab.
The Enter Parameter Values dialog box appears.
Select the ID to base the report on.
Click OK.
The Change in Record Selection Formula dialog box appears.
Click Refresh Data.
-------
So now everytime you refresh your report you get a prompt to choose your ID..and based on that the relative data will appear based on your selection query
just design your report as if you're drawing the labels and place the info in each lable area...
hope that will help
|
|
|
|
|
Thanks, Ranoush..
I follow your steps, and it shows the correct result in each page, if I input 6 values, they show in 6 different pages. But I want them in one pages, how can I do it? I created 6 formula field call @label1, @label2, @label3, @label4, @label5, @label6, and put it to a 6 diferrent location in a page. I don't know how to do it.
and one more thing is if there is @label1 and @label2 are already used, I want to print the new labeb in position @label3, is there anyway I can do it in Crystal Reports?
and the ID Parameter is passing from VB.
Thanks!
Lisa
|
|
|
|
|
hello, Ranoush,
I tired to use the mail label templet, it works for the 6 labels in a page..
the only problem I have that it's the position. for example, you already used the first label in your label template, then next time when you want to print another labels, you want it to start from the second label position. how schould I do this in Crystal Reports.
Thanks all your help!
Lisa
|
|
|
|
|
Lisa, when you've chosen the Label Template, these options were showing:
Printing Direction
The Printing Direction section enables you to specify the path that the program follows when printing the data on your labels.
Across then Down
Prints data left to right across the first row of labels, then across the second row, and so on.
Down then Across
Prints data down the first column of labels, then down the second column, and so on.
you can change your printing direction or you can play with margins
you want to print fewer labels across than the number calculated (fewer columns), increase the size of the right margin, left margin, or horizontal gap until the calculation changes to the number across that you want.
|
|
|
|
|
Can I show a report crystal in Report 8.5
|
|
|
|
|
|
Good luck on your test!
The forums are a bad place to ask for homework questions!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All,
I have a issue in pre-selecting the first item of the listview control before displaying the form.
I have 2 forms. Form1 has a modify button and Form2 has a Listview control.
When the modify button in Form1 is clicked, it should populate the Listview items for the
control in form2 and before displaying the form2 the default selected item of the listview is
set to item(0)(i.e the First item).
I am able to populate the items and the problem occurs when i set the property the below said property.
MaterialListView.Items(0).Selected = True
it throws the below said error.
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll
Additional information: Error creating window handle.
Can someone help ?
Thanks
|
|
|
|
|
I have done somthing similar, here is the code i used to select an item:
<br />
lstTracks.SetSelected(iSelected, True)<br />
iSelected is just an integer
Hope that helps
- Andy
http://www.guardian.co.nr
|
|
|
|
|
Hi Andy,
Thanks for your reply. Actually i am using ListView so i don't see any property called Setselected. I think this property is for List box. Let me know if i have misunderstood anything.
cheers
|
|
|
|
|
I have a variable "nextnum", nextnum could have a value of 1,2,3,4,5,6, or 7 all the way to 50.
Depending on the value of nextnum I want to give a certain outout, i have it partially done using IF..Else
If NextNum =1 Then
DeptName = "Bloggs"
ElseIF NextNum = 2 Then
DeptName = "joe"
Else
.........................
I don't want to have 50 Else..If's to achieve this. I suspect I should try to use an array to hold the values.
Has anyone a better way of achieving this, if they do can they supply some sample code for it.
Thanks.
|
|
|
|
|
|
Can’t get any butter then the array solution. Define your array like so
Private DeptArray(50) As String
Then in the form load, load the array up using slot 1 for department name 1 all the way up to 50, this leaves slot 0 of the array empty.
Then when you need to use its value do this
Dim DeptName As String
DeptName = DeptArray(NextNum)
That’s it.
|
|
|
|
|
Hi,
You have to fill an array of strings by the values you need and they are must corresponds the value of the nextnum variable.
CODE :
DeptName=array_of_strings[nextnum]
S. Ghaith
|
|
|
|
|
Hi all,
I am developing a windows application. I would like to allow users to choose files and upload to a web server. Currently I am stuck with WebClient.UploadFile method. I am confused about the URI that I should provide, is it just
http://www.domain.com/folder/subfolder
or
http://www.domain.com/folder/subfolder/somepage.html
And also the method I should provide as one of the parameter to UploadFile method. This is what I have tried so far:
* using http://www.domain.com/folder/subfolder/somepage.html and method post
give me exception: method is not allowed
* using http://www.domain.com/folder/subfolder/somepage.html and method put
give me exception: method is not allowed
Does anyone have any idea how I should approach this matter? Help is deeply appreciated.
Thanks,
Yenyen
|
|
|
|
|
Hi there,
First I'm assuming your using .net here and not vb6, however they are similar.
You need to configure your web page at the server to recieve the file and do something with it.
if you are using ASP.NET this might help, it's something like this but i haven't checked the syntax, it needs to go in the page_load method of the form you post to.
Dim buff() As Byte
Dim fw As System.IO.FileStream
Dim strFilePath as string
buff = Request.BinaryRead(Request.TotalBytes)
fw = New System.IO.FileStream(strFilePath, System.IO.FileMode.OpenOrCreate)
fw.Write(buff, 0, buff.Length)
fw.Close()
Say if that was in the Page_Load of webform1.aspx, you then post to http://myurl/webform1.aspx
You will need to devise a method of passing a filename and other stuff if necessary, it is easiest to put it on the url and then strip it out in the aspx page.
hope that helps in some way.
"If i was king cigarettes would be free."
|
|
|
|
|
While I realize that there is a SQL section, I thought I would try here first. I am looking for a snippet if possible that would show me how to do a query on an access database like such.
select track, oe
from database
where track=txttrack.text
I need the select to be tied to the text that a user enters, then show the OE. TIA
|
|
|
|
|
I think this is what you mean but maybe not and i haven't checked it.
Private Sub Text1_Change()
Dim oConn
Dim oRS
Set oConn = CreateObject("ADODB.Connection")
Set oRS = CreateObject("ADODB.Recordset")
oConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Password=;Data Source=D:\MyDatabase.mdb;Persist Security Info=True")
Set oRS = oConn.Execute("select track, oe From Database Where track = '" & txttrack.Text & "'")
MsgBox oRS("track").Value
MsgBox oRS("oe").Value
oRS.Close
oConn.Close
Set oConn = nothing
Set oRS = nothing
End Sub
hope it helps
"If i was king cigarettes would be free."
|
|
|
|
|
at work, but will give it a try. Looks like it will work though. Thanks
|
|
|
|
|
too vague question...
please precise more
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|