Solved

Creating Dynamic reports with segate crystal report 8.5

Posted on 2002-07-18
13
400 Views
Last Modified: 2012-06-21
Hi all,

My application has reporting feature and i have been showing predefined reports using crystal report 8.5. Now we want to give the user the option to create his own custom defined reports, dynamically and see them . I'm entirely new to dynamic reports.

Please guide me how to start and create the dynamic reports. Do i need any license or something like that.

Thanks

anamika
0
Comment
Question by:anu1977
13 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 7162176
yes, you will need a license:

Licensing

Your Crystal Reports Developer Edition contains new features which provide a great deal more flexibility and power for developers to embed reporting in their applications. The most significant of these is the addition of Report Creation APIs to the Crystal Reports Runtime. These allow the developer to create and save new reports, edit and layout reports and more, all at runtime. In effect, developers can now create a custom report writer based on the power of Crystal Reports.

These runtime report creation features may only be used and distributed if the appropriate licensing is obtained by paying the required royalty fees.  Please contact Seagate Software or visit www.seagatesoftware.com/products/crystalreports  for more details on report creation royalties.   Below is a specific list of files and API calls that are covered by this restriction.

You should also refer to the license agreement for other restrictions regarding this redistribution of files including competitive products, server-based software and report distribution systems.

For existing users of Crystal Reports Professional (any version earlier than Version 8) please note that your range of rights for report design as well as for runtime distribution of client applications have not changed, so upgrading client applications will still be royalty free. Only when you take advantage of the new report creation features below will a royalty be required.

Runtime files:

CRAXDRT.DLL
CRYSTALWIZARD.DLL

check out <crystal root>\Developer Files\Help\Royalty Required Runtime.hlp and click on
"Runtime file use restrictions"
0
 

Author Comment

by:anu1977
ID: 7181791
can you please give me some more info about where to search for this. The related links to the dynamic report generation requirement in segatesoftware site??
0
 

Author Comment

by:anu1977
ID: 7184968
Can you please let me know from where i can get help fpr the RC API calls and how to start , do anyone has any sample for this
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:anu1977
ID: 7184986
I could generate a dynamic report from the Crystal report wizard but if i want to give the facility of puttings fields and text boxes at run time in the report viewer , how do i go about it??
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 7185341
myRpt.Sections("whatever section").AddTextObject (<Field>, <left> as long, <top> as long)

myRpt.Sections("whatever section").AddFieldObject (<ptext> As string, <left> as long, <top> as long, [formatText])

again, this will require additional licensing fees.

also, i'd suggest getting the crystal RDC Browser, which shows all the objects and methods available to you in the CRAXDRT library.
0
 

Author Comment

by:anu1977
ID: 7189655
Hi bobbit, i'm new to dynamic reports and just starting . What i ahve seen in applications giving dynamic report facility, the user sees the viewer and drags and drops the controls that he wants to be visible in the report and then he can save it as a template. So that in future he can use that. Is it possible to provide this functionality?? The code you have written above shows that u first take the input from user in a form and then programmatically generate the report. But can i give the user this facility to drag and drop the controls into the viewer while viewing an existing report.

What API calls do i need for this . Do i need RC API calls?? Do i need to give any specific dll in my project referrence to use those API calls. I have installed the Segate Crystal report 8.5 on my Machine but didn't find any help on these API calls. Please guide me

Thanks
anamika
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 7190741
i've never done this... but i'm think you should be able to do something like:

Dim myApp As CRAXDRT.Application
Dim myRpt As CRAXDRT.Report

Private Sub Form_Load()

Set myApp = New CRAXDRT.Application
Set myRpt = myApp.OpenReport("C:\my documents\rptTest.rpt")
CRViewer1.ReportSource = myRpt
CRViewer1.ViewReport

End Sub

Private Sub CRViewer1_DragDrop(Source As Control, x As Single, y As Single)

    myRpt.Sections(1).AddTextObject Source.Caption, 10, 10

End Sub

Private Sub Form_Unload(Cancel As Integer)

Set myRpt = Nothing
Set myApp = Nothing

End Sub

for example, place a label on your form, and set it's drag mode to automatic... then drag it on the report.

obviously this is just an example, there will probably be a TON of code to make what you are trying to do as robust as you need it to be.

anyway, good luck!
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 100 total points
ID: 7190742
oh and this, myRpt.Sections(1).AddTextObject Source.Caption, 10, 10
 should be myRpt.Sections(1).AddTextObject Source.Caption, x, y
0
 

Author Comment

by:anu1977
ID: 7195233
Hi bobbit,

i actually wanted an interface where user can create his own custom reports like giving a report designer facily , and now i came across the embeded crystal report designer adn it solved my purpose.

I would like to get one help in this embeded designer. This designer has its own toolbar showing a option to save the report that user creates and cliecking on that it opens the file open dialog box. But i want to create my own save button and restrict the user to save new reports only in my application folder where the database exists. So what i did i was hiding the toolbar but user can do a right click and get this .I was implementing my own save button as
If Len(Trim(fileName)) > 0 Then
        CRDesignerCtrl1.SaveReport fileName
End If

how can i trap the save feature of embeded report or is there anyway i can hide this from the toolbar but show rest all features in the toolbar.

Thanks
anamika
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 7196561
is the embedded designer new in 8.5? i use crystal 8.0 and i don't see the embedded report designer control in my vb components.
0
 

Author Comment

by:anu1977
ID: 7197784
no i don't think so, just go to the help section and chk. for embeded reports , i think this should be available in Crystal report 8.0
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8013985
Hi anu1977,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept bobbit31's comment(s) as an answer.

anu1977, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8096075
Comment from expert accepted as answer

Computer101
E-E Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question