|
Thanks Yogesh,
Even I tried by using "View" as well. I noticed, performance is much better in case of direct joins instead of view. Any other ideas?
|
|
|
|
|
If the data does not need to be 100% real time, you could have a denormalised, reporting database where you 'pump' the data to from your live database on a periodic basis. This means that all the 'joining' is effectively done when you move the data and the subsequent selects on that table are then much faster.
|
|
|
|
|
Thanks,
Seems to be a good idea. But partially the data is real time. So even for every 10 minutes, if I do data pumping, that makes wrong info in the report.
Any other way to do it in the application side??
|
|
|
|
|
As Guffa says, you need to look at your DB design - is there any way to reduce the number of joins? Can you introduce indices that will speed up your table scans? Are you limiting your data returned to the absolute minimum?
|
|
|
|
|
One table contains the Master Ids like: CategoryId, SubCategoryId, RegionId, LocationId, DepartmentId, ItemId ... etc. which is having relation with different master tables.
and there is no chance of avoiding joins.
Regarding Index - All the above mentioned fields are primary key in the respective table.
Having the "Paging" option and the "Master" tables are joined only to the page size resultset.
|
|
|
|
|
You might want to take this over to the SQL forum (probably wouldn't have been a bad place to start), and see if the big brains over there can help...
|
|
|
|
|
I appreciate your idea. I posted the same in SQL side as well and got some better ways of doing it. But I am looking out any better ways through dot net application.
|
|
|
|
|
Verify that you have indexes on the fields that you use to identify records in the query.
If you for example join in a table using:
inner join SomeTable s on s.SomeUniqueId = x.SomeExternalKey
Check that you have an index on the SomeUniqueId field. (If the field is primary key in the table, it automatically has an index.)
Run the query in Management Studio and view the execution plan. That will show you what is really done when the query runs.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
If your data is not updating frequently the use datacaching to store data, that it will not hit your database server every time. data will be read from cache itself.
You can update the cache on a particular time interval.
|
|
|
|
|
Hi, All
I just start a new program i asp.net and it confuse me in some basic concept. as you can see i just create a public class named connection then i want to initialize it on page load.
but when ever i click on any of the button, it give me the error null reference error whats wrong in ASP.NET, because same work with the windows application with C#.
plz do reply
regards
Yogesh Agarwal
public partial class Admin_Default : System.Web.UI.Page
{
Connection con;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
con = new Connection();
}
protected void Button1_Click(object sender, EventArgs e)
{
con.skysconnection();
}
protected void Button2_Click(object sender, EventArgs e)
{
con.skysconnection();
}
}
|
|
|
|
|
Hi,
Why do you make your connection int he Page_Load? I cannot see the reason for doing this. Why not in the skysconnection() method?
Kind regards
simsen
|
|
|
|
|
Thanks for the reply.
Acctually it is just a doubt in the mind, i could do it in sevral manners, i just want to know what is the problem in doing the same in this manner.
Regards
Yogesh Agarwal
|
|
|
|
|
ASP.NET is stateless ... which means it doesnt maintain the state of its objects ... on each request and response cycle the page is treated as something new and for the first time ... thats why state management in ASP.NET is a challenge ...
The code you provided should work on Windows Application because it maintains the state of its object ... but here each time you click the button the page is reinitialized with its variables you declared ..to solve such a problem read about maintaining objects states using Sessions and ViewStates in ASP.NET
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
Thanks for the answer,
Means in every pageload or postback the objects were destroyed we defined in ASP.NET,
And does it works fine if i use ajax.
Regards
Yogesh Agarwal
|
|
|
|
|
Actually AJAX has nothing to do with the main life cycle of a page ... for the scope you are talking about its only the server side .. and there where you are concerned about the life cycle of page.
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
I've got some labels in Gridview2 that I allow the user to drop into text boxes in Gridview1 and it would change the textbox information to label information.
Initially i drag a label onto the text box and the value of textbox changes to label info, if i drag different label onto the same text box it will just append to the existing text and i am not able to override the text in textbox.
i am using VS2005 with Ajax extensions.
Plz help to override the value in textbox
Thanks in Advance.
modified on Thursday, November 20, 2008 6:19 AM
|
|
|
|
|
Hi everyone can anybody tell me how compatible asp.net project with apache 2.2....we r planning to host website using asp.net with Apache webserver...does this works? if yes can u tell me hw can i implement it...? if no please tell me the reason and in which way it can be implemented....
Thanks in advance..
|
|
|
|
|
|
wht abt mod_aspdotnet.so....i saw in website they used mod_aspdotnet.so n its working fine but am nt sure abt the security level...so can anyone tell me is it safe? and Abt mono i don have any idea...i have to try...
|
|
|
|
|
Sorry ! I don not have idea. But These all stuff you can ask in Mono Forum. That would be better.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
oh thank you very much...
|
|
|
|
|
hi,
I am facing a problem with authentication in IIS.I have to use a COM componet that internally takes the logged in users information and if that user is valid then we can make calls to COM.I developed a windows application and its takes logged in user information and works fine.Later we decided to make it as a webservice there the problem started.If we run the webservice in Visual studio's webserver its works fine after moving to IIS the COM component is not able to get the logged in user information and stops working.
Hosted in IIS with anonymous disabled and enabled windows authentication even i tried with Impersonation but no luck.
if all works fine finally i have to make it as a WCF service.
Please helpe me on this issue..
Regards
Rajeev G
|
|
|
|
|
It appears that the print button does not show in a report viewer with the processing mode set to local. How would I process the report viewer to either print or to open a new window with the contents in a printable page? Would it be ReportViewer1.Render? I am learning this new control and am not familiar with that method or if that would even work.
Thanks
Revolutionary: Disk drives go round and round.
|
|
|
|
|
I can answer you regardin the render method ... you probably meant the ReportViewer.LocalReport.Render method ... well its the main method in the ReportViewer Control ... this method uses the report definition (which is an xml format stored in rdlc file referring to the report) to render the report defintion with its data to the ASP.NET page ... the LocalReport will have the definition and its integrated with the stored procedure or the datasource ... then using some parameters to the render method you get an array of bytes which is the output you want ...
Take a look at the code below:
string format="PDF";
Warning[] warnings;
string[] streamIDs;
string mimeType;
string encoding;
string extension;
string deviceInfo = "<deviceinfo><simplepageheaders></simplepageheaders></deviceinfo>";
byte[] buffer = viewer.LocalReport.Render(format, deviceInfo, out mimeType, out encoding, out extension, out streamIDs, out warnings);
this.Response.Clear();
this.Response.AddHeader("Content-Type", mimeType);
this.Response.AddHeader("Content-Disposition", "attachment; filename=" + reportName + "." + extension);
this.Response.BinaryWrite(buffer);
this.Response.End();
The above code will render the specified local report as PDF and return the result as an array of bytes ... then you write this array of bytes to back to the response as a dialog of Open or Save ...
I needed this trick in a project and it worked fine with me ... I could render the report to PDF Excel or whatever I can to be as the user can just download easly.
Hope this could help ...
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
I will definitely give it a shot. Thank you!
Revolutionary: Disk drives go round and round.
|
|
|
|