sql - SSRS custom code and variables life -
i have report needs process data sql before show it. that, have custom code, , dictionary push processed data. problem if save dictionary in report variable when export report word variable seems cleaned. lifecycle of reports variables? convenient way of saving object during report life.
thanks!
i have been playing around custom code 6 weeks can answer parts of question of variable lifecycle in ssrs 2008 r2.
i have report uses dictionary store totals, allows me provide specialist subtotals financial stuff. have can check (as can't yet comment on things).
have declared variable 'shared', custom code specific keyword doesn't translate vb.net. ensures variable lives next page, tested excel , word seemed work fine transferring on variable's data.
there trade off under ssrs "report on demand" engine (on web, not on bids) holds variable , doesn't garbage collect until cache cleared. wrote more custom code indicate when parameters changed , clears variable.
code;
public shared dim totals new system.collections.generic.dictionary(of string, decimal) public function wipekeys() decimal 'clear data dictionary (this clear cached object well) totals.clear() return 0d end function i recommend overwrite key ever possible ensure reduction of addition loops.
regards,
Comments
Post a Comment