Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Friday, March 30, 2012

Q any group or freeze function

Hello,
I have a rectangle and a few textbox in it, now when I run report, the
textbox goes out of rectangle, Is there any way to group and freeze?Jim,
It sounds like the text box isn't actually IN the rectangle.
Select the textbox and cut it with Ctrl-X
Select the rectangle then paste with Ctrl-V
The textbox should now be inside the rectangle, try dragging it around,
it should be bound by the rectangle now.
Chris
JIM.H. wrote:
> Hello,
> I have a rectangle and a few textbox in it, now when I run report,
> the textbox goes out of rectangle, Is there any way to group and
> freeze?

Wednesday, March 28, 2012

Putting Data In Report Footer

Hi,
We have a field in our dataset which we want to appear in the footer
of each page in our report.
To do this, we have added a textbox to the body of the report and
reference this data in the footer using the following:
=ReportItems!site_code.Value
This works fine, except when the record overflows onto a second page.
When this happens, the value is printed as a blank on the second and
subsequent pages, until we come to print the next record.
Ideally, we'd like the value to be printed on each page of the report.
Does anyone know of a solution to this?No takers for this?
Seems like a limitation of the software.

Putting a db field in report header

I need to put a field in the report header, i think the way to do it is to
put a hidden textbox in the body and reference it from the header, but i
dont know how to make the expresion for that, is that the correct way to do
it?, is there better way?got the answer from another post
thandks anyway
"Rodrigo Sánchez" <rodrigoss@.netshoreprogramming.com> escribió en el mensaje
news:uzmr7f9qEHA.2856@.TK2MSFTNGP10.phx.gbl...
> I need to put a field in the report header, i think the way to do it is to
> put a hidden textbox in the body and reference it from the header, but i
> dont know how to make the expresion for that, is that the correct way to
do
> it?, is there better way?
>|||Rodrigo:
How ARE you able to place field data in the report header?
Thanks!
"Rodrigo Sánchez" wrote:
> I need to put a field in the report header, i think the way to do it is to
> put a hidden textbox in the body and reference it from the header, but i
> dont know how to make the expresion for that, is that the correct way to do
> it?, is there better way?
>
>

Tuesday, March 20, 2012

Pulling 2 values from 2 textboxes displayed in a third

I have a problem trying to get a value from textbox 1 and textbox 2.
If those two values match the data in the database then it has to
return a third corresponding value to a third textbox (or label) after
a user clicks a submit button. Basically, I am trying to allow users
to enter a value of weight in pounds in textbox 1 and a zip code in
textbox 2 then pulling the shipping amount from a courier's database
and returning that dollar amount to a third textbox or label after
they click submit. How would I write this code in vb.NET?

Thanks,
TGHere's an example to get you started:

--schema
CREATE TABLE ShippingCharges
(
ShippingWeight int NOT NULL,
PostalCode varchar(5) NOT NULL,
ShippingCharge decimal(9, 2) NOT NULL
CONSTRAINT PK_ShippingCharges
PRIMARY KEY(ShippingWeight, PostalCode)
)

'VB.Net snippet
Try
Dim connection As New SqlConnection("Data
Source=MyServer;Initial Catalog=MyDatabase;Integrated Security=SSPI")
connection.Open()
Dim command As New SqlCommand("SELECT @.ShippingCharge =
ShippingCharge FROM ShippingCharges WHERE PostalCode = @.PostalCode AND
ShippingWeight = @.ShippingWeight", connection)
command.Parameters.Add(New SqlParameter("@.ShippingCharge",
SqlDbType.Decimal))
command.Parameters("@.ShippingCharge").Direction =
ParameterDirection.Output
command.Parameters("@.ShippingCharge").Precision = 9
command.Parameters("@.ShippingCharge").Scale = 2
command.Parameters.Add(New SqlParameter("@.ShippingWeight",
Convert.ToInt32(Me.TextBox1.Text)))
command.Parameters.Add(New SqlParameter("@.PostalCode",
Me.TextBox2.Text))
command.ExecuteScalar()
If command.Parameters("@.ShippingCharge").Value Is DBNull.Value
Then
MessageBox.Show("No shipping charge found")
Else
Me.TextBox3.Text =
command.Parameters("@.ShippingCharge").Value.ToString()
End If
connection.Close()
Catch ex As SqlException
MessageBox.Show(ex.ToString)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub

--
Hope this helps.

Dan Guzman
SQL Server MVP

"TG" <tjgraham4@.hotmail.com> wrote in message
news:4822c297.0409231326.4a2a892a@.posting.google.c om...
>I have a problem trying to get a value from textbox 1 and textbox 2.
> If those two values match the data in the database then it has to
> return a third corresponding value to a third textbox (or label) after
> a user clicks a submit button. Basically, I am trying to allow users
> to enter a value of weight in pounds in textbox 1 and a zip code in
> textbox 2 then pulling the shipping amount from a courier's database
> and returning that dollar amount to a third textbox or label after
> they click submit. How would I write this code in vb.NET?
> Thanks,
> TG