Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8301015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:46:44+00:00 2026-06-08T16:46:44+00:00

Ive got a database right now with one username that the front (delphi 5)

  • 0

Ive got a database right now with one username that the front (delphi 5) end connects to.
we call reports using the following:

with tcrpe.create(self) do
    try
      report_name := 'CrystalLotRecapSummary.rpt';
      if fileexists(dmposting.tws_drive+'\tws\special\'+report_name) then
        ReportName := dmposting.tws_drive+'\tws\special\'+Report_Name
      else
        ReportName := dmposting.tws_drive+'\tws\reports\harvest\'+Report_Name;
      WindowButtonBar.PrintSetupBtn := true;
      Paramfields.retrieve;
      ParamFields[0].Value := cmbCropYear.text;  // IN OLD REPORT
      ParamFields[1].Value := 'ALL';
      ParamFields[2].Value := real_to_str(unitfactor,0);  // IN OLD REPORT
      ParamFields[3].Value := cmbUnit.text; // IN OLD REPORT
      ConnectMethod := useConnect;
      Connect.Retrieve;
      Connect.Password := 'PASSWORD';
      Output := toWindow;
      Execute;
    finally
      CloseJob;
    end;
end; // PRINT SUMMARY BY WAREHOUSE

This works just fine. the problem is that we are now about to have 2 schemas (sysdba and sysdba2).

right now the crystal reports query looks like:

SELECT
LOT_RECAP."GROWING_YEAR", LOT_RECAP."GREEN", LOT_RECAP."ADJUSTED", LOT_RECAP."SHIPPED",
LOT_RECAP."WAREHOUSE_ID", LOT_RECAP."REMAINING", LOT_RECAP."LOT_ID",
LOT_RECAP."FINISH_DRYING", LOT_RECAP."NAME", LOT_RECAP."STATUS",
LOT_RECAP."COMMODITY_ID",
LOT_RECAP."VARIETY_ID", LOT_RECAP."PRODUCER_ID", LOT_RECAP."LR_AVMOISTURE",
LOT_RECAP."PROJECTED", LOT_RECAP."NOTE", LOT_RECAP."MASTER_ID",
LOT_RECAP."VARIETY_TYPE",
LOT_RECAP."CROP", LOT_RECAP."STORAGE_ONLY"
FROM
"SYSDBA"."LOT_RECAP" LOT_RECAP
WHERE
LOT_RECAP."GROWING_YEAR" = 2009 AND
LOT_RECAP."COMMODITY_ID" = 'RICE' AND
LOT_RECAP."STORAGE_ONLY" = 'FALSE'
ORDER BY
LOT_RECAP."LOT_ID" ASC

I need to figure out some way to have the report to decide if the userid is sysdba then the table is sysdba.lot_recap, and if the userid is sysdba2 then the table name is sysdba2.lot_recap. BTW, Ive got to do this for about 300 reports. Any help would be greatly appreciated. If i didnt provide enough info please let me know

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T16:46:46+00:00Added an answer on June 8, 2026 at 4:46 pm

    Ok issue was finally figured out. By going into the report itself and then going to Set Location. If i remove the schema name from the location Crystal reports will let me assign the schema name dynamically based on the username i sign in with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a MySQL database that stores image information. Right now it only has
I'm new to Twig and like it, but i've got one problem right now.
I've got one Posgresql database (I'm the owner) and I'd like to drop it
Right now I'm developing the prototype of a web application that aggregates large number
I've got confused at the moment. I've got one database to developed for MLM
I've got a list of objects that I want to delete from the database.
I've got a database filled up with doubles like the following one: 1.60000000000000000000000000000000000e+01 Does
Hey, I've got a bit of a problem right now trying to figure out
I've got a class I wrote to work with the front end (web browser
I've got an existing site I'm taking over, and right now it stores, in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.