mibuso.com

Microsoft Business Solutions online community
It is currently Mon Oct 20, 2014 1:18 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Opening a Crystal Report from inside Navision
PostPosted: Thu Nov 23, 2006 3:38 pm 
Offline

Joined: Wed Jul 06, 2005 9:56 am
Posts: 88
Location: Thessaloniki
Country: Greece (gr)
Hi all.

I've been searching this forum for so many hours and I can't find the solution to my problem.

I have created a report using Crystal Reports 9. I have saved it as Report1.rpt in c:\

I have a button in a form and in its Push event I want to enter code that displays Report1.rpt.

I do not know what Automation objects to create and how to use them in order to define the filename of the report and display it to the user. (I do not wish to use HYPERLINK!!) I have found some sample code in this forum but no one explicitly mentions what subtype the Automation object is and what class it is.

After I get this right, the next step will be to pass variables to the saved report, in order to filter the data displayed.

Thank you in advance,

Jorgito


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 12:47 pm 
Offline

Joined: Wed Jul 06, 2005 9:56 am
Posts: 88
Location: Thessaloniki
Country: Greece (gr)
I tried the following:

I created a report and used the table Customer as DataItem.

I created 3 variables

CRViewer Automation 'Crystal Report Viewer Control'.CRViewer
CRReport Automation 'Crystal Reports 9 ActiveX Designer Design and Runtime Library'.Report
CRApp Automation 'Crystal Reports 9 ActiveX Designer Design and Runtime Library'.Application

Then I entered the following code:
Code: Select all
Customer - OnPreDataItem()
CREATE(CRApp);
CREATE(CRViewer);

CRReport := OpenReport('C:\My Documents\Report1.rpt', 0);
CRViewer.ReportSource := CRReport;
CRViewer.ViewReport;



When I run it, I get the following error:
Code: Select all
The data type is not supported by C/SIDE. You can access data from any of the following data types: VT_VOID, VT_I2, VT_I4, VT_R4, VT_R8, VT_CY, VT_DATE, VT_BSTR and VT_BOOL.



Any ideas? Should I use OCX instead of Automation objects? If yes, how?

Thanx in advance,
Jorgito


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 2:42 am 
Offline

Joined: Mon Oct 29, 2001 8:01 am
Posts: 1030
Location: Livermore, California
Country: United States (us)
you can use the hyperlink functions to launch the report

here is a link to a discussion on it

http://dynamicsuser.net/forums/thread/3561.aspx

good luck


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 9:44 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 7069
Location: L.I., New York
Country: United States (us)
themave wrote:
you can use the hyperlink functions to launch the report

here is a link to a discussion on it

http://dynamicsuser.net/forums/thread/3561.aspx

good luck


I must have been chatty that day - but the first post says he doesn't want to use Hyperlink. It sounds he already search the forum for "Crystal" :-k

I simply don't have the time to test it right now.

_________________
Harry Ruiz
http://www.BiloBeauty.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 12:20 pm 
Offline

Joined: Wed Jul 06, 2005 9:56 am
Posts: 88
Location: Thessaloniki
Country: Greece (gr)
As Savatage stated, I do not wish to use HYPERLINK, because I want to send parameters to the report in order to filter data.

It seems a little strange that no one has a solution for my problem. You mean that no one has tried to open crystal reports from within navision? Everyone is either using standard navision reports or external (and complicated) mis tools?

What I want to do is create more complicated reports that standard navision reports. If someone has another solution that Crystal, please let me know...

Thanx
Jorgito


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 12:53 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5349
Location: Prague
Country: Czech Republic (cz)
Well going forward the solution is Reporting Services, since that is where all reports in Navision are headed. This of course does not answer your question, since it means running outside Navision also (well maybe in 5.1).

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 7:29 pm 
Offline

Joined: Mon Oct 29, 2001 8:01 am
Posts: 1030
Location: Livermore, California
Country: United States (us)
jorgito wrote:
As Savatage stated, I do not wish to use HYPERLINK, because I want to send parameters to the report in order to filter data.

It seems a little strange that no one has a solution for my problem. You mean that no one has tried to open crystal reports from within navision? Everyone is either using standard navision reports or external (and complicated) mis tools?

What I want to do is create more complicated reports that standard navision reports. If someone has another solution that Crystal, please let me know...

Thanx
Jorgito
here is what we do
1. Make more complicated reports in Navision, and use the Navision tools, not too hard to learn.
2. Make other reports with Crystal and use Hyperlink from Navision, so user can run them without having to know anything.
3. For user that need more complicated thing, I make a Crystal report and show then how to run it on there own.

