|
how to pass the parameter to show the reports(report.rdlc) in reportviewer using vb.net ?
Hello friends,I was already post this message in our codeproject developement resource.But no one reply for this. kindly help me any one. please friends.
I can generate the report all records to show in reportviewer using report.rdlc file.
But now I dont know how to pass the parameter to show the seleted records to generate the reports in reportviewer using report.rdlc file.
Now i was take too long for this problem.Can anybody help me for this Plz.
I need example code for this in vb.net. Please kindly help me for this problem.
Thanks in advance for ur helps.
Naga
|
|
|
|
|
|
Hello everyone,
i got the following problem in VB.net:
I am writing a program that reads out a sql table and concatenates fields of it and put them back in one field.
example:
line 1 textfield1
line 2 textfield2
should look like
line 1 textfield1 textfield2.
i do this by reading a datatable that is filled with the info i needed and then concatenating the textfields and putting them back into a new datatable with the same structure as the old one.
now the problem:
i got this string in two lines.
30,00 % bei Auftragsbestätigung 30,00 % bei Arbeitsbeginn 40,00 % be
i Abnahme
When i save it in the datatable to put it back on the sql server after concatinationg i get this line.
30 % bei Auftragsbestätigung30 % bei Arbeitsbeginn40% bei Abnahme
but it should look like this
30,00 % bei Auftragsbestätigung 30,00 % bei Arbeitsbeginn 40,00 % bei Abnahme
the field i read from is a nvarchar(70) on the sql server.
My guess it has something to do with the type of the datatable field
because it is a string and not a varchar.
if anyone could help me i would really apreciate it.
If you need code examples or anything else post and i will try to deliver.
thanks in advance
|
|
|
|
|
I suspect its to do with the commas. Try enclosing the whole string in single quotes.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
The problem is i already get errors with blanks/spaces when putting the data in the first datatable. My bad for not seeing it earlier.
|
|
|
|
|
Hi all,
Can I prevent OleDbDataAdapter from closing OleDbDataConnetion after filling DataSet?
Thanks for help
|
|
|
|
|
You should be closing the connection when you're done with it.
But, if the connection is already open before you call the Fill method, the adapter will not close the connection when it's done.
If the connection is not open when Fill is called, Fill will close the connection when it's done with it.
So, the answer to your question is to open the connection yourself before you call Fill.
|
|
|
|
|
Hello
I'm experimenting with the Datagridview-Control (DGV). Working with datatables as datasource works very nice. You can use all the functionality like edit, add or delete rows.
But I don't want to use datatables. So I build a class that contains all the fields I need (thats the datarow). These classes are in a list (for example "List (of T)" or "Collection"). Thats works with a static list.
But: Using datatables will show you the NewRow in the buttom of the DGV (if you want that). Using my oun collection dont do that. Even deleting rows is not possible - just editing rows.
So what interfaces I have to implement or what classes I have to derive to get full functionality like a datatable? I would be very glad if somebody could supply me a hint.
|
|
|
|
|
Look into creating your collection using the generic BindingList(T)[^] class. This will give you New, Insert, and Delete capabilities you're looking for.
|
|
|
|
|
Thanks,
that is excactly what I need.
|
|
|
|
|
Hi guys
this is my scenario
i have a shared folder on the server with an exe file in it.
i have a program on the clients pc. when this app launches i want the app to copy the server file and overwrite the client one everytime.
problem is that sometimes the client pc prompts for a username and password to the server, how do i get around this?
this is what i have done thus far, but wud like to know if there is another better method.
Dim credentials As Net.NetworkCredential
credentials = New Net.NetworkCredential("username", "password")
Dim DestFile As Uri = New Uri("c:\programs\addons.exe")
Dim FileToCopy As String = "\\196.96.9.5\cd\addons.exe"
my.Computer.Network.DownloadFile(fieltocopy,destfile,username,password,True ,1000,True ,FileIO.UICancelOption.ThrowException )
thanks for your help
modified on Thursday, March 19, 2009 10:25 AM
|
|
|
|
|
UploadFile?? Is this code running on the server or running on the client machine???
|
|
|
|
|
Hi,
this code runs on the client.
it should be using my.Computer.Network.DownloadFile(fieltocopy,destfile,username,password,True ,1000,True ,FileIO.UICancelOption.ThrowException )
thanks
|
|
|
|
|
how to
tell flash to read xml when press button in vb.net.
just when press button in vb tell to flash read xml
|
|
|
|
|
I don't think any bridge exists between flash and VB. If it does, the people who wrote the flash control you're using would be the ones documenting it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
but i more clever than who wrote flash
i know how to do this now
ha ha ha ha
|
|
|
|
|
No, you're an idiot. You don't know, or you wouldn't have just asked again. You can embed flash in VB, but you can't communicate between them, unless there's a way documented in the flash API. Other people have told you there is not, and yet you ask again...
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You can use flash only through the standard flash's component interface- The standard features supported to Load/Run/Pause/Stop & many more. If you want to control something other than that, you can provide user interface(May be a Button) in in flash and host the control in a vb.net form. The the Button & the brain sticks with Flash and gets hosted in the VB form. Helps?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Hi ,
im getting the below error when im trying to access a html(in which im using Wscript.shell using VBScript...) placed in my server..Should change any settings in internet options....
ActiveXComponent Can"t create object :WScript.Shell
Please help me out.....
|
|
|
|
|
It would be better to ask your question in the ASP.NET or Web Development forums
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
does anyone know how to pass a value from word document to a text box?
thanks in advance..
yours truly,
hyperalergelo
|
|
|
|
|
You can examine word documents using the Office Tools for .NET to interop with Word.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yes i know, but i'm having trouble using this..
txtResult.Text = activeDoc.Content.Sentences.Item(1)
and this one
txtResult.Text = activeDoc.Content.characters.Item(1)
got any other idea what to use to get value from word document?
yours truly,
hyperalergelo
|
|
|
|
|
I am getting this error on the above code..
Unable to cast COM object of type 'System.__ComObject' to class type 'System.String'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
yours truly,
hyperalergelo
|
|
|
|
|
problem solved..
I'll post it for future reference..
Imports Word = Microsoft.Office.Interop.Word
Imports Office = Microsoft.Office.Core
Partial Class _Default
Inherits System.Web.UI.Page
Private objMisc As New Miscellaneous
Private WordApp As New Word.ApplicationClass()
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click
'objMisc.InsertCV("E:\CVParser\CVParser\Files\" & OFDCV.FileName)
' set the file name from the open file dialog
Dim aDoc As Word.Document
Dim fileName As Object = OFDCV.PostedFile.FileName
Dim [readOnly] As Object = False
Dim isVisible As Object = True
Dim fileToOpen As Object = DirectCast("c:\sample.doc", Object)
' Here is the way to handle parameters you don't care about in .NET
Dim missing As Object = System.Reflection.Missing.Value
' Make word visible, so you can see what's happening
WordApp.Visible = False
' Open the document that was chosen by the dialog
aDoc = WordApp.Documents.Open(fileName, missing, [readOnly], missing, missing, missing, missing, missing, missing, missing, missing, isVisible) ' Activate the document so it shows up in front aDoc.Activate();
txtResult.Text = aDoc.Content.Text
aDoc.Close(missing, missing, missing)
WordApp.Quit(missing, missing, missing)
End Sub
End Class
yours truly,
hyperalergelo
|
|
|
|