Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




**RESOLVED**Crystal Reports / Make Subreport Flow From Page To Page


I have a Crystal Report with a number of subreports. One of the details sections of the main report includes a subreport. I would like it if when I ran the report, it would allow the subreport to be split within several pages. Currently, the subreport shows up on page 2. I would like it to be split between pages one and two.

This is what makes this problem interesting. The subreport exists in the Details d section of the main report. Details d is not checked as Keep Together or New Page Before. The details section before Details d (Details c) is not checked for New Page After. If you go into edit subrebort for Details d, the Report Header has New Page Before checked off, but it is disabled (I can't change it).

How do I make this subreport flow across pages? Why is the Report Header section of my subreport checked for New Page Before but does not allow me to uncheck?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Crystal Reports - Cross Tab - Forcing Virtual Page On Every Page
I have created a crystal report which contains multiple detail sections (Da-Di). Each detail section contains a subreport, which contains a cross-tab.

I have done this because I need to create one excel spreadsheet which contains data from different types of cross tabs.

For example, one cross tab lists accounts and totals, the second lists accounts and totals by cost centre (17 of these), and a third lists accounts and totals by product group (11 of these).

I have lined up all the columns perfectly, and when I export to Excel (Data only), it works perfectly, and I get all the rows and columns of all the cross-tabs in one excel worksheet. Brilliant.

However, when I print, preview or export to pdf, I only see the "real" page and do not see any virtual pages that are shown in each of the sub-reports.

How can I print or view this from the main report and get the virtual pages as well, without stuffing up my export to excel?

Any suggestions would be greatly appreciated.

Crystal SubReport Page Size Problem
Hi,
i have placed 3 subreports in my main report. when any of these reports exceed than the size of page i found an error msg "Page size was not large enough to format the content of an object in the report". i want that my subreports contiously move to next pages. My second question is that is it possible to show my sub report on next page same as we can show every group on its on page.

thanks

Crystal 8.5 Subreport In Page Footer Disappears
Hi,

I am using VB6 to create a Crystal Report and then attach a subreport to the Page Footer section to display the criteria that are used for this report.

All works well with the following code, apart from the fact that as soon as I use the NewPageBefore command in order to get the footer to print on a seperate page, the subreport disappears! Any suggestions??

Dim crApp As New CRAXDRT.Application
Dim crRep As CRAXDRT.Report
Dim crDB As CRAXDRT.Database
Dim crTables As CRAXDRT.DatabaseTables
Dim crTable As CRAXDRT.DatabaseTable
Dim crSections As CRAXDRT.Sections
Dim crSection As CRAXDRT.Section
Dim crRepObjects As CRAXDRT.ReportObjects
Dim crSubRepObject As CRAXDRT.SubreportObject
Dim crSubReport As CRAXDRT.Report


    crRep.Areas("RF").HideForDrillDown = False
    Set crSections = crRep.Areas("RF").Sections
    Set crSection = crSections.Add("Criteria") 'Adding a new section to the report footer
    
    crSection.PrintAtBottomOfPage = True

    crSection.NewPageBefore = True 'If I leave this line out all is fine!
    
    Set crSubRepObject = crSection.ImportSubreport(strPath, 0, 0)
    Set crSubReport = crSubRepObject.OpenSubreport
    
    'Set the datasource properties
    Set crDB = crSubReport.Database
    Set crTables = crDB.Tables
    Set crTable = crTables.Item(1)
    crTable.SetPrivateData 3, rsSubRepRecords


 

Crystal Reports - Page N Of M
I am using Crystal Reports 4.6 which shipps with VB5. I can place a "Page N" function on a report but cannot seem to get the total pages calculation (Page N of M) .. how can this be done?

Thankyou in advance, Bob.

Crystal Reports New Page Grouping
How do I make Crystal report start each new group on a new page. I am creating a report that groups by name. But I only want one name per page

Crystal Reports Groups New Page
How do I make Crystal report start each new group on a new page. I am creating a report that groups by name. But I only want one name per page

Crystal Reports: Keep Data On 1 Page
I have a crystal report but I need to show all the data on 1 page. Sometimes you don't know how many records you're going to get but you have a good idea. Sometimes you get a few extra records and its pushes over to the next page. Is there maybe someway that I can 'shrink' the data? The problem is that the report looses it's impact and is more difficult to read if it is on 2 pages. Some advice or a shove in the right direction will be much appreciated.

Page Up & Down Keys In VB With Crystal Reports
I am developing in Visual Basic 6, with CRviewer9 object, Crystal Reports 9, but when the application displays the report page I can not change page with page up & down keys, and neither does not work the key preview.

Visual Basic 6
CRviewer9 object
Crystal Reports 9

Crystal Reports Page Layout
not sure if the subject is the best description, but does anyone know if crystal reports can print out records 3x3 on a page? for example, we have a list of stores, and we want to print out the address info for each of these stores, so that it displays 9 stores on each page, like this:


Code:
--------------------
| | | |
| ---- | ---- | ---- |
| | | |
| | | |
| ---- | ---- | ---- |
| | | |
--------------------


i know that you can do it in Access, so it must be possible with crystal.

Page Columns In Crystal Reports Is It Possible??
since i didn't get any replies from my previous post regarding page columns in Data Reports.... see here

i am wondering if it is possible to put page columns in Crystal Reports

Attached is the format

Thanks in advance!


Joy

Page Count In Crystal Reports
I am using Crystal Reports with VB. CRViewer control is used. I want to know the number of pages so that I can disable the Next and previous buttons on my tool bar. The standard tool bar which comes with CRViewer will do it automatically. But I am using my own tool bar and want to disable the Next and Prev buttons as per the page count.

Can you pls give a suggestion on how to get the page count?.

Thanks & Regards

Ravi

Crystal Reports : Page Total In Sub-Reports
I have Main-Report like this
The columns 1-3 are Sub-Report(1), Column 4 is Sub-Report(2) and Column 5 is field of Main Report only.

-------------------------------------------------------
 (1)......(2).........(3)............(4)............(5)
Sl.No. Name Gross(Nov) Gross(Oct) Difference
-------------------------------------------------------
1........Mary........2300.......2200......

2........John........1500.......1400......

3........Jim.........1000.......1200......

4........Mike........3000.......3200......

.. ..... .... ....


10.......Rosy.......4000.......4500......

-----------------------------------------
Total C/F Rs. .......???........???........
-----------------------------------------

I want the Difference Amount of Column(3) and Column(4)for every Record. How to achieve this?


At the same time I also want the Page Total of Column(3) and (4)at the page footer of Main Report(not the Grand Total).


 

Crystal Reports 7 Only 5 Records On Each Page - Anyone Online Now?
Friends
I am using crystal reports 7 with vb and access.
i have to print only 5 records per page.
how can i set a page break?
ie., after 5 records it have to print the next 5 in a new page.

thanks
sathyguy

Increasing Page Width In Crystal Reports
how to increase the pagewith in crystal reports
and is it possible to show the desired no of records in a page(crystal
reports) and shift next records to next page

VB-controling Page Ejection In Crystal Reports
Hi

Can we control Page Ejection on Crystal Report.
what I mean is can we stop the page ejection after page printing.

This is a great site for beginners, Keep it up GUYS.

Satheesh

[crystal Report] Avoid Printer From Ejecting Page After Printing A 3 Line Page
Im taking a printout in crystal report - but there are only 3 lines and after printing it goes to next page - but I dont want it to goto next page.
Instead I want it to continue the rest of the printing - which may be in some other report etc - to continue printing from where it left behind (maybe one or 2 lines break)
But after printing 3 lines it automatically ejects out the paper and goes to next page
How do I avoid this ?
Thanks




Edit by johnminkjan: Topic Title

Anjanesh

Edited by - johnminkjan on 9/7/2004 12:01:29 PM

RESOLVED - Can't Get Page Setup Dialog To Show Page Size Correctly
Hey guys and gals, I am hoping someone will have an idea on this one . . .

I am trying to show the page setup dialog and prepopulate the values of the page setup dialog before it is shown. All of the form pre-population seems to work except paper size. I can retrieve paper size just fine after the user clicks ok on the form, I just can't seem to set it before the form is populated.

I created a tiny test app to illustrate my problem.


VB Code:
' on a formOption Explicit  Private Sub Command1_Click()    With Printer' Height & Width; Printer object the physical dimensions' of the paper set up for the printing device; not available' at design time. If set at run time, values in these properties' are used instead of the setting of the PaperSize property.'        .Width = 14'        .Height = 8.5        .PaperSize = vbPRPSLegal        .Orientation = vbPRORLandscape    End With    ShowPageSetupDlg MeEnd Sub '********************************************************************'                IN A MODULE! Option Explicit Const CCHDEVICENAME = 32Const CCHFORMNAME = 32Const GMEM_MOVEABLE = &H2Const GMEM_ZEROINIT = &H40Const DM_DUPLEX = &H1000&Const DM_ORIENTATION = &H1&Const PSD_MARGINS = &H2Const PSD_DISABLEPRINTER = &H20Const PSD_INTHOUSANDTHSOFINCHES As Long = &H4Const PSD_DISABLEPAPER As Long = &H200 Private Declare Function PageSetupDlg Lib "comdlg32.dll" _    Alias "PageSetupDlgA" (pPagesetupdlg As PageSetupDlg) As Long Private Declare Sub CopyMemory Lib "kernel32" _    Alias "RtlMoveMemory" _    (hpvDest As Any, _    hpvSource As Any, _    ByVal cbCopy As Long) Private Declare Function GlobalLock Lib "kernel32" _    (ByVal hMem As Long) As Long Private Declare Function GlobalUnlock Lib "kernel32" _    (ByVal hMem As Long) As Long Private Declare Function GlobalAlloc Lib "kernel32" _    (ByVal wFlags As Long, _    ByVal dwBytes As Long) As Long Private Declare Function GlobalFree Lib "kernel32" _    (ByVal hMem As Long) As Long Private Type POINTAPI    x As Long    Y As LongEnd TypePrivate Type RECT    Left As Long    Top As Long    Right As Long    Bottom As LongEnd TypePrivate Type PageSetupDlg    lStructSize As Long    hwndOwner As Long    hDevMode As Long    hDevNames As Long    flags As Long    ptPaperSize As POINTAPI    rtMinMargin As RECT    rtMargin As RECT    hInstance As Long    lCustData As Long    lpfnPageSetupHook As Long    lpfnPagePaintHook As Long    lpPageSetupTemplateName As String    hPageSetupTemplate As LongEnd TypePrivate Type DEVMODE_TYPE    dmDeviceName As String * CCHDEVICENAME    dmSpecVersion As Integer    dmDriverVersion As Integer    dmSize As Integer    dmDriverExtra As Integer    dmFields As Long    dmOrientation As Integer    dmPaperSize As Integer    dmPaperLength As Integer    dmPaperWidth As Integer    dmScale As Integer    dmCopies As Integer    dmDefaultSource As Integer    dmPrintQuality As Integer    dmColor As Integer    dmDuplex As Integer    dmYResolution As Integer    dmTToption As Integer    dmCollate As Integer    dmFormName As String * CCHFORMNAME    dmUnusedPadding As Integer    dmBitsPerPel As Integer    dmPelsWidth As Long    dmPelsHeight As Long    dmDisplayFlags As Long    dmDisplayFrequency As LongEnd Type Public Function ShowPageSetupDlg(frm As Form) As Boolean    Dim DevMode As DEVMODE_TYPE    Dim lpDevMode As Long    Dim m_PSD As PageSetupDlg    Dim bReturn As Integer        On Error Resume Next    'Set the current orientation and duplex setting    DevMode.dmDeviceName = Printer.DeviceName    DevMode.dmFields = DM_ORIENTATION Or DM_DUPLEX'    DevMode.dmPaperWidth = Printer.Width'    DevMode.dmPaperLength = Printer.Height    DevMode.dmOrientation = Printer.Orientation    DevMode.dmPaperSize = Printer.PaperSize    DevMode.dmDuplex = Printer.Duplex    DevMode.dmSize = Len(DevMode)    On Error GoTo 0        'Allocate memory for the initialization hDevMode structure    'and copy the settings gathered above into this memory    m_PSD.hDevMode = GlobalAlloc(GMEM_MOVEABLE Or GMEM_ZEROINIT, Len(DevMode))    lpDevMode = GlobalLock(m_PSD.hDevMode)    If lpDevMode > 0 Then        CopyMemory ByVal lpDevMode, DevMode, Len(DevMode)        bReturn = GlobalUnlock(m_PSD.hDevMode)    End If        With m_PSD        .rtMargin.Top = 0.5 * 1000        .rtMargin.Bottom = 0.5 * 1000        .rtMargin.Left = 0.5 * 1000        .rtMargin.Right = 0.5 * 1000        .ptPaperSize.x = 14 * 1000        .ptPaperSize.Y = 8.5 * 1000        .lStructSize = Len(m_PSD)       'Set the structure size        .hwndOwner = frm.hWnd           'Set the owner window        .hInstance = App.hInstance      'Set the application instance        .flags = PSD_MARGINS Or PSD_DISABLEPRINTER Or PSD_INTHOUSANDTHSOFINCHES    End With        'Show the pagesetup dialog    If PageSetupDlg(m_PSD) Then        ShowPageSetupDlg = True'        sngMarginTop = (m_PSD.rtMargin.Top) / 1000'        sngMarginBottom = (m_PSD.rtMargin.Bottom) / 1000'        sngMarginLeft = (m_PSD.rtMargin.Left) / 1000'        sngMarginRight = (m_PSD.rtMargin.Right) / 1000'        sngPageW = (m_PSD.ptPaperSize.x) / 1000'        sngPageH = (m_PSD.ptPaperSize.Y) / 1000                ' Get DEVMODE structure from PRINTDLG        lpDevMode = GlobalLock(m_PSD.hDevMode)        CopyMemory DevMode, ByVal lpDevMode, Len(DevMode)        Call GlobalUnlock(m_PSD.hDevMode)        ' Set default printer properties        On Error Resume Next        If Not (Printer Is Nothing) Then            Printer.Copies = DevMode.dmCopies            Printer.Orientation = DevMode.dmOrientation            Printer.PaperSize = DevMode.dmPaperSize'            lPaperSize = DevMode.dmPaperSize            Printer.PrintQuality = DevMode.dmPrintQuality        End If        On Error GoTo 0    End IfEnd Function


Thanks in advance for any insight!

Detecting When The Details Continue On Next Page In Crystal Reports 7
Hi team, does anyone know how to detect when the detail section of Crystal Reports is going to continue on the next page? I want to display "continued next page".

Any ideas?

Setting Page Length In Seagate Crystal Reports 8
I want to set the page height in crystal report to 5.4 inches using vb 6 code how is it possible and group header to 1.56 inches

Including Dynamic Chart In Web Page Via Crystal Reports
I'm want to dynamically create a bar chart from Crystal Reports (either 8.5 or 9.0) and save it as an image via an ASP page. Then, I'd like to use that image in the page I'm currently building.

I currently have a COM that is connecting to Crystal to spit-out dynamically created pdf files that I then open via hyperlink.

I'm not using RAS... Nor do I have Enterprise installed on the IIS server.

In short, can I create a unique bar-graph image from a Crystal .rpt file, on demand, from the web?

Anyone who replys within 2 days of me posting this message will recieve 5 EXTRA BROWNIE POINTS!

Thanks,

JT Howard

Crystal Reports,extra Print Page Problem
In my report i wanted each group to be printed on new page so
in group footer section i had set 'newpage after'option to true
so i could print each group on new page but at the end of report it gives me a extra page with groupheader without any records. I don't want this extra page to be printed ,please suggest any workarounds.

How To Make My Crystal Report Have 2 Header In 1 Page
i want to split my report become 2 coloum which each coloum have couloum header.
please help me



Edited by - albantani on 6/18/2006 8:18:48 PM

Page Up Page Down Not Working With Crystal Designer In VB Project
His all,

its been a long time i m having a problem using Crystal Report with Visual Basic Project.

Question 1:
--------------
Page Down and page up key doesnt work on crystal report previewer(crviewer control). though its working with Crystal Report IDE..but not with visual basic crviewer control.

when we press page down and page up key on report..it goes to the end of the page..not goes to the next page or previous page..


I m using VB6 with Crystal Report 9.

well .. may be few of you have experienced about this bug in crystal report.


Question 2:
--------------
if i want to catch the keypress on crviewer control and i set the form's KeyPreview property to yes..... it only catches Enter Key.. or Function keys.. none other than that..

so..
how should i trap the keys... and set the task for the specific keys.


need your help buddies...
thanks in advance

c ya

Problem With Page Break On Data Change In Crystal Reports 8
Hi all,

I've got a problem with Crystal Reports 8 (not so much a problem, more can't figure out how to do it).


