Simultaneous Crystal Report Generation - how to distribute and generate dynamic crystal reports while multiple users are logged on.

Posted on 2004-10-29
Last Modified: 2008-03-06
Hi all, I'm a co-op student working in Toronto and I've taken over the old co-op student's web app project.

The app gathers a bunch of data through layers of pages and what not, then, once data entry is complete the user can print a report summarizing and charting the info.  The current system works fine - when only ONE user is trying to print a report - but when a user tries to print the same report while another report is being generated it will error or the report will be mixed data.

I'm trying to figure out the best way to isolate the users sessions so this doesn't happen.  Additionally, the user will need to be provided raw Access files (the database is oledb) of their data as well....this part I need to write from scratch.

What's the best method to solve this dilemma?

I was thinking of creating a folder per user whlie they are logged in and keeping all their session files in that, kinda like a shopping cart...but I have never tried something like this, and there must be a tried and tested method that you guys can enlighten me with.  The site traffic will not be very large so the memory is not a huge issue, but a robust scalable solution is preferable.

Thanks guys.
Question by:NateDizzle
    LVL 17

    Expert Comment

    Ok so there about 8 questions in there, lol

    1) if the crystal reports are getting mixed up then theres a problem with that routine
    2) If you correctly authenticate your user, this should help
    3) When they download the .mdb do they get the whole site, or does each user have his/her own .mdb

    basically if you correct the existing design problems all should be well, but I would rethink the download.mdb bit.
    I know your gonna have about a billion other questions, so I'll leave it at this for now and wait for your rebuttle.

    LVL 17

    Expert Comment

    this is a function to create a .mdb on the fly for you:

    Public Function CreateAccessDatabase( _
        ByVal DatabaseFullPath As String) As Boolean
            Dim bAns As Boolean
            Dim cat As New ADOX.Catalog()

             'Make sure the folder
             'provided in the path exists. If file name w/o path
             'is  specified,  the database will be created in your
             'application folder.

                Dim sCreateString As String
                sCreateString = _
                  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _

                bAns = True

            Catch Excep As System.Runtime.InteropServices.COMException
                bAns = False
                'do whatever else you need to do here, log,
                'msgbox etc.
                cat = Nothing
            End Try
            Return bAns
        End Function
    '      If CreateAccessDatabase("F:\test.mdb") = True Then
    '           MsgBox("Database Created")
    '      Else
    '           MsgBox("Database Creation Failed")
    '      End If

    Author Comment

    Aeros Saga:

    The users need unique, filtered databases.  i.e. a standard query will grab the data that they need and then put it into the newly created database file for them.

    Do you have any good links for accomplishing the user authentication bit?  As of right now the authentication is strictly a database check of the username and password.  Authentication is set to "windows" but anonymous access is still checked.  I can log on as many times as I want from a number of different machines under the same login.

    LVL 17

    Accepted Solution

    LVL 17

    Expert Comment

    The users need unique, filtered databases.  i.e. a standard query will grab the data that they need and then put it into the newly created database file for them.

    No they don't they need a correctly setup real RDMS such as sql server.  Not the hacked access approach that you so unfortunately inherited.

    Author Comment

    Tell me about it.  Thanks for the links that you provided.
    LVL 17

    Expert Comment

    Your very welcome


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    6 Experts available now in Live!

    Get 1:1 Help Now