Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Report Dies With Addition of a New Field Post Reply Post New Topic
Page  of 2 Next >>
Author Message
PaulyWally
Newbie
Newbie


Joined: 16 Aug 2013
Location: United States
Online Status: Offline
Posts: 12
Quote PaulyWally Replybullet Topic: Report Dies With Addition of a New Field
     Posted: 20 Aug 2013 at 6:50am
I am working on an existing (and large) report. It gets launched from a web app. I added a Stored Procedure in the database fields. The report runs fine with that addition. However, once I actually place one of the SP fields onto the report and try to launch it from the web app, the report dies without showing anything (no data, no headers, no labels... nothing).

Any ideas where I should be looking for the problem?






** Additional Info **

The Stored Procedure only has one parameter (that accepts a NULL), and I've tried every conceivable input for it.

We have many reports that were put together very similarly. They each have several CR Commands that bring the data in. Those Commands have links set up that bind the data between them. Most of the reports are also calling a Stored Procedure, which fills some report text fields. But the it is not repeated record data. These text fields are basically column headers for the data records.

In the reports that have this Stored Procedure, there are no links between the SP and any other data source. And there are no problems running those reports.

The report I'm working on does not have this SP. I would like to add it in order to maintain conformity across all our reports.

Currently, this particular report is bringing in those "column headers" via another CR Command.

Edited by PaulyWally - 20 Aug 2013 at 6:53am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Aug 2013 at 7:01am
In general Crystal does not automatically enforce joins (or a cross join) when you add tables or stored procs to the report.
It will enforce the joins (or a cross join if you do not link the tables/sp) as soon as you use a field from both tables.
For example if you add 2 tables (A and B) to your report, you do not join them and each table as 10 rows of data.
If you use only 1 field from table A and none form table B you will get 10 rows of data in your report. As soon as you use any field from table B your cross join gets enforced and your data set will jump to 100.
With really large reports (especially with cross joins) you report can appear to stop working when you adda  field to the report because the data set just jumped into millions of records.
IP IP Logged
PaulyWally
Newbie
Newbie


Joined: 16 Aug 2013
Location: United States
Online Status: Offline
Posts: 12
Quote PaulyWally Replybullet Posted: 20 Aug 2013 at 7:48am
Originally posted by DBlank

With really large reports (especially with cross joins) you report can appear to stop working when you adda  field to the report because the data set just jumped into millions of records.


OK. That would make sense if that's what's going on.

So since I have some other reports where this is working, do you have an idea of where I can look to find out where my report is not setup like the others?

Thanks!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Aug 2013 at 7:53am

go into the Database and Database expert and look to see if the stored proc is joined to another source in the report.

IP IP Logged
PaulyWally
Newbie
Newbie


Joined: 16 Aug 2013
Location: United States
Online Status: Offline
Posts: 12
Quote PaulyWally Replybullet Posted: 20 Aug 2013 at 8:10am
It is not. Sorry. That is what I was trying (or failing) to explain in my first post. That SP has no links or joins in Database Expert, in any of the reports (working or not).

Edited by PaulyWally - 20 Aug 2013 at 8:10am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Aug 2013 at 8:11am
What is the purpose of the sp?
IP IP Logged
PaulyWally
Newbie
Newbie


Joined: 16 Aug 2013
Location: United States
Online Status: Offline
Posts: 12
Quote PaulyWally Replybullet Posted: 20 Aug 2013 at 8:29am
The web app is a database. And it has a customization feature that allows the user to rename GUI field labels in order to resemble their own verbage. For example:

Let's take the "Customer" form. There are 3 fields -
"First Name"
"Middle Name"
"Last Name"

Most users will leave it that way, and be happy. But some users might come along and would prefer:

"First Name"
"Middle Name"
"Surname"

The application allows them to change the "Last Name" field label to "Surname" (or whatever else they want). It doesn't change anything in the backend. Just what the user sees.

The Stored Procedure is used by the programmers so the field labels are reflected across every piece of the application. So when we put together a report (for example), we pull the label information from the SP, and the user will get their custom labels on the report.


In the report I'm having issues with, the field labels were hard-coded. So if a user makes those changes, they won't be reflected on the report. But there are other reports that are pulling and displaying data from the SP just fine.

Edited by PaulyWally - 20 Aug 2013 at 8:34am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Aug 2013 at 8:41am
is the stored proc returning multiple rows of data or one row of data with a lot of columns?
If it is multiple rows (based on user selection) my worry would be that the other reports appear to work thay are actually changing your data set.
One quick and dirty test is to add a count (not a distinct count) of any field that you knwo is on each row (like a client id). Add that to the report header. Now rerun the report changing the label on 2 fields and see if your value jumps in that count.
run the report and look
IP IP Logged
PaulyWally
Newbie
Newbie


Joined: 16 Aug 2013
Location: United States
Online Status: Offline
Posts: 12
Quote PaulyWally Replybullet Posted: 20 Aug 2013 at 8:53am
It is only returning one record.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Aug 2013 at 8:57am

hmmm.

are you using the same conection to the same DB?
IP IP Logged
Page  of 2 Next >>
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum