|
You already have an answer below. DO NOT repost the same question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello ,
I have finished my client / server application when I did the setup file to another machine and when I try to open the report viewer it gave me these error messages I don't understand where is the probleme...
************** Texte de l'exception **************
System.Data.SqlClient.SqlException (0x80131904): Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
à System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
à System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
à System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
à System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
à System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject)
à System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
à System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
à System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
à System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
à System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
à System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
à System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
à System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
à System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
à System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
à System.Data.SqlClient.SqlConnection.Open()
à System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
à System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
à System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
à GPvdesign.repdatasetTableAdapters.DataTable4TableAdapter.Fill(DataTable4DataTable dataTable, Decimal annee)
à GPvdesign.EtatConsommation.btnAfficher_Click(Object sender, EventArgs e)
à System.Windows.Forms.Control.OnClick(EventArgs e)
à DevComponents.DotNetBar.ButtonX.OnClick(EventArgs e)
à DevComponents.DotNetBar.ButtonX.OnMouseUp(MouseEventArgs e)
à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
à System.Windows.Forms.Control.WndProc(Message& m)
à DevComponents.DotNetBar.PopupItemControl.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Assemblys chargés **************
mscorlib
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1008 (RTMGDR.030319-1000)
CodeBase : file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
GPvdesign
Version de l'assembly : 1.0.0.0
Version Win32 : 1.0.0.0
CodeBase : file:///C:/Program%20Files/Microsoft/Setup2/GPvdesign.exe
----------------------------------------
System.Windows.Forms
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1002 built by: RTMGDR
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1001 built by: RTMGDR
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1001 built by: RTMGDR
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
DevComponents.DotNetBar2
Version de l'assembly : 10.0.0.3
Version Win32 : 10.0.0.3
CodeBase : file:///C:/Program%20Files/Microsoft/Setup2/DevComponents.DotNetBar2.DLL
----------------------------------------
System.Configuration
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1015 (RTMGDR.030319-1000)
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1015 built by: RTMGDR
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 built by: RTMRel
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Windows.Forms.resources
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 built by: RTMRel
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Microsoft.ReportViewer.WinForms
Version de l'assembly : 10.0.0.0
Version Win32 : 10.0.40219.329
CodeBase : file:///C:/Windows/assembly/GAC_MSIL/Microsoft.ReportViewer.WinForms/10.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WinForms.dll
----------------------------------------
System.Data
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 (RTMRel.030319-0100)
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 built by: RTMRel
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Data.DataSetExtensions
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 built by: RTMRel
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
----------------------------------------
System.Numerics
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 built by: RTMRel
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
Microsoft.ReportViewer.WinForms.resources
Version de l'assembly : 10.0.0.0
Version Win32 : 10.0.30319.1
CodeBase : file:///C:/Windows/assembly/GAC_MSIL/Microsoft.ReportViewer.WinForms.resources/10.0.0.0_fr_b03f5f7f11d50a3a/Microsoft.ReportViewer.WinForms.resources.dll
----------------------------------------
Microsoft.ReportViewer.Common
Version de l'assembly : 10.0.0.0
Version Win32 : 10.0.40219.329
CodeBase : file:///C:/Windows/assembly/GAC_MSIL/Microsoft.ReportViewer.Common/10.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.Common.dll
----------------------------------------
mscorlib.resources
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 (RTMRel.030319-0100)
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Transactions
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 (RTMRel.030319-0100)
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Version de l'assembly : 4.0.0.0
Version Win32 : 4.0.30319.1 (RTMRel.030319-0100)
CodeBase : file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
************** Débogage JIT **************
Pour activer le débogage juste-à-temps (JIT), le fichier de configuration pour cette
application ou cet ordinateur (machine.config) doit avoir la valeur
jitDebugging définie dans la section system.windows.forms.
L'application doit également être compilée avec le débogage
activé.
Par exemple :
<configuration>
<system.windows.forms jitdebugging="true">
Lorsque le débogage juste-à-temps est activé, les exceptions non gérées
seront envoyées au débogueur JIT inscrit sur l'ordinateur
plutôt que d'être gérées par cette boîte de dialogue.
Help me please
|
|
|
|
|
I think your connectionstring is telling the connection to use integrated security, but you are either supplying a username and password, or the user logged on to the new machine has no credentials set up in sql server. Either set integrated security to false in your connectionstring, and supply a valid username and password, or set up the credentials in sql server for the current user of the machine.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
|
Make sure you never used a different connectionstring in your report than the one your application uses.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Ok i tell you what i have made in my application maybe we can solve the probleme
I created a configuration file with a name and I called the manager configuration class with name of the file configuration for button add and delete and modify etc... and I created a dataset with DataAdapter for repport viewer using assistance automatically i see the name of connection in file configuration and i clic next i do my query of sql
|
|
|
|
|
I have changed my file configuration
like this
="1.0"="utf-8"
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="Gestionparc.Properties.Settings.GestionParcConnectionString"
connectionString="Data Source=PC; Initial Catalog=GestionParc; User Id=PC; Password=PC"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
but is still not working
|
|
|
|
|
|
Thank you very mush and i am sorry i haven't seen the answer
but
I have changed "Integrated security=true" to "Integrated security=false" and is the same probleme
this link i have seen it before posting this message
Thank you !
|
|
|
|
|
|
Hi to All,
This is with reference to my earlier post Here.
Short Description about project:
Tools uses: Ms.Visual Studio 2010 ultimate edition, Sql Server & Crystal report.
In earlier post, I was succeed to create N-tier application. Two classes Orders & OrderDetails were used to create new orders and add to database. Data Access Layer was used to establish Database connection and provide Sql base operations.
Now I am willing to add reporting feature to my project, for a simple Report I can use following steps:
1-Add Typed DataSet in Visual Studio.
2-Based on that DataSet, create Crystal Report using wizard.
3-Using DAL class, to fetch data, create Report object and and set RecordSource property to Report object.
This report was run successfully..
What I couldn't figure out is how I build Master/Detail report using same approach. How can I pass a DataSet which contains 2 DataTable Orders and OrderDetails to Report Object to display complete Order from Northwind Databse.
|
|
|
|
|
|
Thanks for the links...Let me try to clear the problem a little more:
InvReport is the main report which contain a subreport. Which is based on DataSet1.xsd contains 2 Tables rptOrders and rptOrderdetails
DataSet ds = Ord.GetOrdersByID(int.Parse(this.txtOrdID.text.ToString()));
Above line call the GetOrdersByID method of Orders class which return Dataset consist of 2 tables Orders and OrderDetails.
Then on a Print Button click event of Invoice form create an instance of InvReport invR, and set SetDataSource of invR to ds.Tables[0]. Lastly I called CrystalReportViewer.Report source to invR.
The problem is how can I "tell" SubReport to use ds.Tables[1] as SetDataSource. So that it can pick OrderDetails relevant to Orders data.
I hope I didn't make my problem more confusing...
Thanks
Ahmed
|
|
|
|
|
|
Thanks for the links, I will try to follow guidelines from both..
Appreciate your help.
regards
Ahmed
|
|
|
|
|
I have made code that iterates through a XpsDocument (fixeddocument). It will change the text of glyphs when certains criteria is matched. In visual studio I can see that the UnicodeString is changed. When I close the document the changes are not saved.
public bool Parse(params object[] args)
{
if ((args.Length > 0) && (args[0] is Dictionary<String, object>))
{
_values = args[0] as Dictionary<String, object>;
File.Copy(SourcePath, DestinationPath);
XpsDocument source = new XpsDocument(SourcePath, FileAccess.ReadWrite);
XpsDocument destination = new XpsDocument(DestinationPath,FileAccess.ReadWrite);
XpsDocumentWriter writer = XpsDocument.CreateXpsDocumentWriter(destination);
FixedDocumentSequence sequence = destination.GetFixedDocumentSequence();
foreach (DocumentReference r in sequence.References)
{
FixedDocument d = r.GetDocument(false);
foreach (PageContent content in d.Pages)
{
ContainerVisual visual = new ContainerVisual();
FixedPage page = content.GetPageRoot(false);
double width = page.Width;
double height = page.Height;
Size size = new Size(page.Width, page.Height);
visual.Children.Add(page);
foreach(UIElement test in (page.Children[0] as Canvas).Children)
{
if (test is Glyphs)
{
String glyphContent = processGlyph(test as Glyphs);
}
if (test is Canvas)
{
Canvas address = test as Canvas;
foreach (UIElement row in address.Children)
{
if (row is Canvas)
{
String addres_text = processGlyph((row as Canvas).Children[0] as Glyphs);
}
}
}
}
}
}
source.Close();
destination.Close();
return true;
}
else
{
return false;
}
}
#endregion
#region Private Methods
private String processGlyph(Glyphs glyph)
{
String content="";
String glyphContent = (glyph as Glyphs).UnicodeString.Trim();
if ((glyphContent.StartsWith("«")) && (glyphContent.EndsWith("»")))
{
String key = glyphContent.Trim(new Char[] { '«', '»' });
if (_values.ContainsKey(key))
{
Glyphs item = (glyph as Glyphs);
content = item.UnicodeString.Replace(glyphContent, _values[key].ToString());
item.UnicodeString = content;
item.Indices = null;
}
else
{
Glyphs item = (glyph as Glyphs);
content = item.UnicodeString.Replace(glyphContent, "test");
item.UnicodeString = content;
item.ApplyTemplate();
}
}
return content;
}
Anyone has an idea on how to save the changes that were made to the glyphs?
|
|
|
|
|
I don't see anywhere in your code that you write the new data to the destination or writer objects.
Veni, vidi, abiit domum
|
|
|
|
|
Ok, that is correct, but then the question is how to write the changes back to the fixeddocument?
If I write to writer I will get a :
Package already has a root DocumentSequence or FixedDocument.
And I could not find a way to write it back to destination. Do you know how to do that?
|
|
|
|
|
I am not familiar with the XPS API so I would suggest you go back to the documentation to see what sequence is suggested.
Veni, vidi, abiit domum
|
|
|
|
|
Actually, that is the problem. I make some changes, but there is now way I could find that allows me to write the changes back to the file.
|
|
|
|
|
|
Yes, but it is a C++ library and my application is C#
|
|
|
|
|
|
Good morning.
I have created a library of functions in C#, and I am testing them to see if they work in both VBA and on a spreadsheet (I am ok if they only work in VBA).
I have C# code to display the LastColumn and the LastRow in a spreadsheet as follows:
public string FindLastColumn(Worksheet xlWorkSheet)
{
int nInLastCol = 0;
nInLastCol = xlWorkSheet.Cells.Find("*", System.Reflection.Missing.Value, System.Reflection.Missing.Value,
System.Reflection.Missing.Value, XlSearchOrder.xlByColumns,XlSearchDirection.xlPrevious,
false,System.Reflection.Missing.Value,System.Reflection.Missing.Value).Column;
return GetExcelColumnName(nInLastCol);
}
private string GetExcelColumnName(int columnNumber)
{
int dividend = columnNumber;
string columnName = String.Empty;
int modulo;
while (dividend > 0)
{
modulo = (dividend - 1) % 26;
columnName = Convert.ToChar(65 + modulo).ToString() + columnName;
dividend = (int)((dividend - modulo) / 26);
}
return columnName;
}
public long FindLastRow(Worksheet xlWorkSheet)
{
long nInLastRow = 0;
nInLastRow = xlWorkSheet.Cells.Find("*", System.Reflection.Missing.Value,
System.Reflection.Missing.Value, System.Reflection.Missing.Value,
XlSearchOrder.xlByRows,XlSearchDirection.xlPrevious,
false,System.Reflection.Missing.Value,System.Reflection.Missing.Value).Row;
return nInLastRow;
}
The FindLastColumn code works in VBA, but the FindLastRow does not, and neither works on a sheet (not sure how to correctly pass in the current sheet). The error is: Function or interface marked as retricted, or the function uses an Automation type not supported in Visual Basic.
VBA:
Dim TSExcelLib As New TechSolutionsXLLibrary.ExcelFunctions
Private Sub CommandButton1_Click()
MsgBox TSExcelLib.FindLastColumn(Sheets("Sheet1")) 'Works
MsgBox TSExcelLib.FindLastColumn(Sheet1) 'Works
MsgBox TSExcelLib.FindLastColumn(Sheets("Sheet1")) 'Doesn't work
MsgBox TSExcelLib.FindLastColumn(Sheet1) 'Doesn't work
Any insight would be greatly appreciated. WHEELS
|
|
|
|
|
I'm not an Office dev, but is there any particular reason you wouldn't use worksheet.UsedRange() and just return the appropriate row or column value?
Or...Worksheets("name").Cells.SpecialCells(xlCellTypeLastCell).Row ?
|
|
|
|
|