Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I hide data when it's crucial to data in RF? 1

Status
Not open for further replies.

glthornton

Programmer
Oct 19, 2005
108
US
Hi Everyone,

System: CR XI on Win XP Pro accessing data in an SQL DB.

Take a look at the PDF document that I put together first and then I'll explain:


As you can see in my final result which is the report on the bottom of the page. I am trying to put together a handful of reports to indicate data that would be passed up from subreports. The problem that I'm having is that the data that I'm using in my subreports needs to be hidden. But because I'm using variables all over the place, it requires that the data be "displayed" or "present" in order to be used within other computations. I have tried both the "Hide" and "Supress" functions, but both end up with the wrong results.

There are 3 colums that I'm trying to show for each question on the Main Report. First box is the total number of diabetic patients, Second indicates the number of patients that are managed by a Diabetic Counselor, Third indicates the % of patients being managed by a Diabetic Counselor (based on total population).

I do not have access to creating any stored procedures on the SQL server, so that option is out of the question. Does anyone have any ideas how I can get this to work? Please let me know if you require any further information.

Thanks,
glthornton
 
You should be able to suppress subreport sections and still get the correct subreport results. You just can't suppress the main report section in which the subreport is located.

-LB
 
Hey LB,

You're absolutely correct. When I try to "hide" the subreport headers, the data from the report footer does show. BUT the data is wrong because my values are showing up as zero (0). Like I had mentioned before, that my report depends upon the data from the Group Header area. Could what is happening be caused with the additional subreport that I am using in the Group Header?

Thanks,
glthornton
 
All you need to do is place the subreport in the main report where you want the subreport summary fields to appear and suppress all sections within the subreport except the section containing the summaries. Hiding and/or suppressing variables within the subreport will not affect the computations.

I think your reset formula is not where it should be, but then I don't know what your intent is. If you reset after the calculations you want to display, but before the report footer, the results would be zero. Please show the contents of each formula, including the reset formula, and explain how the subreport is linked to the main report, if linked.

-LB
 
Hey LB,

On my Main Report, there is no linking at all. I am just displaying the results from these subreports as a whole. I will be referring to my document (SubReport-Preview section), for the formula info that you asked for:

Running Total Fields:
- Tot PT Count (currently showing 232)
Fld Summarize: PatID
Type: Distinct Count
Evaluate: For Each Record
Reset: Never

Formula Fields:
- Total DSME Count (currently showing 92)
Whileprintingrecords;
NumberVar TotDSMECnt;
TotDSMECnt;

- % Pts DSME
Whileprintingrecords;
If {#Tot PT Count}<>0
then {@Tot DSME Count}%{#Tot PT Count};

- Tot DSME Count
IF {@PTID Incoming Parm} <> 0
THEN NumberVar DSMECnt:= DSMECnt+1;
NumberVar TotDSMECnt:=DSMECnt;

- ResetVariables
Whileprintingrecords;
shared NumberVar PTID:=0;

- InitializeVariables
NumberVar DSMECnt:=0;
NumberVar TotDSMECnt:=0;

- PTID Incoming Parm
whileprintingrecords;
shared NumberVar PTID;
PTID;

- ObsDate
CDate({LabResultsOBX.DateTimeOfObservation})

I moved my ResetVariables formula to the Group Footer and it still works fine (when I do not hide/supress the Group Header section). And my 'Total DSME Count' and '% Pts DSME' formulas change to zero (0) when I do hide/supress.

I've seen weird things happen sometimes within CR reports before and this just may be another occurance. I've designed reports before and if something gets out of alignment somehow, the report is useless. So I redo the same report over, using the exact same formulas and layout and then it works just fine. Any thoughts?

Thank you,
glthornton
 
Do you have a subreport within your subreport? Because a nested subreport will not execute. It will work when you preview the subreport, but not when you then run the main report.

-LB
 
Shazam!!!

LB, that's exactly it!! I do have nested subreports and that explains why this won't work. Now that I know this, I'll need to see if I can redesign my report to get the same data. Thanks for all your help!!!

glthornton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top