in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Toolbar Paging in a Web Report loses parameters

Last post 11/14/2007 8:56 AM by Pat B. 18 replies.
Page 1 of 2 (19 items) 1 2 Next >
Sort Posts:
Previous Next
  • 11/16/2006 2:28 AM

    Toolbar Paging in a Web Report loses parameters

    I am trying to get a web report working with parameters. The first page 
    loads and displays correctly, but when I use the ReportToolbar to navigate 
    to the second page it re-runs the SelectCommand of the report without any of 
    the parameters.
    
    I've read thru all the Knowledge base articles on web reports on the Dx 
    site, and I've submitted a bug report - only to be told by DevEx that this 
    behavior is by design!!  What kind of crap is that? What is the point of 
    having a "ReportToolbar" if it only works with hard-coded permenant reports? 
    I don't know many developers that could use that and am surprised that DevEx 
    would publish such a worthless component.  I have not been able to find any 
    way to pass parameters to my report and see more than one page of results! 
    After much frustration I decided to abandon "paging" and try to have the 
    report display (in the ReportViewer) all on one page - but now I can't get 
    the report to NOT page... very very frustrating on something that SHOULD be 
    simple and BASIC....
    
    If anyone has a solution to this I would greatly appreciate it. I have 
    always been a supporter of Dev Ex components from the early Delphi days on. 
    But I can't use a web report solution that doesn't allow me to pass 
    persistent parameters. If I can't get this resolved very quickly I will have 
    to abandon using the devex reports and my company will go back to Crystal so 
    PLEASE someone tell me they have a solution for this...
  • 11/16/2006 1:16 PM In reply to

    • Christopher Pienta

    Re: Toolbar Paging in a Web Report loses parameters

    Take a look at this page.
    http://community.devexpress.com/blogs/alansplace/archive/2006/05/10/92.aspx
    I was able to do parameter reports and get the toolbar working with
    this information.  
  • 11/17/2006 5:32 AM In reply to

    Re: Toolbar Paging in a Web Report loses parameters

    That worked! Thanks.
    
    Still, it's a 'hack' of a solution. Hope they fix it right soon...
    
    "Christopher Pienta" <chrisp@SPAMNOTmss1.com> wrote in message 
    news:b1pol2tkosnm5f6bnlbqp9uu0b5tav8qdc@4ax.com...
    >
    > Take a look at this page.
    > http://community.devexpress.com/blogs/alansplace/archive/2006/05/10/92.aspx
    > I was able to do parameter reports and get the toolbar working with
    > this information.
    >
    > 
  • 10/26/2007 4:51 PM In reply to

    • Pat B
    • Top 500 Contributor
    • Joined on 10/24/2007
    • Rochester, NY
    • Posts 47

    Re: Toolbar Paging in a Web Report loses parameters

     

    Anonymous:
    Take a look at this page. http://community.devexpress.com/blogs/alansplace/archive/2006/05/10/92.aspx I was able to do parameter reports and get the toolbar working with this information.

    This blog references an issue (http://www.devexpress.com/Support/Center/p/AS3465.aspx which then references issue  http://www.devexpress.com/Support/Center/ViewIssue.aspx?issueid=A1892)

    Maybe this problem will have a fix soon?  Does anyone at DevExpress know when the RC 7.3 will be released (referenced by Issue A1892)?

    It sure would help if I could get past this paging issue I am having during my evaluation period.

    Thank you, 


     

    Pat B
    BCC Software, Inc
    Enterprise Application Developer
  • 10/29/2007 11:07 AM In reply to

    Re: Toolbar Paging in a Web Report loses parameters

    Dear Pat,

    Yes, the forthcoming version of XtraReports (v2007.3) allows you to cache a Web report in an easier way than it was before. So, if you wait until its official release (it should be release in several weeks), you may see how it is done now. Unfortunately, only our DXperience subscribers can participate in our 7.3 beta program.

    @.
    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 10/29/2007 11:10 AM In reply to

    • Pat B
    • Top 500 Contributor
    • Joined on 10/24/2007
    • Rochester, NY
    • Posts 47

    Re: Toolbar Paging in a Web Report loses parameters

    Alan (Developer Express):
    Unfortunately, only our DXperience subscribers can participate in our 7.3 beta program
     

    So if I purchase it, I can enter the beta?
     

    Pat B
    BCC Software, Inc
    Enterprise Application Developer
  • 10/29/2007 11:24 AM In reply to

    Re: Toolbar Paging in a Web Report loses parameters

    Sure!

    @.
    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 10/29/2007 9:45 PM In reply to

    • Pat B
    • Top 500 Contributor
    • Joined on 10/24/2007
    • Rochester, NY
    • Posts 47

    Re: Toolbar Paging in a Web Report loses parameters

    Alan (Developer Express):
    Yes, the forthcoming version of XtraReports (v2007.3) allows you to cache a Web report in an easier way than it was before.
     

    How does version 7.3 save/store the report?  Does it use page.cache or can it be serialized to ViewState?  I would like to be able to save it in ViewState so I do not have to be concerned about page.cache expiration. 

    Pat B
    BCC Software, Inc
    Enterprise Application Developer
  • 10/30/2007 4:51 AM In reply to

    Re: Toolbar Paging in a Web Report loses parameters

    Hello Pat,

    The XtraReports v2007.3 introduces two new events in the ReportViewer class - CacheReportDocument and RestoreReportDocumentFromCache. You can use them to save and restore a report in your application in the most suitable way. For example, if you're able to download 7.3 beta, you may refer to "Master-detail" and "Document Map" modules of the XtraReports Web demo to see how this can be done.

    @.
    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 10/30/2007 7:09 AM In reply to

    • Pat B
    • Top 500 Contributor
    • Joined on 10/24/2007
    • Rochester, NY
    • Posts 47

    Re: Toolbar Paging in a Web Report loses parameters

     Alan,

    Thanks for the reply.  I am a little concerned that v2007.3 will only allow for saving to cache.  Cache is a great solution for a report that does not have a custom data source (from how I've seen it implemented).  The problem is once the cache expires, the report is no long able to be generated.  It is not feasible to have the cache not expire as the user will eventually move away from the report.  Is the report object serializable so that is can be saved to ViewState or to a file on the server?

    Unfortunately I do not have access to 7.3 beta.  I am not a customer yet.  I am currently evaluating your software.  So far I have been pretty impressed with the power and functionality of the XtraReport control, but I am having some issues with persisting the report object and I'm concerned that 7.3 will not solve my problem.  When I initially create the report (using a dynamic SQL view based upon user input), all is well.  I save the report object to page.cache as I read in one of your knowledge base articles.  However, when using cache (even with sliding expiration), the user could walk away and then return to click on the next page button which then throws an error (that I can seem to trap) because the cache has expired.

    In the knowledgebase article, the example uses the init function to check to see if it is available in cache or not.  If it is not cached then the function calls a create report function which would seem to solve the problem.  However I can not do this because it then tries to create the report when the page initially loads.  At this point, I have not created the custom data source because the user has not entered their criteria.  Additionally when then cache expires, the user selected input is no longer available to the init function to create the report again.  I like your product, but the has been very frustrating.
     

    Pat B
    BCC Software, Inc
    Enterprise Application Developer
  • 10/31/2007 10:56 AM In reply to

    Re: Toolbar Paging in a Web Report loses parameters

    Hello Pat,

    Sorry, it seems that I didn't correctly describe the way this feature is implemented in v2007 vol 3. As I said before, the ReportViewer class introduces the CacheReportDocument and RestoreReportDocumentFromCache events. The CacheReportDocument event occurs after a report document (XtraReport.PrintingSystem.Document) is generated for the first time. And this event allows you to save a document as a collection of Page objects within their bricks (so, a datasource is no longer necessary) into any place you want. For example:


    protected void ReportViewer1_CacheReportDocument(object sender, CacheReportDocumentEventArgs e) {
        e.Key = Guid.NewGuid().ToString();
        Page.Session[e.Key] = e.SaveDocumentToMemoryStream();
    }


    And then you may restore a document using the RestoreReportDocumentFromCache event, which occurs every time a ReportViewer requires a document (e.g. when an end-user navigates to a different document page):


    protected void ReportViewer1_RestoreReportDocumentFromCache(object sender, RestoreReportDocumentFromCacheEventArgs e) {
        Stream stream = Page.Session[e.Key] as Stream;
        if(stream != null)
            e.RestoreDocumentFromStream(stream);
    }


    Note that you aren't obliged to save a document to a page's session or cache - you may use any other destination to save a report's document. For example, this code snippet demonstrates how to implement a more complex caching approach to save all documents to a temporary folder on a disk:


        protected void ReportViewer1_CacheReportDocument(object sender, CacheReportDocumentEventArgs e) {
            if(CanCreateFile())
                e.SaveDocumentToFile(FullFileName);
        }
        protected void ReportViewer1_RestoreReportDocumentFromCache(object sender, RestoreReportDocumentFromCacheEventArgs e) {
            if(CanReadFile())
                e.RestoreDocumentFromFile(FullFileName);
            foreach(string fileName in Directory.GetFiles(Helper.GetRelativePath(string.Empty), FileNamePrefix + "*.prnx")) {
                try {
                    string[] dateParts = Path.GetFileNameWithoutExtension(fileName).Replace(FileNamePrefix, string.Empty).Split('_');
                    DateTime date = new DateTime(int.Parse(dateParts[0]), int.Parse(dateParts[1]), int.Parse(dateParts[2]));
                    if(date != DateTime.Today)
                        File.Delete(fileName);
                } catch {
                }
            }
        }
        bool CanCreateFile() {
            try {
                using(File.Open(FullFileName, FileMode.OpenOrCreate, FileAccess.Read, FileShare.None)) { }
            } catch {
                return false;
            }
            return true;
        }
        bool CanReadFile() {
            try {
                using(File.Open(FullFileName, FileMode.Open, FileAccess.Read, FileShare.Read)) { }
            } catch {
                return false;
            }
            return true;
        }


    Of course, these examples are not full, and don't allow you to test them without v2007 vol 3. Please wait until it's officially released, and you'll be ready to implement report caching in the most suitable way.


     

    @.
    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 10/31/2007 11:07 AM In reply to

    • Pat B
    • Top 500 Contributor
    • Joined on 10/24/2007
    • Rochester, NY
    • Posts 47

    Re: Toolbar Paging in a Web Report loses parameters

     Alan,

    I think that's exactly what I was hoping for!  I think I'm in.  I will be reviewing your licensing information and making a purchase soon.

    Thank you for putting up with all my questions!  I do appreciate it.
     

    Pat B
    BCC Software, Inc
    Enterprise Application Developer
  • 11/5/2007 1:31 PM In reply to

    • Pat B
    • Top 500 Contributor
    • Joined on 10/24/2007
    • Rochester, NY
    • Posts 47

    Re: Toolbar Paging in a Web Report loses parameters

    Pat B:

    Alan (Developer Express):
    Unfortunately, only our DXperience subscribers can participate in our 7.3 beta program
     

    So if I purchase it, I can enter the beta?

     

    Alan,

    I have since purchased XtraReports in hopes of the ability to better save the report.  From what I understand version 7.3 will contain the ability to save reports.  Now that I have purchased, can I receive a beta copy of 7.3?

    Thank you.
     

    Pat B
    BCC Software, Inc
    Enterprise Application Developer
  • 11/7/2007 9:31 AM In reply to

    Re: Toolbar Paging in a Web Report loses parameters

    Hello Pat,

    Sorry for not responding for so long. If you still didn't get a beta of v2007.3, please use the following instructions:

    1. Login into the Client Center at https://www.devexpress.com/ClientCenter/default.aspx
    2. Click on "DXperience Enterprise v.7.2.5 released on 18 Oct 2007"
    3. Switch to the Betas tab
    4. Click on the Diskette icon ("Download Now") in the left column

    In case of any difficulty, do not hesitate to contact our Support Team at support@devexpress.com, and they'll certainly help you.

    @.
    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 11/14/2007 7:14 AM In reply to

    • Pat B
    • Top 500 Contributor
    • Joined on 10/24/2007
    • Rochester, NY
    • Posts 47

    Re: Toolbar Paging in a Web Report loses parameters

    Alan (Developer Express):
    3. Switch to the Betas tab
     

    I do not have a betas tab.  I only have "Most Recent Versions" and "Previous Versions" tabs. 

     

    Pat B
    BCC Software, Inc
    Enterprise Application Developer
Page 1 of 2 (19 items) 1 2 Next >
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED