|
MMm.... well you can set that DataView in a new DataTable, and pass it as parameter to the Report as a dataset parameter.
HTH
Braulio
|
|
|
|
|
You can't use a DataView as a datasource. It's supposed to work, but my
contact at Crystal told me that there is a bug in the current release that
doesn't let it connect properly. Hopefully they will fix this in a future
release. If you want to see all the ways you can connect a datasource to a
report then check out Chapter 14 of my free online ebook.
-----------------------
You are right. CR works with datasets, but not dataview. I discovered this
while working on my book and discussed it with tech support. They worked on
it and decided that there must be a casting error in their code and they
created a KB issue for it. Hopefully it will be fixed in a future service
pack.
|
|
|
|
|
Hi guys,
Created a simple asp web app and compiled it fine and runs the web page.
So I dragged a label over and placed it on the form. In load_page put the code:
label1.Text = "This is a test web page";
But when its run, it doesn't display the label!!
What am I doing wrong??
Thanks.
|
|
|
|
|
Hi,
Is it possible to get the event of scroll of a Form? I would like to do something every the forms is scrolling; (the form is set to AutoScroll).
Thanks for help~~!!
|
|
|
|
|
Scrolling support in WinForms is not too good. You have to subclass the form and catch WM_HSCROLL, WM_VSCROLL, and WM_MOUSEWHEEL events.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
You have to subclass the form
sorry,jdunlap,
I'm stupid.Could you explain it a bit more?
Coz I'm just a fresh C# programmer. I'll be happy if you could provide me some part of codes/examples.
Thank you
|
|
|
|
|
Here is a basic subclassing class in C#:
class SubClasser : System.Windows.Forms.NativeWindow
{
public SubClasser(IntPtr formhandle)
{
base.AssignHandle(formhandle);
}
protected override void WndProc(
ref System.Windows.Forms.Message m)
{
base.WndProc(ref m);
switch(m.Msg)
{
case WM_HSCROLL:
break;
case WM_VSCROLL:
break;
}
}
}
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
Scrolling support in WinForms is not too good.
If the scrolling is not good in WinForm, then what can I use? Or I need to make a newcontrol?
I use autoScroll in my Form, because I don't want to waste much time on calculation. I've tried to use hScrollBar and vScrollBar, but the interface looks not beautiful as autoScroll bar.
Any idea for me??
|
|
|
|
|
I have a class library version 1.0. I want it to GAC(Global Assemly Cache).Now how can I use it in my application?I can't use object which exist in it,I have to first Add reference to the local compy of it,then if I delete dll file in my debug directory,because another version is exist in GAC I can use the version in GAC.HHow can I use that vversion from the begining.
My second question is I have careated version2.0 and v3.0 and put them in GAC,the question is how can I force my application to use my desired version?
Mazy
No sig. available now.
|
|
|
|
|
Regards,
We have developed a multimedia software using C# which uses a .mdb (MS-Access file) as database. When burning the whole project on the CD, the program coulden't access the database so we had to to install the .mdb file on the user's system HDD and that works.
But I still wonder why it was not possible to read our database on the CD and if it is anyway to do so. perhaps C# needs to write some temporary files beside the .mdb file to work with or what?
Thanks for any note and help,
-nSun
---
"Art happens when you least expect it"
|
|
|
|
|
nSun wrote:
perhaps C# needs to write some temporary files beside the .mdb file to work with or what?
Yes,there is a lock file that should be written near .mdb file but I don''t think this is specific to C# only.
Mazy
No sig. available now.
|
|
|
|
|
Yes, the Jet database engine, which Access DBs are based on, create a *.ldb database lock file. But this has nothing to do with whether or not you use C#.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I'm not experienced in Access so don't quote me - but...
Is it possible to open the database as a shared connection - would this remove the need to write the lock file.
Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript)
tatham@e-oddie.com
+61 414 275 989
|
|
|
|
|
Hi,
If you choose "Read Only" AND "Open Exclusive" together, Access won't create
the *.ldb file if it isn't already there.
Another option is to get any "ldb" file, and copy it into the CD as well... not very clean solution, but it seems that it works fine
Good luck
Braulio
|
|
|
|
|
Hi,
Have you tried to set "Exclusive Access" and login to the database with an user that only has "Read Data" access ?
Tools >> Security >> User and Group Accounts
Tools >> Security >> User and Group Permissions
HTH
Braulio
|
|
|
|
|
It is possible to open an Access database which resides on a CD, but you must open it as Exclusive, Read-Only. This prevents the ldb file from being created.
|
|
|
|
|
Thanks all for helps.
-nSun
---
"Art happens when you least expect it"
|
|
|
|
|
|
Hi,
It would be a good idea if you include some Doc or Pdf with some snapshots... just download the Zip... and put the exes in a local computer... just look like a virus or something like that
Greetings
Braulio
|
|
|
|
|
|
Hi!
I'm trying to print the values in my DataSet.
It has a single row in it. I used this CommandText: "Select NAME from Authors"
Now the query returns all the names.
Now, I want to print the values in the dataset and I want to use foreach because I do not know how many names I might get. But the problem is, what do I use to traverse my set? I used this ff code but it generates an error:
DataRow dr = dsDBData.Tables[0].Rows[0];
foreach (DataColumn dc in dr)
{
MessageBox.Show(dc.ToString());
}
Please help.
"To teach is to learn twice"
|
|
|
|
|
daljv wrote:
foreach (DataColumn dc in dr)
Change it to something like this:
foreach(DataColumn in dr.Table.Columns)
Mazy
No sig. available now.
|
|
|
|
|
You have more than one row and DataRow object doesn't contain Columns objects. See help on Data namespace. Should be:
foreach(DataRow dr in dsDBData.Tables[0].Rows)
{
MessageBox.Show(dr[0].ToString());
}
Hi,
AW
|
|
|
|
|
A.Wegierski wrote:
DataRow object doesn't contain Columns objects
DataRow.Table.Columns
Mazy
No sig. available now.
|
|
|
|
|
Thx
Hi,
AW
|
|
|
|