I have a report linked to a Stored Procedure in SQL Server, which returns data ordered by a particular field. This works fine and prints the report in the order shown below

HEADER

XXX
XXX
YYY
YYY
etc.


What I have been asked to do now is make it so that the when the data changes in the "Sort Order" field that we can force a page break so that each group is on a serparate page like below.

HEADER

XXX
XXX
Page Break Here

HEADER

YYY
YYY
etc.

Can someone please advise on how this can be done, as I'm relatively new to Crystal Reports, or point me somewhere that I can find an example.

Thanks in advance,

Mark

Crystal Reports Page Header, Details And Report Footer
OK I have another question.

I have a report of more records in a table.

Table headers are written in 'page header',
records are displayd in 'Details section',
and then I have a "Thank you in advance adn similar crap" displayed in 'report footer'.

In 'page footer' I added page number.

My problem is, that when a report is more pages long, then page header is always displayed (even if there is only report footer on that page).

and becouse I have a table in details and page header, there are a lot of lines on the last page

http://samurai.streznik.org/cr.jpg

Modifier En Visual Basic L'entête De Page D'un Fichier Crystal Reports
salut

comment je peux modifier en visual basic l'entête de page d'un fichier crystal reports

merci

Crystal Reports: Adding Groups At Runtime And Starting A New Page
Hi!
I'm trying to create groups in Crystal reports at runtime. I need to read the groups from the database for the query, get the dataset based on them and then make report display the appropriate number of groups. Any ideas how to do it?
Another problem is to start a new page after some of the groups. How would you trigger this?

