I have some reports that run well in SQL Server but I want to import them into centricity. How do I do that with crystal reports? Do I need to link crystal reports to the database? Do I need to list all of the columns that the sql query touches?
What am I missing? Thank you!
Edit: So I was able to get a report working. I imported the sql using the command function in Crystal reports (in the database expert) and put those fields in and changed the parameters to match the ones that I changed in the report designer in centricity. That seems to all work but takes some time. This seems like it could take a long time, especially for more complex sql searches. Is there a quicker way to do this?
You have two options, you can use a Crystal Reports Command as you suggested or you can create a view based on the query.
If you put the words
CREATE OR REPLACE VIEW vViewNameGoesHere AS
SELECT * FROM TABLE
Then you can use the view as the source of your query. If you have Crystal report parameters, you have much more flexibility using a view than you do a command. I use a combination of both for our reports.
When you say it would take a long time, do you mean to create the crystal report or to run the query? You could probably use the new report wizard to create a report quickly that had all of the fields you needed after choosing the command or view as your source.
A couple things you should know about Crystal Reports if you are planning on importing them into EMR:
When writing SQL queries, Run your SQL queries as the report user, not the db admin. This is because the reports will be run in EMR as REPORT. (at least in C-EMR). This means that you do not have access to all tables such as those containing passwords. In CEMR there is a view called USRINFO that you would use instead of USR.
If you want your reports to show up in the EMR in Landscape you need to create a formula called mllandscape and leave it blank. Put it in your page header.
Thx for including the tip on the landscape formula!! I write custom reports and a long time ago after one of their updates, our landscape reports stopped working and GE support told me there was no way for me to make it landscape again!
This is a great answer, thank you. The time consumption I was talking about was in creating the crystal report. Specifically putting in all the parameters that are wanted in then report in crystal reports and centricity. Its just a bit of a pain putting the parameters in in two places - crystal reports and the sql statement in centricity.
The view option sounds great, I'll have to look into that since it looks like I don't have those permissions.
Thanks so much for the extra tips too. I was very confused why landscape was not working.
I'm still a little confused on the connection between crystal reports and the sql that is put into the "query" box in report designer, but I'm figuring it out.
As a followup, one issue I have found with landscape is that some print drivers do not work in EMR in landscape mode. For example if I use my HP printer I am able preview and print in landscape mode but if I try to use a Ricoh driver it will only work in Portrait. This is the same for preview and print.
You should not have to put any parameters in Centricity, just crystal reports (it will prompt you when you run it in Centricity for the parameter). I have never used the parameters within Centricity myself and I am not even sure how they work.
I am not sure what your last sentence is referring to. (query box? report designer?) Are you referring to something in Crystal or EMR? Feel free to send me an email with any screenshots on what you are confused on and I will do my best to help.