Solved

Problem with Refresh button on Crystal subreport hits database despite...

Posted on 2007-11-25
6
1,087 Views
Last Modified: 2010-04-21
We have a mainj report that passes a filter to a subreport, and the problem currently is that when the user clicks the refresh button, it queries the database.  We don't want this. We have the Process options for scheduling set to 'refresh hit database' attribute = false.  This was configured by unchecking the 'report returns current data' box, and 'clients share'.  The report currently uses its Teradata connection and recordset through a command saved to the repository.

This has become a major problem, and we can't seem to find the recipe to stop the refresh button from hitting the database.  Any help appreciated, and I will gladly send files and code.
Report Options:  Save Data with report, unticked verify on first

Options:  unticked verify on first

Schedule  unticked 'returns current data' and 'clients share'.

Subreport passed parameter to conditional suppression in latest version, though we tried filtering via record selection as well.
 

We have not yet tried repository BV connections, though that may be a next desparate step.

Open in new window

0
Comment
Question by:billinb
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:joshnuitari
ID: 20348102
Hey billinb,

I am just wondering a few things about your crystal reports issue.  Are you using Crystal itself to run the reports, or are you using a .net / Java / language of choice program to run these reports?  

If you are using something like .net, I have run across this myself.  What I did to fix this, was I supplied a Dataset to the Crystal Report and therefore did not need to requery data for subreports etc.  You can also do this by passing in an XML File into the report with a schema as well, but if you are just using crystal itself, AFAIK, it will always requery the DBMS to get the data.  

Let me know a little more about your solution so I can help.  

Josh
0
 
LVL 1

Author Comment

by:billinb
ID: 20348751
Hi Josh, thanks for your reply.

Actually I'm not using .net, but had started to realize before looking at your response that I need the main report bound to some sort of disconnected dataset.  I used Select User() in the Command to get started, the next step I presume will be to create an xml file that can be used for the data source.

There are three geographical, hierarchical fields in addition to the date parameters that need to get passed up from a (newly created) subreport to Shared scope variables, and back to the 2nd Subreport with the information to be linked according to the Login ID of the end-user.

Am I going to have to set the switch to attach and re-link the subreport upon opening of the main report, I wonder?
<?xml version="1.0" encoding="utf-8"?>

<root>

  <Admin LoginFor="Administrator">

    <logged>Administrator</logged>

  </Admin>

</root>
 

-----------------------
 

<?xml version="1.0" encoding="utf-8"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="root">

    <xs:complexType>

      <xs:sequence>

        <xs:element name="Admin">

          <xs:complexType>

            <xs:sequence>

              <xs:element name="logged" type="xs:string" />

            </xs:sequence>

            <xs:attribute name="LoginFor" type="xs:string" use="required" />

          </xs:complexType>

        </xs:element>

      </xs:sequence>

    </xs:complexType>

  </xs:element>

</xs:schema>

Open in new window

0
 
LVL 1

Author Comment

by:billinb
ID: 20348975
Why is it looking for a local xml file and not the file on the CMS server?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:billinb
ID: 20349691
(Ignore the previous post -- I forgot to untick '..always prompt...'

Now the problem is that the rpt can't  grab a connection when scheduled.  I have a Business view with Elements for Both subreports.  

I think I might have to give the '... attach subreport on open ... ' option a try, as a desparate attempt.

It works fine from Crystal Reports running locally, the problem appears to arise when scheduled.

Bill
 Status: Failed  

  Printer: The instance is not printed.  

  External Destination: None  

  Data Refresh Settings:  Use the server defaults.  

  Start Time: 11/26/07 5:30:41 AM  

  End Time: 11/26/07 5:30:46 AM  

  Server Used: Our.reportjobserver  

 

 Error Message: Failed to open the connection......rpt etc etc. 

Open in new window

0
 
LVL 1

Accepted Solution

by:
joshnuitari earned 500 total points
ID: 20353591
You might need to reconnect the sub report, but most likely not.  

What I do for report development is this...  

I create the report while physically connected to the Database, I then create a XML Schema of the Data I need and I use that one Data source for the main report and all sub reports.  The linking should automatically stay in tact as long as the column names remain the same and keys are respected in the schema.  

As for the XML Error above I do not know, I have always supplied a DataSet to the report through the CrystalReports API.  What language are you using for this report, or is it stand alone and not in Java/C#/VB/whatever?
0
 
LVL 1

Author Closing Comment

by:billinb
ID: 31410897
I see now -- what you do is create a disconnected dataset for all of the reports, including subreports.  Then you presumably open to this disconnected set.  Am I correct so far?  You schedule the subreports to be run?  The main report must then attach to the subreports on open?  It sounds like the right path to be on, at any rate.  I had created an xml file with just one field, for the main report, thinking that would need be the only disconnected set.  Am I understanding correctly?
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

13 Experts available now in Live!

Get 1:1 Help Now