Solved

how to update a Crystal Report connected to variant num of columns

Posted on 2001-07-08
7
227 Views
Last Modified: 2009-07-29
I trying to add a Crystal Report to my project and to connect this report to a table that has changeable number of columns , Do I have to add this table in a special way and How can I update this report in the run time
0
Comment
Question by:Viki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Expert Comment

by:andysalih
ID: 6263934
try this

'Create Temp StorageDim strSelect As String'Create Report instance
Dim Report As New UIBenSummrpt 'Set Mouse Pointer to busy
Screen.MousePointer = vbHourGlass'Set Crystal Reports smartviewer source
'     to reportCRViewer1.ReportSource = Report 'Reset Reports selection criteria
Report.RecordSelectionFormula = "" 'Create a string for selection criteria
strSelect = "{ado.Client}= '" & strClient & "' AND " & "{ado.Year}= '" & strYear & "'"
'Set Report's selection criteriaReport.RecordSelectionFormula = strSelect
'Display ReportCRViewer1.ViewReport 'Reset the mouse pointer icon
Screen.MousePointer = vbDefault

hope this helps
andy
0
 
LVL 3

Accepted Solution

by:
andysalih earned 100 total points
ID: 6263939
or this

'Add the crystal ocx object to form (wil'     l be named CrystalReport1)
' you can pass record selection''NOTE''Create the report in Crystal first and
'     place the report in the same directory a'     s your database.
'' Set the report location to same as da'     tabase in Crystal
''This part is run from menu or command '     button
CrystalReport1.ReportSource = crptReport
CrystalReport1.ReportFileName = reportpath & "\YOUR_REPORT_NAME.rpt"
'***This line only is using single recor'     d selection
CrystalReport1.ReplaceSelectionFormula ("{TABLENAME.FIELDNAME} =" & "'" & v_choice & "'")
'*********CrystalReport1.WindowState = crptMaximizedCrystalReport1.PrintReport
CrystalReport1.PageZoom (50)          

hope you can build of these

cheers

Andy
0
 
LVL 3

Expert Comment

by:andysalih
ID: 6263943
have a look at the following link, i dont know if thats something which you could use to build off

http://www.planetsourcecode.com/xq/ASP/txtCodeId.4992/lngWId.1/qx/vb/scripts/ShowCode.htm

hope this helps
Andy
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:Viki
ID: 6264072
let me make it clearer.
let say i have 3 field objects on a report.
then on runtime i wanna  add more fields objects to represent other new columns.
how do i add those objects?
i think it's equivalent to "createobject (textbox) " 
or loading a new textbox in array in VB.



0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7148211
Hi Viki,
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 andysalih's comment(s) as an answer.

Viki, 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.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

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

Computer101
E-E Moderator
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

729 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