It seems you want your users to be able to run really complicated reports without having to know anything, and that is tough to do. What I have found is if your users are running really complicated reports but don't even have enough knowledge of how to create them, they probably don't really use the reports anyways. We used to run a whole set of batch reports every night and distribute to all the managers, what a waste of paper that was.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 7:31 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5349
Location: Prague
Country: Czech Republic (cz)
themave wrote:

... We used to run a whole set of batch reports every night and distribute to all the managers, what a waste of paper that was.


How true that is... I am sure we have all had a client like that.

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 1:05 pm 
Offline

Joined: Wed Jul 06, 2005 9:56 am
Posts: 88
Location: Thessaloniki
Country: Greece (gr)
We could debate for days or even weeks on how important or not complicated reports are, or how much knowledge the users should have, but my question remains:

Could you please show me some sample code on how to open a Crystal report using Navision code (Automation objects).

I DO NOT WISH TO USE HYPERLINK!!

Thank you
Jorgito


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 08, 2007 6:27 am 
Offline

Joined: Wed Aug 08, 2007 3:37 am
Posts: 5
Location: Petaling Jaya
Country: Malaysia (my)
the same with jorgito.

Please help us how to Open Crystal Report within Navision (we don't want to use hyperlink). Anyone know how to create objects inside navision using crystal report?

thanks,

archaingels

_________________
God loves us!!!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 08, 2007 7:06 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 7069
Location: L.I., New York
Country: United States (us)
You could always use Shell to :lol:

SHELL('C:\Program Files\Crystal Decisions\Crystal Reports 9\crw32.exe m:\daily\EditList.rpt');

where m:\daily\editlist.rpt is the report name

I think the real question is how do we pass parameters into a Crystal Report from Navision.

NOT - we don't want to use Hyperlink!

I still haven't found the time to try it out.

It seems to me that if you create Parameter fields(Variables) in Crystal and assign them to the fields in the Select Export, then on running the report - the user will be asked to fill in code, texts, dates or whatever.

It's not rocket science. What's the real time savings here?

I guess if you had a customer report and while on the customer card you click a button and the report is run for THAT customer - sounds great!! But using shell or even better hyperlink & parameter fields all the user has to do it type in the customer #.

_________________
Harry Ruiz
http://www.BiloBeauty.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject: veiwing parameters
PostPosted: Thu Mar 20, 2008 4:35 pm 
Offline

Joined: Thu Apr 05, 2007 9:33 pm
Posts: 135
Location: Indianapolis
Country: United States (us)
I am able to pull a crystal report open via navision as suggested in this thread, but my question is, how do you allow the user to use a parameter field.

I am using crystal viewer to open the reports, but it will only let you pull saved data.

does anyone have any suggestions on how to view crystal reports that allows the user to set their own parameters?

_________________
- So it Goes.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 20, 2008 5:25 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 7069
Location: L.I., New York
Country: United States (us)
Does the report have parameter fields instead of set values that need to be filled when the report runs. If so the "Enter Parameter" Dialog box will appear when you try to execute the report so the user can enter their own values. Else you can easily create them and replace the set value with the variable. And since you can make an unlimited amount of reports you can make many similar versions of the same reports with tweaks here & there.

Just an update: I found a better way
http://www.mibuso.com/forum/viewtopic.php?t=23298

If you need help with Creating Parameter fields in Crystal let me know.

_________________
Harry Ruiz
http://www.BiloBeauty.com
http://www.autismspeaks.org


Last edited by Savatage on Thu Mar 20, 2008 5:38 pm, edited 1 time in total.

Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Thu Mar 20, 2008 5:38 pm 
Offline

Joined: Tue Aug 29, 2006 7:29 am
Posts: 610
Location: India
Country: India (in)
we are also trying to open the crystal report from navision.
we also get the same problem of data type.
We arr suscessfully run the crystal report 8.5 from navision as it have ocx control support.
From crystalreport 9 to 2008 there is no ocx control for it.

crystal report above 9 to 2008 can be open through .net but not opened in navision.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 20, 2008 8:33 pm 
Offline

Joined: Thu Apr 05, 2007 9:33 pm
Posts: 135
Location: Indianapolis
Country: United States (us)
ok, maybe i didn't describe my problem correctly :)

I know how to do parameters, its that when you are using crystal viewer, it wont let you use the parameter. I want to let users input parameters, but i dont want to install crystal reports on all their machines, cause i dont want them to have access to the editor, i just want them to use the report and be able to select date ranges.

make more sense?

_________________
- So it Goes.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot], tinoruijs and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: