|
Hello
I am working in a project. I need to export the crytal reporst to excel format.The file is exported sucessfully but the problem is that it leaves some of the lines blank between the records. If every one have solution about it plz let me know.
Regards
Atif
|
|
|
|
|
just you have to attach that sections below line to the report fields to do not get blank line in exported excel file of your report
thanks and regards
|
|
|
|
|
hi...
i hav a problem to un-highlite the repeater/datagrid row after highlighting it...i used the onclick control
example :
<td align="center" class="t_row" id="r7">
<asp:Button id="btnFee" runat="server" Text="Fee" CssClass="btn" CommandName="fee" OnClick="Highlite"></asp:Button>
</td>
when the button is click; the row will be highlighted..but the problem is..the row will not un-highlight if i click another button in another row
could u please help me????
mada mada dane
|
|
|
|
|
I would like to dynamically create a checkboxlist (from db) which is fine but now i would like to only allow for one box to be selected, is this possible.
I can't use a Radiobutton list as the you MUST be able to unselect all options
I also know you can use checkboxes and group them but i would to create the list dynamically from the database
Anybody got any help on this?
Thanks in advance
|
|
|
|
|
A sub that will
1 - run every time an item is selected in the list,
2 - running through all list elements,
3 - unselecting (the previously selected) list item (if there is one)
That's some rough undetailed pseudo-pseudocode, but maybe it's the idea you needed?
Hope it helps
|
|
|
|
|
was hoping there was some easy way to do it but i feared there wouldn't be so yes thats a great idea thanks for that sir
|
|
|
|
|
is there a way of telling the index of the check box that was just selected now so i know not to deselect that one????
|
|
|
|
|
Hi Friends,
I am looking out for method through which i can store date in database using datecontrol and even retrieving it from the same database in another form. Suppose the date format is set LONG what should i take in consideration while desining a database in sql 2003. Windows form should be store and restore date from the database.
Please let me Know. Would be very greatful..
Bye..
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
Hello,
I Have a little trouble with the datagridview control
My code :
_Cmd.Connection = _DataConnectie
_Cmd.CommandText = Sql
_Adapt.SelectCommand = _Cmd
_DataTabel.Clear()
_Adapt.Fill(_DataTabel)
Grid.DataSource = _DataTabel
Grid.Refresh()
the datatable has 10 columns
Then I make an different Sql and want to display the result in the same grid, dut this time the result is 5 columns.
The Grid display's the 5 new columns but also the last 5 columns from the previous table
I have tried grid.columns.clear before filling the datatable en the binding but then de grid is empty
Can anyone help me
Thanks
|
|
|
|
|
Hi,
boss when u r trying to bind the resultset again to gridview, then u have to clear the data table or destroy the object of the table.
because it keeps previous queries results..
so u have to set null to datatable.
_DataTabel = null;
try it.
Abhishek Pareek
Software Engineer
Mumbai
|
|
|
|
|
Thanks
I Will try
But I already found that by setting _DataTabel = New Datatable it works !
|
|
|
|
|
Hi,
I have a created a user control (pagination for grid) in my application. It has four Imagebuttons. I need to trap the click event of these imagebutton outside of the user control and only in my aspx page. I am currently working on .Net 2.0.
Please show me the way,
Thanks,
|
|
|
|
|
You will have declare an event and raise it in the event which you want to capture e.g. if you have a button in your user control then you capture its click event as:
'Declare it in Declaration Section
Public Event MyButtonClicked()
'In the click event of button you will have to write this:
Private Sub cmdTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTest.Click
RaiseEvent MyButtonClicked()
End Sub
MyButtonClicked() event will be available in aspx form and you can handle it.
hope you will get it if you face any problem let me know.
take care
Javed
|
|
|
|
|
Hey everyone, does any one know how I can convert a long or integer to it's corresponding binary representation in VB6 ? ... I tried the index ... it didn't help me out ..
Luay Al-wesi
|
|
|
|
|
A little Google goes a long way. Results[^] for "vb6 convert integer to binary string". The first link is pretty good.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
{vb .net 2003}
I'd like to add controls (specifically labels) to a form when its resized, to have the most number of labels possible that fit on the screen. I haven't had much luck finding a tutorial or code snippet that does this. Controls would be created using a for or while loop, so i need some way to easily create lots of them. I have the resize event down fine, its the dynamic creation that I'd like help on.
Thanks in advance,
BAM
|
|
|
|
|
bamnet wrote: have the most number of labels possible that fit on the screen.
bamnet wrote: create lots of them
Personally, I think that's a bad idea. the more controls you have on a form the longer it'll take to show - consider users with lower-end machines.
The code you'd be needing would look something like this (out my head)
Dim MyLabel As Label 'declare at modular level
Private Sub CreateLabels()
'create a new instance of a label
MyLabel = New Label
'add formatting, positioning, event handlers, etc. here
Me.Controls.Add(MyLabel) 'add the label to the form.
End Sub
You'll probably have to write functions to return values of how many labels you'll need as well as where to position them.
|
|
|
|
|
I don't have to consider users with lower end machines very much. The application is going to be used on one or maybe 2 machines maximum. The idea is to create a few labels on a panel on the lefthand side based on the screen resolution. In my previous draft of this program everything was hardcoded and changing the resolution and size of the application meant rewriting it. The most labels would be 10 max.. not too bad I think.
I've tried that code an I can't get it to display the label, I know the spot on the form is clear and set visible to true.
|
|
|
|
|
You added the labels to the form. They're probably sitting behind your panel control. Add them to the Panel's Controls collection instead.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I agree, I have to add them to the panel.
Me.PanelL.Controls.Add(newButton)
accomplished this task
|
|
|
|
|
The next part is doing this with a loop. I can create one element and add it to the panel, but how would I create x number of them?
|
|
|
|
|
Looping is easy, the problem I think you'll encounter is not adding more than one label but determining how many too add.
Modifying the code above slightly to demonstrate the loop -
Dim MyLabel As Label 'declare at modular level
'pass the value of the number of labels you'll need to
'the CreateLabels sub
Private Sub CreateLabels(ByVal NumberOfLabels as Integer)
Dim i As Integer
Do Until i = NumberOfLabels
'create a new instance of a label
MyLabel = New Label
'add formatting, positioning, event handlers, etc. here
Me.PanelL.Controls.Add(MyLabel) 'add the label to the panel
i += 1 'increment i so as to avoid an infinite loop
Loop
End Sub
|
|
|
|
|
Hi everyone:
While digging down into the ADO.NET side of VB.NET I came across a nice little bit of code that allows me to return the schema of a database table.
Code snippet:
Private Sub Table_Schema(ByVal strTbl As String)
'Retrieving schema for columns from a single table
Dim cmd As OleDbCommand = New OleDbCommand(strTbl, objConnection)
cmd.CommandType = CommandType.TableDirect
Try
'Retrieve schema only
objConnection.Open()
'Dim reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SchemaOnly)
Dim reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.KeyInfo)
'Get references to schema information
Dim SchemaTable As DataTable = reader.GetSchemaTable()
'Close and release the connection before processing results
reader.Close()
objConnection.Close()
'Display schema table column headers
Dim col As DataColumn
SchemaTableList.View = View.Details
SchemaTableList.Clear()
For Each col In SchemaTable.Columns
SchemaTableList.Columns.Add(col.ColumnName, 100, HorizontalAlignment.Left)
Next
'Display Schema
Dim row As DataRow
Dim ColCount As Integer = SchemaTable.Columns.Count
For Each row In SchemaTable.Rows
Dim OrderDetails(ColCount) As String
Dim ColIdx As Integer
For ColIdx = 0 To ColCount - 1
OrderDetails(ColIdx) = Convert.ToString(row(ColIdx))
Next
Dim NewItem As ListViewItem = New ListViewItem(OrderDetails)
SchemaTableList.Items.Add(NewItem)
Next
Catch OleDbExceptionErr As OleDbException
'Display the error
MessageBox.Show(OleDbExceptionErr.Message, "Access SQL")
End Try
End Sub
The problem I have is; I don't need all that schema information. All I'm interested in is the Name of the Column, the datatype of the column and is it a primary column(field) or not.
In VB6 you could determine what information you wanted returned to you. My question is: Is there such a method available in VB.NET/ADO.NET? If so, How do you set it up for use?
Quecumber256
|
|
|
|
|
Hi
I am tryning to make aHi
I’m trying to make a program that prints out some text on a special location on a paper.
I’m using a Windows form, with some textboxes with a sender and resiver address.
Some combo boxes to determine a transport method, I made some text appear in a text box, when I check the combo box.
Example:
I check the box whose label is Taxi, and the word Taxi appears in a text box.
Then I made some buttons for the command printing, and for the command Exit (made a menu strip too, with the same functions).
My question then is how I can print this out.
I want to have the senders address on one location, and the resiver address on another location on the printed paper
And so on....
I’m using VB in visual studio 2005, and I’m going to print this out on a Oki Microline 520.
Ole Kr
A new beginner in VB.net
|
|
|
|
|
There are many ways to do what you ask...
Are you using a database to store information?
If so, it may have reporting features that you could use quite easily.
Would you consider Office automation, e.g. Word, Excel?
If so, you could simply create a Word template or Excel template and insert the data and print it from your code. This would require an installation of one of the above MS Office applications.
You could use Crystal Reports (if you have it).
Otherwise, you will need to work with Printer/Document objects, which could be quite difficult for someone new to VB.
Steve
|
|
|
|