|
|
Hi
Use the LocalReport object's Render -method to save the report to PDF-format. After the file is created, print the file for example using Process-class for invoking Adobe Reader with print option.
So when only printing you don't actually need the ReportViewer at all.
Hope this helps,
Mika
|
|
|
|
|
Dear All,
I am using 2 listboxes, 1st containing values and 2nd to hold values selected from 1st listbox. On double clicking in 1st listbox selected value moves to 2nd listbox.
Requirment is after movment of selected value to 2nd listbox countrol should be back in 1st listbox and next or previous item (of moved value)should be selected unless their remain some item in 1st listbox.
Kindly guide,
Yawer
|
|
|
|
|
So what exactly are you having problems with?
You can set the focus back to listbox1 with listbox1.SetFocus() and set the correct index with listbox1.SelectedIndex = somenumber .
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Listbox do not offer any methed in c# like .SetFocus().
Yes by using listbox1.SetSelected() I can get focus. But I cannot hardcode a index number. Requirment is on moving a value next or previous value of moved value should be automatically selected. Problem is, there may be any number of values (0 to n) in listbox and user can selected any value 0 to n from list. What can code for it ?
Please guide.
|
|
|
|
|
Yawer Iqbal wrote: Listbox do not offer any methed in c# like .SetFocus().
Sorry my bad, it's listbox1.Focus();
Yawer Iqbal wrote: But I cannot hardcode a index number. Requirment is on moving a value next or previous value of moved value should be automatically selected. Problem is, there may be any number of values (0 to n) in listbox and user can selected any value 0 to n from list. What can code for it ?
Handle the MouseDoubleClick event of the listbox, there you can find out which index has been doubleclicked:
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
int selIndex = listbox.SelectedIndex;
if(selIndex == -1)
...
else
}
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks for your time & attention. It was helpful.
|
|
|
|
|
I want to get another data in the web browser where a data is already in it.i want to change the data dynamically?
MURALEEKRISHNAN.K
|
|
|
|
|
|
hello 4 all,
how can i create an object from " phisical Form files " at run time!
m asking becouse i want to insert into DB all buttons name in all forms in som Directory!
and if i couldnt is there any way to include\execlude Forms from aproject programaticly?
any suggestions would be highly welcomed!!!!
|
|
|
|
|
mrcooll wrote: how can i create an object from " phisical Form files " at run time!
What kind form?
|
|
|
|
|
Windows application form on framework 2.0
|
|
|
|
|
mrcooll wrote: how can i create an object from " phisical Form files " at run time!
You dont have physical forms on your disk once you build and deploy the application.
|
|
|
|
|
hi,
and thank u for trying to help me,
m devloping an application that collect information "Forms, Controls,etc... " about other application before deploying it.
which means that i have the whole project files that m collecting its information.
private void GenerateNodes(DirectoryInfo dinfo)
{
//here i got all of the form names and its files
FileInfo[] files = dinfo.GetFiles("*.resx",SearchOption.AllDirectories);
//or
FileInfo[] files = dinfo.GetFiles
"*.AnyFormExtintion",SearchOption.AllDirectories);
//or
FileInfo[] files = dinfo.GetFiles("*.cs",SearchOption.AllDirectories);
//or
FileInfo[] files = dinfo.GetFiles("*.vb",SearchOption.AllDirectories);
}
What i need is a way to create an object from these forms to iterat over its controls.
Thx.
|
|
|
|
|
One way to do this is to load the file names in and compile[^] them up using the CodeDOM.
|
|
|
|
|
You cant create a form file from scratch at run time. What you can do is manually create controls on an form by calling the constructors of each control dynamically. You'll have to do all the setup that is normally done at design time manually. Look at what the constructor does behind the scenes to create each control on your existing forms.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
Hello everyone,
I'm working with a database. Currently I am using the "Microsoft SQL Server 2005". But I would like to work with a database which is inside Visual studio. So I thought about using the "Local Database".
In my solution I added a new item called "Local Database". I created a new table and tried to connect with it in the same way as I used with the SQL server, but it didn't work.
I use this connectionstring with the SQL server: connectionString = "server=DERESEN\\SQLEXPRESS;Trusted_Connection=yes;database=master;"
And I use this connection string for the local database: connectionString3 = "server=Datatbase.sdf;Trusted_Connection=yes;"
The list in SQL server looks like this: DERESEN\SQLEXPRESS -> Databases -> System Databases -> master -> Tables -> myTable
The list in server Explorer looks like this: Data Connections -> Database.sdf -> Tables -> myTable
Does anyone know how to get this working? I cannot find it anywhere on internet.
|
|
|
|
|
|
Well, I can allready connect to a database. But do you know how to use the Local Database which is embedded in visual studio?
|
|
|
|
|
AFAIK there is no database embedded within Visual studio - unless you are talking about datasets?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Well I really am talking about a database. When you go to your project and add an item, there is also an item called "local database". This is the database I am talking about.
I've never heard of dataset's though, does this has to do something with databases too?
|
|
|
|
|
The thing you are referring to is 'An empty SQL Server Compact Edition database for local data'
So presumably you need to look at connection strings for that, but its not embedded within your app.
Datasets are collections of datatables. Try Google.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi guys! I want to know if it's possible to store PDF document at local database and then to retrieve the document and work with it? Thanks
|
|
|
|
|
laziale wrote: I want to know if it's possible to store PDF document at local database
Store your document in binary and do whatever you want
|
|
|
|
|
can you please give me a example how to do that, and then how to retrieve back and show on the screen as PDF file again. Thanks a lot!!
|
|
|
|