|
hello
i was connect to oracle database using oracleadapter and generate for this adapter a dataset ,the dataset contain data from database when i display it on datagride but it dose not contain anything on the crystal report ????!!!!!
i write these linwe on the load form event
oraqcleadapter1.fill( dataset1 )
and i use .NET2005
how i can solve this problem ????? !!!!!!!!!!!!!!!!!!!
|
|
|
|
|
Please, when you have a question, choose one forum to ask it in, instead of spamming the site. Are you using C#, or VB ?
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 )
|
|
|
|
|
Looking through the fog of his other two spam posts, I think he's asking about why his dataset is coming up empty in Crystal Reports. Two problems, first, I haven't used Oracle in a very long time and don't plan on using it anytime soon, and secondly, my Crystal Reports skills are very meager
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
F*** U Christian...
If U dont want to answer his question, then dont answer it
|
|
|
|
|
Hello everyone, I hope this is the right place to ask.
I am currently designing an user interface on top of a commercial 3d engine.
I was wondering if anyone has some insights about the algorithms behind a texture atlas generation.
By texture atlas, I mean a fairly big 2^n sized texture which will contain several variable-sized textures.
The basic scenario is letting the end-user load custom textures and then store them in this atlas, preventing too many texture changes.
However, despite having tried a practical approach, I am pretty sure this requires some extended knowledge about data structs which I don't think I am proficient with yet.
Has anybody worked to obtain something similar for a MDX application, for instance?
I've found some resources in the net but sadly I couldn't use them to avail. nVidia's code is not clear enough for me to understand the algorithm behind it.
Any help, links or advices would be great and greatly appreciated. Thanks in advance for reading!
|
|
|
|
|
I am creating an ArrayList in C# then passing it to a javascript in a webbrowser.
When trying to read values, I keep getting an "undefined" value for the Array item , i.e. sData[3] in the javascript.
If I do an alert(sData.Count) it does display the correct count for the Array.
Everything up to reading the Array works, the select box gets cleared, etc. But then nothing is passed.
Any help would be appreciated.
C# code:
public class MainForm : Form
{
ArrayList SelectDisplay = new ArrayList();
ArrayList SelectData = new ArrayList();
void PassData_BtnClick(object sender, EventArgs e)
{
FillSelectArrays("Start","none");
FillSelectArrays("One Test","one");
FillSelectArrays("Two Test","two");
FillSelectArrays("Three Test","three");
browser.Document.InvokeScript("FillSelectFromArrays", new object[] { ch.Name, SelectDisplay, SelectData });
}
private void FillSelectArrays(string display, string data)
{
//The Arrays are already defined
SelectDisplay.Add(display);
SelectData.Add(data);
}
private void ClearSelectArrays()
{
SelectDisplay.Clear();
SelectData.Clear();
}
html & javascript:
Test Array:
Values Will Appear Here
function FillSelectFromArrays(sName, sDisplay, sData)
{
var stot = document.forms[0][sName]
EmptySelect(stot)
with (stot)
{
//Rewrites the text and values
alert("sData[3] = " + sData[3]);
for(i=0; i < sDisplay.Count; i++)
{
options[i]=new Option(sDisplay[i], sData[i]);
}
options[0].selected=true
}
}
function EmptySelect(sName)
{
var tot = sName.options.length
for (i=0;i<tot;i++)
{
sName.options[i]=null
}
sName.options.length=0;
}
Thanks!
Sean Murphy
"All things great and small start at the same point, the first step."
|
|
|
|
|
have you tried using an old-school array instead of ArrayList? (i.e. yourArrayList.ToArray())
javascript is probably not capable of handling non-basic .NET types
|
|
|
|
|
Definitely a great idea and one I hadn't thought of, but unfortunately it didn't work. I even tried creating it as an object[] then putting that into a collection.
Arg
Thanks!
Sean Murphy
"All things great and small start at the same point, the first step."
|
|
|
|
|
I hope this query has been put in the right forum
I have a windows application which i need to move from the production environment to deployment
Upon execution of the EXe for the first time the user should be able to enter the server name / initial catalog / user id / pwd have the connection validated and then a custom conection string should be generated and written on to the app.config file (or any other config file) as for that matter
I have already handled everything upto the writing of the connection string in the app.config file
Need to know how exactly will this connection string be added to the config file
Any help will be appreciated and suggestions / alternative approaches are welcome
Regards
-- modified at 16:37 Wednesday 25th July, 2007
Romi
|
|
|
|
|
what you need to do is have methods that allow you to read and write to your app.config file. Follow this article it will show you how to modify an app.config file.
http://www.codeproject.com/csharp/ReadWriteXmlIni.asp
http://ryanfarley.com/blog/archive/2004/07/13/879.aspx
|
|
|
|
|
Thanks for your reply...
is there anyway I can use any of classes in the System.Configuration namespace instead of using XML ?
Also the question may contradict the one above !
Is writing directly to the app.config file once on deployment an accepted practice ?
In case it is not what would be the best way or is there a best practice for storing a connection ?
Regards
Romi
|
|
|
|
|
Thanks for our help everyone....
This issue I have been able to close.....What a relief !!
Romi
|
|
|
|
|
Also, remember the app.config file is a text file, so you must encrypt the connection string. If you don't, the password will be available for everyone to see.
Another thing, DON'T EVER use the sa account. If you are giving an SQL Server account to your users (to put in the connection string), be sure to give it the least priviledges possible (like only executing stored procedures for example).
|
|
|
|
|
In visual studio 2005, when I add a tab control to a form with a gradiant background image, the tabs flicker when I hover over them. Is there a solution to this?
As a side note, I am coding in C#. I found many custom tab controls but they all seemed ugly, or not written in C#.
Help!
|
|
|
|
|
Justin,
I'm guessing that it is just your computer (or mine), cause it doesn't happen to me. I grabbed a gradient background image from the web and placed it as the background. Then placed a tab control on the form. I compiled it and didn't get any flickering. Is there a missing step here you didn't mention?
Hogan
|
|
|
|
|
well I am using vista and the tab control is set to system. The flickering occurs when going back and forth several times showing the hover state. I have antother system on vista that does the same thing.
|
|
|
|
|
I'm using XP. I tried going back and forth several times and I did see it occasionally. Not sure what it is, sorry.
Hogan
|
|
|
|
|
I am using this control to allow users to upload images. I have specifications to validate the file size (.5 mg), deminsions (600x600), and file type (.jpg or .jpeg only). I had to put code around to allow it to see .pdf files but when I load a bitmap the app blows up. It doesn't hit the button click event or even the page_load. It goes straight to the IE "This page cannot be found". Any suggestions.
|
|
|
|
|
Normally, when I have seen upload files blow up right away it has to do with the 4mb limit default for files. I would guess that your web.config has a value that is causing a problem.
maxRequestLength="4096" is the 4mb default. I would probably leave it at that and then check the file size after you have uploaded the file.
Hope that helps.
Ben
|
|
|
|
|
Thanks for the reply, Ben.
However, I don't have the "maxRequestLength" key in my web.config. Also, I don't even get an opportunity to check the size of the file because as soon as you hit the upload/submit button, it jumps straight to "page cannot be found". Weird?!?
|
|
|
|
|
I have in window a graphic. In the same window i have a pictureBox. How can i determin if the pictureBox is on top of the graphic. Is there a method whick determines if a point is inside of an area?
Good gives us the power of creating the future. Use this power with reason.
|
|
|
|
|
Read up on the following methods:
Rectangle.Contains
Rectangle.IntersectsWith
GraphicsPath.IsVisible
I trust one of them will be what you need.
|
|
|
|
|
what happens if the area is irregulate? if the area is a polygon?
Good gives us the power of creating the future. Use this power with reason.
|
|
|
|
|
if you can explain it, then you can program it to draw, to fill, to determine in/out etc.
read up on the keywords I gave you.
|
|
|
|
|
I've implemented a "Color Selector" made by:
4 classes:
Solid
Linear
Path
Texture
each class have a method which return a new brush of type related(LinearGradientBrush for "linear" etc.)
all that 4 are selectable from a "Master" Property:
public class MyClass : UserControl
{
public static Solid SolidFill = new Solid();
public static LinearGradient LinearGradientFill = new LinearGradient();
public static PathGradient PathGradientFill = new PathGradient();
public static Texture TextureFill = new Texture();
public static int TypeIndex = 1;
public object Fill = new object();
[Category("Color")]
[DisplayName("Fill Type")]
[TypeConverter(typeof(MyTypeConverter))]
public object FillType
{
get { return Fill; }
set { Fill = value; this.Invalidate(); }
}
protected override void OnPaint(PaintEventArgs e)
{
Graphics ShapeGraphicsObject = e.Graphics;
GraphicsPath ShapeGraphicsPath = new GraphicsPath();
Pen BorderPen = new Pen(BorderColor, BorderThikness);
Brush GlobalizedBrush = SolidFill.SolidMethod();
ShapeGraphicsPath.AddRectangle(ShapeGraphicsObject.VisibleClipBounds.X, ShapeGraphicsObject.VisibleClipBounds.Y, ShapeGraphicsObject.VisibleClipBounds.Width, ShapeGraphicsObject.VisibleClipBounds.Height);
switch (TypeIndex)
{
case 1:
GlobalizedBrush = SolidFill.SolidMethod();
break;
case 2:
GlobalizedBrush = LinearGradientFill.LinearGradientMethod(LinearRectangle);
break;
case 3:
GlobalizedBrush = PathGradientFill.PathGradientMethod(ShapeGraphicsPath);
break;
case 4:
GlobalizedBrush = TextureFill.TextureMethod();
break;
}
ShapeGraphicsObject.FillPath(GlobalizedBrush, ShapeGraphicsPath);
ShapeGraphicsObject.DrawPath(BorderPen, ShapeGraphicsPath);
}
}
In "MyTypeConverter" I found some different ways for having a Dropdown with String Names for 4 types,so I'm able to select from Property Grid
the "type" which "FillType" object will be after "desired string name selected" from dropdown.
So,this works perfect at design time,but when I press "F5" my control is not coloured as in design time.
If I change property in
public Solid = new Solid ();
[Category("Color")]
[DisplayName("Fill Type")]
[TypeConverter(typeof(MyTypeConverter))]
public Solid FillType
{
get { return Fill; }
set { Fill = value; this.Invalidate(); }
}
it works perfect at Runtime and DesignTime
but it display in propertygrid ONLY "Solid" type properties.
I don't know what I should Change in MyTypeConverter implementation.
I try to describe "PropertyGrid" Graphically when Is Selected "Solid" string(It identify "mynamespace.Solid"type in MyTypeConverter)
ExpandableObjectConverter Dropdown Values from "MyTypeConverter"
+ FillType Solid (but when I load control "Default Value" is "System.Object" took from "FillType" Property Type");
SolidTypeProperty1 Linear
SolidTypeProperty2 Path
SolidTypeProperty etc. Texture
Or when is Selected "Linear"
ExpandableObjectConverter Dropdown Values from "MyTypeConverter"
+ FillType Linear
LinearTypeProperty1 Solid
LinearTypeProperty2 Path
LinearTypeProperty etc. Texture
I'm a newbie in handling TypeConverters,so I post the code for MyTypeConverter too:
public class ColorTypeConverter : ExpandableObjectConverter
{
private ArrayList Values = new ArrayList();
public ColorTypeConverter()
{
Values.Add(myNamespace.SolidFill);
Values.Add(myNamespace.LinearGradientFill);
Values.Add(myNamespace.PathGradientFill);
Values.Add(myNamespace.TextureFill);
}
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
StandardValuesCollection Svc = new StandardValuesCollection(Values);
return Svc;
}
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
if (sourceType == typeof(string)) { return true; }
else return base.CanConvertFrom(context, sourceType);
}
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
if (destinationType == typeof(string)) { return true; }
else return base.CanConvertTo(context, destinationType);
}
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
{
if ((string)value == "Solid") {return myNamespace.SolidFill; }
if ((string)value == "Linear") { return myNamespace.LinearGradientFill; }
if ((string)value == "Path") { return myNamespace.PathGradientFill; }
if ((string)value == "Texture") { return myNamespace.TextureFill; }
else return base.ConvertFrom(context, culture, value);
}
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
{
if (value.GetType() == typeof(Solid)) { myNamespace.TypeIndex = 1; return "Solid"; }
if (value.GetType() == typeof(LinearGradient)) { myNamespace.TypeIndex = 2; return "Linear"; }
if (value.GetType() == typeof(PathGradient)) { myNamespace.TypeIndex = 3; return "Path"; }
if (value.GetType() == typeof(Texture)) { myNamespace.TypeIndex = 4; return "Texture"; }
else return base.ConvertTo(context, culture, value, destinationType);
}
}
Any Suggestion for let work It at Runtime?
Optimizing Code?
Is useful to add Instances of 4 classes as it,or is better let 4 classes derive from "Component" and add all four as contained components in the
ctor of the "Coloured"UserControl?
Or Methods as "CreateInstance" from TypeConverter base class could be useful?
Please try to help me!
Thank You so much for patience and attention.
Frank Drebin
|
|
|
|