For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I am using Report Viewer control to display reports in my ASP.NET application. And I am using Server Report from the reporting server services. The reports are displaying fine as expected. But the problem is some reports have active links in them which when clicked redirects to another report. But the reporting server services can be accessed inside the firewall only. But my asp.net application can be accessed from any where. SO my question is how to handle those links i.e how can I display the redirection reports even in the Report Viewer control. Is there any way to manipulate the links programatically, so that they will be displayed on the report viewer.
I would like to be able to call string tag1 & tag2 with multiple values, such as
However, the below contain function only allows me to call 45 values for each tag1 & tag2, anything more than 45 string values used to search tag1 & tag2, the code throws a nested query error: "$id":"1","Message":"An error has occurred.","ExceptionMessage":"Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries.
I tried adding toList() to my tag1 method, but I keep getting syntax error: Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Linq.IQueryable'. An explicit conversion exists (are you missing a cast?)
any further advice, would be very much appreciated. Thank you.
IQueryable<database_BCs> Data = null;
var ids = query.tag2.Split(',');
var dataMatchingTags = db.database_BCs.Where(c => ids.Contains(c.TAG2));
if (Data == null)
Data = dataMatchingTags;
Data = Data.Union(dataMatchingTags);
var ids = query.tag1.Split(',');
var dataMatchingTags = db.database_BCs.Where(c => ids.Contains(c.TAG1));
if (Data == null)
Data = dataMatchingTags;
elseData = Data.Union(dataMatchingTags).ToList();
if (Data == null) // If no tags is being queried, apply filters to the whole set of products
Data = db.database_BCs;
if (query.dl_type != null)
Data = Data.Where(c => c.Type == query.dl_type);
var data = Data.ToList();if (!data.Any())
var message = string.Format("No data found");
return Request.CreateErrorResponse(HttpStatusCode.NotFound, message);
I am generating a function that Exports to Excel using Interop.dll in Vb.net. So Do you think that I need to install office for this on Server machine if I deploy the application? Are there any other things that does export to excel and which will not require Office to be installed on the server machine?
Your help is much appreciated.
"Interop" dlls are just .net wrappers around COM objects that allow your .net code to use the underlying COM objects. For the code to function after being deployed, the COM object the interop is a wrapper for needs to exist, so in your case those objects are provided by Excel, so Excel needs to be installed on the server.
Legal and license issues aside, you're not going to get this working reliable (if at all) and it isn't supported by Microsoft. Look to another way of generating excel files like Open XML, Adpose, the excel odbc driver, DocX etc.
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
There are various ways to create Excel spreadsheets on the server without using Office interop. For example:
NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query.
using (OleDbConnection connection = new OleDbConnection("-YOUR CONNECTION STRING HERE-"))
using (OleDbCommand command = new OleDbCommand("SELECT * FROM emp WHERE date_logged Between ? And ?"))
// OleDbCommand doesn't use named parameters, so the names don't matter here:
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
If you mean the file you selected is forgotten and the upload control blanked when the control is part of an updatepanel then that is normal behavior you can't do anything about. You can't default the file that an upload control points to, and when your updatepanel fires your upload is being deleted then recreated, and it can't be recreated to the same state the way a textbox or dropdown can.
Move the file upload outside of the update panel as they don't work inside asynch update panels anyway.
I have a task to dsiplay a report using ASP.NET webforms ReportViewer Control. I am using a localreport mode to display the report. Now when I change something in the search_str parameter which I want to pass teh value from a textbox prompted to the user and click the View Report button, how to refresh or reset the search_str parameter in the button1_click event.
Last Visit: 31-Dec-99 19:00 Last Update: 4-Mar-15 14:20