|
I'm sorry guys. I ended up posting it in QA, too. I didn't know if it was worse to keep it a double post or to delete 1 of them.
Forgive me CP for I have sinned...
|
|
|
|
|
Say three "Hail Trollslayers" and flagellate yourself with a kipper.
|
|
|
|
|
hi,
i am getting error when i am trying to show crystal report or export. i am not being able to understand reading the error message. i have bind my crystal report with dataset and also properly send crystal report parameter. please help me to fix up the problem.
Error Logon failed. Details: mscorlib : Could not find a part of the path 'D:\Tridip_BBA\BBA JOB Board With New Part\reman\TypedDataset\EOD.xsd'. Error in File C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp_a82e24f3-3616-46fa-bb17-84e169f5d5e7 {AD3F546E-6C3F-4675-9174-9E6F417D5F08}.rpt: Unable to connect: incorrect log on parameters. Error CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. Details: mscorlib : Could not find a part of the path 'D:\Tridip_BBA\BBA JOB Board With New Part\reman\TypedDataset\EOD.xsd'. Error in File C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp_a82e24f3-3616-46fa-bb17-84e169f5d5e7 {AD3F546E-6C3F-4675-9174-9E6F417D5F08}.rpt: Unable to connect: incorrect log on parameters. ---> System.Runtime.InteropServices.COMException (0x8004100F): Logon failed. Details: mscorlib : Could not find a part of the path 'D:\Tridip_BBA\BBA JOB Board With New Part\reman\TypedDataset\EOD.xsd'. Error in File C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp_a82e24f3-3616-46fa-bb17-84e169f5d5e7 {AD3F546E-6C3F-4675-9174-9E6F417D5F08}.rpt: Unable to connect: incorrect log on parameters. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) --- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName) at EOD_Schedular.frmMain.GenerateReport(Boolean ViewOnly) at EOD_Schedular.frmMain.Generate(Boolean ViewOnly) Method Name: ThrowDotNetException
tbhattacharjee
|
|
|
|
|
it seems CR is trying to logon for displaying reports.
try that block;
private void onForm_Load(object sender, EventArgs e)
{
ConnectionInfo myConnection = new ConnectionInfo();
myConnection.ServerName ="servername";
myConnection.DatabaseName = "DB NAME";
myConnection.UserID="user";
myConnection.Password = "password";
setDBLogon(myConnection);
}
private void setDBLogon(ConnectionInfo myconnect)
{
TableLogOnInfos myTable = new TableLogOnInfos();
myTable = crystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo myTableLogOn in myTable)
{
myTableLogOn.ConnectionInfo = myconnect;
}
}
|
|
|
|
|
Hi Tridip,
I would start checking which account is running Reporting Services on your server ; then I would check this account has at least read-access to the D:\Tridip_BBA... directory.
By default, Reporting Services run under a restricted account which hasn't got necessarily access rights to the file system.
As far as I can see, you're trying to export some data to the file system (CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(...) ) ; if that really is the case, you should give the Reporting Services account read and write access to the directory.
Hope this will help.
Kind regards.
|
|
|
|
|
Hi, I want to send three strings or a combination of strings and a int to a wcf server from a wcf client. Current collection types like Dictionary,Hash,Sorted etc. doesn't help as they only accept two types and not accept duplicates. Is there a special type for what I need or should I create a special class for this? Thanks.
To make it more clear. Here is what I want to transfer
Drink Qty Price
Tea 2 1,5
Coffee 1 2,5
Coke 3 2,0
|
|
|
|
|
Create a class to encapsulate this. The items you have here represent "physical" items and not generalisations as supported by enumerable classes. Wrap the class in a list and you should be good to go.
|
|
|
|
|
|
Hi,
If you are using .NET Framework 4, you can use the Tuple object.
It is a generic class, in your case you could instanciate and use it this way :
Tuple<string, string, int> tuple = Tuple.Create("string1", "string2", 3);
Debug.WriteLine(tuple.Item1);
Debug.WriteLine(tuple.Item2);
Debug.WriteLine(tuple.Item3.ToString());
Hope this helps. Regards.
modified on Friday, December 17, 2010 8:13 AM
|
|
|
|
|
TupleWare to the rescue.
5!
|
|
|
|
|
I may start organizing some TupleWare meetings at home... Will give feedback
|
|
|
|
|
Yup, Good Answer.
Take a 5
|
|
|
|
|
Thanks to both of you
I discovered this object a few weeks ago and found it quite useful for situations where creating a custom class would have caused an unnecessary overhead.
|
|
|
|
|
IMHO using Tuple s is a bad practice, similarily to Func and Action delegates. Things should have name. I don't like LINQ extensions for that - I need to remember order of parameters in all these Func s.
Greetings - Jacek
|
|
|
|
|
If you're not using .NET 4, you might want to try Generics as an alternative;
class SomeValue<T>
{
public T FirstValue { get; set; }
}
class SomeValues<T, U>: SomeValue<T>
{
public U SecondValue { get; set; }
}
class TooMuchValues<T, U, V>: SomeValues<T, U>
{
public V ThirdValue { get; set; }
}
static void Main(string[] args)
{
TooMuchValues<String, Int32, String> record = new TooMuchValues<String, Int32, String> ()
{
FirstValue = "Hello",
SecondValue = 1,
ThirdValue = "World"
};
Console.WriteLine ("{0}{1}{2}", record.FirstValue, new String(' ', record.SecondValue), record.ThirdValue);
}
You could add them to a List and enumerate them. I wouldn't recommend it outside prototyping-code though, as it doesn't improve readability (read 'maintainability').
I are Troll
|
|
|
|
|
Hi,
Pattern: \d+(?:\.{0,1}\d+)?
I wrote the above pattern to validate the below data
100
100.
100.80
Its working fine with the above data. But it is accepting "100/80" and "100 80" also..
Please help to resolve this. Thanks in advance.
|
|
|
|
|
Use "^\d+(?:\.{0,1}\d+)?$ " Instead.
Because you haven't mentioned starting and ending of the string.
so for 100/80 there will be two match 100 and 80. So that it will be validated as a true.
Hope it solves.
|
|
|
|
|
It is not validating "100."
|
|
|
|
|
I hope you want regex is based on some sense.
Are you sure "100." is a valid decimal or It has any meaning ?
If you want to pass 100. any way then use "^\d+\.{0,1}(?:\d+)?$ ".
|
|
|
|
|
this might help
\d+[.]{0,1}\d*
|
|
|
|
|
Have you checked it by value 100/12 , That's the problem of OP.
In your case it will return 2 Matches, Just need to wrap Regex in ^Regex$ to solve the issue.
|
|
|
|
|
Below one solved the problem. Thanks alot Hiren and Ravi
"^\d+[.]{0,1}\d*$"
|
|
|
|
|
HaroldVish wrote: Thanks alot Hiren
You're welcome, You can always rate the answer which helped you, That encourages the person to give answer.
|
|
|
|
|
its validating "50-99"
But it shouldn't
|
|
|
|
|
You should have asked this in the regular expression forum. It needs more traffic.
|
|
|
|