简体   繁体   中英

How To Speed Up Loading DataSets

When Using SQL Server Reporting Services (client Reports), whenever a Client (rdlc) report Opens Visual Studio Loads entire application datasets,

how to speedup loading this all datasets or how to change the process to only load specific Dataset to use in Report ?

Bulk Insert (or the bcp utility) is your Friend for speedy data imports. Your probably going to have to write a data loader in some language though.

I may be understanding you question wrong, but on Win Forms I've been loading the needed data sets manually. I basically have a method that loads the proper data from my database, attach the needed data sets to my report viewer using Me.ReportViewer1.LocalReport.DataSources.Add, then I just display my report using Me.ReportViewer1.LocalReport.ReportEmbeddedResource. My reports are embedded resources, but you can load it from a file too, I just can't remember off the top of my head. Once everything is loaded, call RefreshReport, and the report displays. Well, those are the main points, I don't have my code to look, but I know those are the basic steps.

Currently I have been researching how to load data sets on the fly as the user navigates through the report. My work around for this at the moment is to capture the ReportError event, check what report is trying to be displayed from the sender (this is the report viewer object), and load the dataset using the above. The only issue that I am having is that I don't have a loading screen when I am loading the dataset at this point, so it looks like my application freezes. I haven't figured out how to get back to that circular loading screen, but for now, I have a loading window that is displayed while I load. remember, when you get the error, the report trying to be displayed is already set as the local repot, so all you have to do is have a case/if statment checking for the report and loading the data as needed.

你不能将默认参数设置为停止返回的东西,并且只在运行时将其更改为真实参数吗?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM