开发者

multi crystal report 9.0 in asp.net 3.5

I might be asking a very basic question and I am sorry for that.

I have a web application which is sort of a reporting portal. I have a ReportViewer.aspx p开发者_如何学编程age which has the crystalreportviewer control on it, and i am using the same viewer to show different reports. The reports are made by someone else altogther so i just have a .rpt file which i have included in my project.

I am giving the report datasource dynamically so there is no static data binding.(passing the parameters dynamically as well)

The reports usually have more than one page.

The problem is when i move to the next page, there is a postback and it does all the databinding again.

If i save the reportdocument object in session and check IsPostback and just get it out of the session, it works fine.

The question is whether this is the correct way of doing it. coz if i open a new tab and see the same report i will end up losing my first report...(i could avoid this by doing some whacky session management like passing a guid in the querystring and then retrieving the correct report object) but still is this the right way?

any examples of how it is done would be really great...

Cheers,

Oz


Well, you keep the ReportDocument in session and bind it to the CrystalViewer if PostBack.

The important point though is to do it all in Page_Init instead of Page_Load otherwise multipage crystal reports will be stuck on page 2 when you click the next button...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