I appreciate your help!

Can't See Page Header In Subreport
Is it possible to view a report's page header if it is viewed as a subreport within a report.

For some reason I cannot see the page header???

Is there a property setting I need to adjust to see it?

New Page For Lengthy Subreport
I'm sure this is a basic question for experts in Access...

I have a small subreport embedded in the middle of a parent report. I have recently run into situations where the number of records in the sub query (subreport) exceed the allotted space.
I know the subreport dimensions can be set to grow with the data, but this isn't feasible due to format requirements. What I need is the excess records to print on on page 2, 3 etc as needed.

What setting(s) do I need to tweak??

Thanks for any help.

Crystal - Suppress Page Footer If Not The Last Page
How can I suppress the page footer in a crystal report unless it's the last page?

Access Subreport Page Header Not Showing Up
I have an Access subreport in a report. It currently looks like this (attached). My client does not want to see the text labels repeated in the subform. (To be continued in next post...)

------------------------------------------------------------------------------------------------
Put your PC to good work at vbCity at world community grid and join Team vbCity.
2,669,763 3,325,308 points and ranked 1,195 1,149 as of March 8 May 23, 2008!
------------------------------------------------------------------------------------------------

[NOT RESOLVED] Crystal Report 10 (page Setup Button) (please See Attached Picture)
i have a problem with my project using CR10. i just want to choose the printer, i want to set the printer in landslide or portrait, why is that there is no button for the page setup in crviewer(CR10)? kindly help.



Edited by - edd_hills on 5/14/2006 2:17:13 AM

Word - Loop Through Each Page In Document And Copy Page With Page Format
Here's what i'm trying to accomplish

1 - Start at first page and get page format (portrait/landscape)

2 - Copy page and paste it into a new word document with original format

repeat these steps until all pages have been copied

I need the condition where a document has both portrait and landscape pages.

Anyhelp would be appreciated

Crystal Reports - SubReport
Can you pass a variable from a SubReport back to a main report?

I have a report with tables with one to many relationship. Header table with many detail records. The subreport is currently calculating an amount on the many to one detail table and I would like to pass that figure back to the main report for further use.

Any help will be appreciated.

Thanks

Crystal Reports - Subreport SQL
I have a Crystal Report that I access from a VB program and I send an SQL statement to the main report, but I also want to send the subreport a different SQL statement to execute.

Do I need to pass it a parameter? Or how would I code it in VB to execute inside the subreport?

Please help! Thanks!

Subreport With Filtering Crystal Reports
Hello, I would like how to program in one report with visual basic... I have one subreport added to one report. I have linked one report field with one subreport field with the option Change Subreport Links...
Then my problem is... I have a sql query associated with the report main where one var has a determinate value in a run time... My problem isn't that I know this value else not how to filter the subreport with it... Somebody suggest any code to do it?
I try to do it with the query, but I think that it exists other method more efficiently based on filters... ok, but not in design time. Any idea?
Thanks a lot

