Results 1 to 5 of 5

Thread: CR XIR2 Save Data without Saving Change of Database Location

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    7

    Question CR XIR2 Save Data without Saving Change of Database Location

    I have an app which allows users to select different predifined data sources for some crystal reports (XI R2) one of which is the connection saved on the report. I can change between the datasources without too much problem e.g.
    Code:
    .Database.Tables(i).SetLogOnInfo ...
    .Database.LogOnServerEx ...
    However, if a user changes the database connection to be used and then saves the report (so that the data is saved on the report), the original report connection is overwritten and is therefore not available to the next user.

    Does anyone know of either -
    A method to change the database being used to return the data without altering the reports Log On details,
    Or,
    A way of only saving the data on the report without saving any other changes to it?

    Both seem unlikely, but there's no harm in asking...

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: CR XIR2 Save Data without Saving Change of Database Location

    I Don't use more than one datasource but can't you reset the connection after each time the report is ran. Also if the user can select a datasource, why isn't the original datasource one of the choices?

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    7

    Re: CR XIR2 Save Data without Saving Change of Database Location

    The problem i've got is that if the user save's the report, which i am allowing them to do so that the data can be saved on the report, if they have selected a different datasource, this overwrites the original report connection. Therefore, if the next user opens the report and decides they will use the datasource on the report, this datasource has actually been changed be the last user in there.

    I could save the original datasource details when report is open, and then change the datasource back to this after the user has saved, but this will only work when the report connection uses intergrated security (the Provider will always be SQLServer) as the Password property of the .Tables(i).ConnectionProperties is a Write Only property so i can't read it when the report opens in order to write it back later

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    7

    Re: CR XIR2 Save Data without Saving Change of Database Location

    I've run out of time on this one so i'm just going to change the logic of the app so that the datasource must be selected before the report is opened (loaded into the application) and cannot be changed whilst the report is open.

    Not ideal, but it solves the problem. thanks for looking at this wes4dbt.

  5. #5
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: CR XIR2 Save Data without Saving Change of Database Location

    If you decide to research the problem further, the SAP forums have a lot of experts. http://forums.sdn.sap.com/search.jsp...ource&objID=c1

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width