Is there an equivalent to WhilePrintingRecords in SQL Server Reporting Services

Does anyone know if there is a similar function to WhilePrintingRecords; in SQL Server Reporting services?  If not, how can I force each record to be processes and outputted in SQL Server Reporting Services?
WhilePrintingRecords;
stringvar sBPSysObsName;
 
if (instr(sBPSysObsName,"Sitting") > 0) then 'Sitting'
else if (instr(sBPSysObsName,"Standing") > 0) then 'Standing'
else if (instr(sBPSysObsName, "Supine")  > 0) then 'Lying'
else ''

Open in new window

boydosborneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Smart_ManCommented:
are you using .net app ?
0
boydosborneAuthor Commented:
I am using Visual Studio.net  2000 for building my reports.  I was hoping to use the code section of the report to build something that could process each record, similar to the whileprintinrecords in crystal.  But I am not sure exactly how I could get the function to fire on each record and then within the report populate the necessary objects.  Thanks for your response. Any additional help is greatly appreciated.  Links, tutorials.
0
mlmccCommented:
The WhilePrintingRecords command in Crystal controls when in the report building process the formula is executed.  It  has nothing to do with forcing Crystal to process a record.

mlmcc
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

boydosborneAuthor Commented:
Can you define a variable public outside of a function and set the variable within the functions.  Is there any ramification for doing this?  Then I could use the variables in multiple functions throughout the report.  I believe this is the behavior that I need to mimic in the report.  Thanks for all of your help.
0
chrismcCommented:
You are falling into the classic problem when switching to RS from Crystal. Naturally, you are thinking how you'd do it in Crystal and looking for the equivalent in RS. I did this too initially.

RS works completely differently and you will only lose hair with this approach!

RS doesn't have multiple passes that can be tapped into. Data manipulation in this way should be kept in the query that supplies the data.

Having said that, you're example can be done easily within the cell;

=Switch(InStr(Fields!myField.Value, "Sitting")>0, "Sitting", InStr(Fields!myField.Value, "Standing")>0, "Standing", InStr(Fields!myField.Value, "Supine")>0, "Lying")

Cheers
Chris

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chrismcCommented:
In reply to your "Variable" question.
You can define variables in the VB code behind, but they get wiped out with each SOAP call, which loosely means every time there is a page break.

You can have hidden, internal parameters but these have to be populated at the stage data is retrieved and cannot be manipulated within the layout itself.

With RS it's always better to keep the complexity in the queries themselves - that piece of information took me quite a bit of time and pain to learn!

Cheers
Chris
0
Vee_ModCommented:
Force accepted.
Vee_Mod
Community Support Moderator
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.