Get Records For Subreport: Crystal Reports
I am looping through objects on a Report to find the subreports and need to get the correct records for the found subreports, but it's not working. I've opened my recordset and it is returning the correct records (when checked in Access), but the subreport is not returning those records...it returns all instead. Can someone help me out? Thanx.


Code:
If newObject.Kind = crSubreportObject Then
'Found a subreport, create an new instance
Set crxSubObj = newObject
'Open the subreport; treat it like the main report
Set crxSub = crxSubObj.OpenSubreport
'assign the second recordset to the subreport
If crxSub.Subreportname = "FilterReport.rpt" Then crxSub.Database.SetDataSource rs2
End If

It correctly meets the IF criteria, but the records that show up aren't right...

Datereport Page Number {Page Number Resolved But Other Query Remains}
Hi all

This code displays my reading table on the next page if the variable blnShow is True that means if i need to display a chart else it displays the readings on the first page itself

In the previous case as the reading are shifted to the next page the page number is also not displayed at the bottom
How can i show the page number

The page number is in the Page Footer section

Code: If blnShow = True Then
        With rptPump
            Clipboard.Clear
            frmChartHist.MSChart1.EditCopy
            .Sections("Section4").Controls("Image1").Height = 7000
            .Sections("Section4").ForcePageBreak = rptPageBreakAfter
            Set .Sections("Section4").Controls("Image1").Picture = Clipboard.GetData
            .Refresh
            .Show
        End With
    Else
        With rptPump
            .Sections("Section4").ForcePageBreak = rptPageBreakNone
            .Sections("Section4").Controls("Image1").Height = 1
' .Sections("Section4").Visible = False
            .Sections("Section4").Height = 1600
            .Show
        End With
    End If

[EDIT] How can i display the page numbers as 1 of 2,2 of 2 for a datareport?

Hope m clear.Let me know

Samir
Skill is successfully walking a tightrope over Niagara Falls. Intelligence is not trying.

Edited by - samirprabhudesai on 4/16/2004 2:32:32 AM

Crystal Reports: Selection Formula Of A Subreport
in my report i have a subreport. the problem exists when i want to make a selection formula of that subreport. it says that cant find the table.

Crystal Reports: Subreport (simple Question)
Ok, I'm new to Crystal Reports, so sorry if this is a stupid question.

I'm trying to create a subreport in a report in VB.NET (I use the VB.NET interface) The situation is as follows:

I have several food products, but they consist out of raw materials. For each food product, I need to print a list of raw materials. I've put them in two tables: TempKlaarzettenSamenZetten and TempKlaarzettenGrondstoffen. So, per record in the first table, I need several records of the second table.

Now, I can't seem to get the **** thing to work. I know how to create a subreport, but I don't know how to link the subreport to a field in the main report. I've searched the internet, but apparently everybody knows how to do this except me. :-)

This is the code I use in VB.NET:

myConnection2 = New SqlConnection("Data Source=(local);User ID=***;password=***;Initial Catalog=kp2")
myConnection2.Open()

