|
Because I want to get some way with it either in VB or in VC
|
|
|
|
|
There's not some magic VB only API. It's going to be the same in both cases. It is bad form to post in multiple locations, so please stop it.
|
|
|
|
|
i create two datasource object from data source configuration wizard which have name itemSummary(contain table master) & dsTeamList(contains table individual).
i also create two report named MasterInventoryReport.rdlc (which use itemSummary_master as datasource) and GroupPersonalInfo.rdlc(which use dsTeamList_individual as datasource).
i used reportViewer for display report.
at design time if i select MasterInventoryReport.rdlc report as a reportsource for Reportviewer then it automatically create masterBindingSource as bindingsource
and if i select GroupPersonalInfo.rdlc report as a reportsource for Reportviewer then it automatically create IndividualBindingSource as binding source.
i use following code to generate report.
Imports System.Data.OleDb<br />
Imports Microsoft.Reporting.WinForms<br />
<br />
Public Class frmReportViewer<br />
Dim ReportSource As String = Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToString()<br />
<br />
Public Sub MasterInventoryReport(ByVal team As String)<br />
Dim str As String<br />
Dim dsItemSummary As New DataSet<br />
Dim oleadapter As OleDbDataAdapter<br />
<br />
ReportViewer1.LocalReport.ReportEmbeddedResource = ReportSource & ".MasterInventoryReport.rdlc"<br />
str = "select * from master where team='" & team & "'"<br />
GlobalModule.myconnectionopen()<br />
oleadapter = New OleDbDataAdapter(str, GlobalModule.conn)<br />
oleadapter.Fill(dsItemSummary, "master")<br />
GlobalModule.myconnectionclose()<br />
<br />
masterBindingSource.DataSource = dsItemSummary<br />
masterBindingSource.DataMember = "master"<br />
Me.ReportViewer1.RefreshReport()<br />
Me.Show()<br />
<br />
End Sub<br />
<br />
<br />
Public Sub GroupPersonalInfo(ByVal team As String)<br />
Dim str As String<br />
Dim DsTeamList As New DataSet<br />
Dim oleadapter As OleDbDataAdapter<br />
<br />
ReportViewer1.LocalReport.ReportEmbeddedResource = ReportSource & ".GroupPersonalInfo.rdlc"<br />
str = "select * from Individual where team='" & team & "'"<br />
GlobalModule.myconnectionopen()<br />
oleadapter = New OleDbDataAdapter(str, GlobalModule.conn)<br />
oleadapter.Fill(DsTeamList, "individual")<br />
GlobalModule.myconnectionclose()<br />
<br />
individualBindingSource.DataSource = DsTeamList<br />
individualBindingSource.DataMember = "individual"<br />
Me.ReportViewer1.RefreshReport()<br />
Me.Show()<br />
End Sub<br />
<br />
<br />
End Class<br />
above code is works well if we print single report at a time.
my problem is that i can not generate both report at a time.
Mean at design time if i set reportsource of Reportviewer to MasterInventoryReport.rdlc then this report is generated properly(i use code specified in MasterInventoryReport procedure) but other report(GroupPersonalInfo.rdlc) give error "A data source instance has not been supplied for the data source dsTeamlist_individual (i use code specified in GroupPersonalInfo procedure)
and at design time if i set reportsource of reportviewer to GroupPersonalinfo.rdlc then this report is generated properly but other report (MasterInventoryReport.rdlc )give error "A data source instance has not been supplied for the data source itemsummary_master
i don't know where i m wrong
any help will be appriciated
thanks in advance
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Rupesh,
Have you got this working?
Paul
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi to all,
In one function of my classFile I return the Datas through return function to my VB code. I can get the Datasource for DataGrid in VB code, but i cant get it for TextBox. I tried DataBindings also. I have to fill my WebForm TextBoxes with those got Dats. Can anyone help me out ? How to fill TextBox for an datasource.. ?
|
|
|
|
|
Hi,
I am Using Ax media Player in my window application in .net 2003,
I have added reference , now i want to play a video file,
how to go abt it.... i mean i any one send me the code as how to play a video file using Ax media player .........
Thanks in advance
byeeeeeeeeeeeeeee
with thanks and regards,
kaushik pulpa
|
|
|
|
|
What is the Ax media player ? Is it the windows media player control ? Have you tried to google for articles on it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello everybody...
i am beginner in this field...
i need some help please...
I've done a project which use crystal report to print a report...
my problem:
- in a form there is a textbox which i make it as a color options..
- when user choose a color the text box will change according what he/she chosen..
- the color will be save as one of the data in a database (SQL Server 2000)..
- but i save it as a code (there is a column called colorcode in my database)..
reason: i don't know how to save color in database
- then i use crystal report to print the form which has a color
- but in the column "colorcode", its only show the code but not color
example: -8355585 (blue color)
- please help me with any idea, how can i print a color instead of a code..
thank you very much for your help
|
|
|
|
|
It doesn't know what that number means. You'll have to save the string name of the color in the database too and add that column to your report if you want to do this.
|
|
|
|
|
thank you very much for your reply Dave..
but i'm very sorry, i do not understand...
how can the report will be printed with color if i add string type of column?
won't the report will show a text rather than the color code or a color itself?
will u explain a little bit..please..
and if i am wrong please correct me..
thanks..
|
|
|
|
|
zed83 wrote: how can the report will be printed with color if i add string type of column?
No, you have to store the color value twice. Once as the value you currently have and once as the name of the color. Then you can add either or both of those columns to the report.
|
|
|
|
|
hello,
Is it possible to create an windows taskbar item with for example a button on it.
Or a way to inject a button in the start menu for example under the run button.
thanks!
|
|
|
|
|
Possibly, but this would probably require writing an Explorer Shell Extension to do it. This is not going to be easy, and help with something like this is going to be sparse to be sure.
Or, I've misunderstood what you're talking about. What do you mean by a "Windows Media Player taskbar item"???
-- modified at 20:48 Wednesday 11th July, 2007
|
|
|
|
|
you need to look into something called a deskband, but almost all of the source code and help is in C#.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
Hi,
I've got some code that allows me to click a button to browse to a zip file, and populate a DataGridView with all of the file names contained within the zip.
What I now want to do is go a stage further, and allow the user to drag a zip file into the DataGridView, and perform the same routine.
For reference, the functionality to perform the unzip is provided via DotNetZipLib.zip
The code that I've been trying to get to work is:
Imports ionic.utils.zip<br />
<br />
Private Sub DataGridView1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragDrop<br />
<br />
Dim strFilePathAndName As String<br />
<br />
strFilePathAndName = DirectCast(e.Data.GetData(Windows.Forms.DataFormats.FileDrop), String)<br />
<br />
Dim zip As ZipFile<br />
zip = ZipFile.Read(strFilePathAndName)<br />
<br />
Dim tblZipFilesTable As DataTable = New DataTable("CompressedFiles")<br />
Dim ds As DataSet = New DataSet("ZipFile")<br />
<br />
ds.Tables.Add(tblZipFilesTable)<br />
<br />
tblZipFilesTable.Columns.Add("File name", GetType(String))<br />
tblZipFilesTable.Columns.Add("Columns in table", GetType(Integer))<br />
<br />
Dim tblRow As DataRow<br />
<br />
For Each file As ZipEntry In zip<br />
<br />
tblRow = tblZipFilesTable.NewRow<br />
<br />
tblRow.Item("File name") = file.FileName.ToString<br />
<br />
tblZipFilesTable.Rows.Add(tblRow)<br />
<br />
Next<br />
<br />
Me.DataGridView1.DataSource = ds<br />
Me.DataGridView1.DataMember = "CompressedFiles"<br />
<br />
With Me.DataGridView1<br />
<br />
.Columns(0).Width = 210<br />
.Columns(1).Width = 120<br />
<br />
End With<br />
<br />
Me.DataGridView1.Refresh()<br />
<br />
End Sub<br />
<br />
Private Sub DataGridView1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragEnter<br />
<br />
If e.Data.GetDataPresent(Windows.Forms.DataFormats.FileDrop) Then<br />
e.Effect = DragDropEffects.Copy<br />
Else<br />
e.Effect = DragDropEffects.None<br />
End If<br />
<br />
End Sub
But it doesn't do anything. When I set a breakpoint within the first few lines of "Sub DataGridView1_DragDrop", I find that it doesn't even go in here.
|
|
|
|
|
Resolved it ...
Private Sub DataGridView1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragDrop<br />
<br />
Dim strFilePathAndName As String() = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())<br />
<br />
Dim zip As ZipFile<br />
zip = ZipFile.Read(strFilePathAndName(0))
|
|
|
|
|
When a user inputs data into the textbox
The textbox control provides a list of previous entered values
is there a way to disable this in vb.net web form .net 1.1
|
|
|
|
|
It's not the Textbox that's doing this. It's the users browser that's doing it, and no, you have no control over this from your ASP.NET code.
|
|
|
|
|
You will have to set the autocomplete property for your textbox. The intellisense of Visual studio 2003 doesn't provide you with the option.
<br />
<br />
<asp:TextBox id="txtControl" runat="server" autocomplete="off"></asp:TextBox>
You can do it at the form level by setting <form id="Form1" method="post" runat="server" autocomplete="off">
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
Hmmm...Shows you how much of an ASP.NET expert I am!
|
|
|
|
|
You can blame Microsoft , I have found many properties not showing up in the Intellisense or the properties window of the control . I guess we just need to learn from trial and error method and of course the experience.
For ex the intellisense of the DropDownList in visual studio 2005 doesn't show the SelectedValue property and I was trying to figure out a way to bind the DropDownList to the Gridview, just trying my luck, I typed in SelectedValue inside the tag and binded it to the gridview and it worked. I guess Microsoft needs to come out with a list of "Hey I have coded this but forgot to put it in the Intellisense list"
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
I want to select a row and get all data in every cell in all columns. I was able to get all cells by using VisibleColumnCount. But that only gives me 4 out of 8 of the cells. I have a conection to a database and putting it into a dataset and binding it to the datagrid. Is there a way to either get the total number of columns OR to get the whole row instead of cell by cell?
|
|
|
|
|
For idx As Int16 = 0 To Me.DataGridView1.Columns.Count - 1
MsgBox(Me.DataGridView1.SelectedRows(0).Cells(idx).Value)
Next
|
|
|
|
|
Is this available in 2003
|
|
|
|
|
No...
Do this to get the column count....
Dim iColCount As Int16 = 0
If TypeOf (Me.DataGrid1.DataSource) Is DataSet Then
iColCount = CType(Me.DataGrid1.DataSource, DataSet).Tables(0).Columns.Count
ElseIf TypeOf (Me.DataGrid1.DataSource) Is DataTable Then
iColCount = CType(Me.DataGrid1.DataSource, DataTable).Columns.Count
End If
|
|
|
|