Dim objKlassenAdapter2 As New SqlDataAdapter
Dim objKlassenAdapter3 As New SqlDataAdapter
Dim objDataSet2 As DataSet
Dim rpt2 As New CrystalReport2

objDataSet2 = New DataSet("Afdelingen")

strSQL2 = "SELECT * from TempKlaarzettenSamenZetten"
objKlassenAdapter2 = New SqlDataAdapter(strSQL2, myConnection2)
strSQL2 = "SELECT * from TempKlaarzettenGrondstoffen"
objKlassenAdapter3 = New SqlDataAdapter(strSQL2, myConnection2)

objKlassenAdapter2.Fill(objDataSet2, "tempKlaarzettenSamenZetten")
objKlassenAdapter3.Fill(objDataSet2, "tempKlaarzettenGrondstoffen")

rpt2.SetDataSource(objDataSet2)
CrystalReportViewer1.ReportSource = rpt2

rpt2.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.Landscape
'rpt2.PrintToPrinter(1, True, 1, 100)

Can anybody help me or does anybody know a good tutorial about this subject? Thanks!

Selection Formula To Subreport: Crystal Reports
I've never used the subreport feature of Crystal report and do not know how to call up a report that has them from VB. I have a report with 3 subreports. I need to have the reports only display values for a specific date. How do I pass the selection formulas to the subreports? Is it just the normal way? I use this to select the records of the primary report, but the subreports are showing all dates....


Code:
With CrysReport
.ReportFileName = App.Path & ReportName
.DataFiles(0) = App.Path & "DB.mdb"
.SelectionFormula = Selection 'defined my selection formula elsewhere
.DiscardSavedData = True
.WindowState = crptMaximized
.Destination = crptToWindow
.Action = 1
End With

Crystal Reports / Passing Paramater To Subreport
I am attempting to call up a report and imposing parameters (date). I have done this often enough, but the difference here is that the report contains 3 subreports. It is in the subreports where I would need the paramaters to go.

Here is the code I am using to call the report. How could I alter this code to impose parameters on subreports within this report?


VB Code:
Dim Response As String        Response = InputBox("Enter Date (m/d/yyyy):", "Enter Date")        'Empty length string is returned when user selects 'Cancel'.    If Response = "" Then        Exit Sub    End If        'Make sure user enters a date.    If IsDate(Response) = False Then        MsgBox "Please enter a date.", vbOKOnly + vbExclamation, "Invalid User Entry"        Exit Sub    End If        '--------Encapslulated code opens cr report--------    Dim Report As New rptBuySchedule    Dim crPDefs As CRAXDRT.ParameterFieldDefinitions    Dim crPDef As CRAXDRT.ParameterFieldDefinition     Set crPDefs = Report.ParameterFields        For Each crPDef In crPDefs        With crPDef            Select Case .ParameterFieldName                Case "SettleDateParm"                    .AddCurrentValue CDate(Format(Response, "mm/dd/yy"))            End Select        End With    Next     Report.EnableParameterPrompting = False    frmRptView.CRViewer1.ReportSource = Report    frmRptView.Show    frmRptView.CRViewer1.ViewReport    '-------------------------------------------------  

Sorting Data Returned From A Subreport In Crystal Reports 9
I've got a report that passes parameters over to a subreport as the report is being generated and the subreport returns data to the main report based on the parameters it receives. So the subreport acts like a function that I'm calling for each record in the main report.

Before the report is generated, I want to give the user the ability to sort by the column that displays the subreport data for each record.

I tried passing the data from the subreport in a shared variable to a formula in the main report then sort by the name of that formula like so...

Report.RecordSortFields.Add .FormulaFields.GetItemByName("myFormula"), crAscendingOrder

It didn't work but it didn't return any errors. I don't think it worked because the subreport data is generated on the fly so I'm guessing I would need to tell it to sort after the report has been generated. Is this even possible or am I going about this all wrong?

Crystal Reports: Passing Values From Subreport To Primary
I have a sub report that has some values in it that I want to use to do some calculations and display the results in my primary report. Is it possible for both reports to exchange values that are saved in variables?

I tried creating a global var in the subreport and putting the value in it but the primary report can't see that global var.

Printer Change Page Orientation From Page To Page
I'm running VB 5. Is it possible to change the page orientation from one page to another.

portion of code:
If page_orientation(gridno) = 0 Then
Printer.Orientation = vbPRORPortrait
Else
Printer.Orientation = vbPRORLandscape
End If

If I use "Printer.EndDoc" before the above code, the program works fine. Each page is a separate 'print-job' with the orientation that I want. A problem arises when I want to print to a .PDF printer: each page is saved as a separate PDF because they're all separate 'print jobs'.

If I substitute "Printer.EndDoc" with "Printer.NewPage", I get the error "orientation property cannot be set within a page". Is there any way to get around this?

Err: 'Page Header Plus Page Footer Is Too Large For The Page' With CR9.0
Dear All

I have a trouble making a report using Crystal Report 9.0. I am working on a project which is developed in vb 6.0. What it actually does is, pick some details from the DB (Access 2000) and shows it on the CR 9.0. I've made a TTX File for the same.

But as I run the report it gives an error msg which says Err: 'Page Header plus Page Footer is too large for the page'

To Mention : I am using the custome page size i.e. 6" x 8"..

Can any body help me plz...

Regards,
K****ij

Err: Page Header Plus Page Footer Is Too Large For The Page Using CR9.0
Dear All

I have a trouble making a report using Crystal Report 9.0. I am working on a project which is developed in vb 6.0. What it actually does is, pick some details from the DB (Access 2000) and shows it on the CR 9.0. I've made a TTX File for the same.

But as I run the report it gives an error msg which says Err: 'Page Header plus Page Footer is too large for the page'

To Mention : I am using the custome page size i.e. 6" x 8"..

Can any body help me plz...

Regards,
Kshitij

Set Selection Formula For Subreport In Crystal Reports Using Visual Basic 6.0
Hello Experts,
I have designed a report using crystal reports 8.0.
There are subreports also included.front end is visual basic 6.0
I change the selection formula of the main report using
crystalreport.selectionformula. I am not knowing how to
set the selection formulae for the sub reports.
can any one help me .

Page Breaks In Reports
Hi, I'm new to this forum and really like its environment. I am a beginner in visual basic 6, and would like to know how to create page breaks in a report. As of now i have created q uery from a datagrid, and then created a report from that query. I would like to be able to separate the reports according to names:

Pg 1: All names beginning with A
Pg 2: All names beginning with B

This is an example of what I would like to accomplish. Thank you for your time.

Copyright 2005-08 www.BigResource.com, All rights reserved