Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2008
    Posts
    3

    Question Unanswered: Crystal Reports without Database Fields?

    Hi All,
    Is there any way to create reports without using database fields.ie., i am sending all values from code behind to crystal report using formula fields and parameter fields.but it is printing only one record. my code in crystal report formula field is:
    Local StringVar s;
    Local NumberVar i;
    For i := 1 To Ubound({?p_total}) Do
    (
    s:=uppercase({?p_empname}[i])
    );
    totext(s)

    here {?p_total} is one parameter field having no.of employees ex:1,2,..5
    and {?p_empname} is one parameter field having emp names like A,B,...E

    If i choose any dummy table having 5 rows then all records are printing.Is there any way without database field in crystal report.
    Any idea plz................

    Thanks.

  2. #2
    Join Date
    Jan 2008
    Location
    Mississippi
    Posts
    7
    If you are talking about creating a report without identifying a database to Crystal, then when the database expert window (the one where you have to pick a connection, etc) shows up just cancel it.

  3. #3
    Join Date
    Oct 2005
    Posts
    178
    Quote Originally Posted by bhappy
    Hi All,
    Is there any way to create reports without using database fields.ie., i am sending all values from code behind to crystal report using formula fields and parameter fields.but it is printing only one record. my code in crystal report formula field is:
    Local StringVar s;
    Local NumberVar i;
    For i := 1 To Ubound({?p_total}) Do
    (
    s:=uppercase({?p_empname}[i])
    );
    totext(s)

    here {?p_total} is one parameter field having no.of employees ex:1,2,..5
    and {?p_empname} is one parameter field having emp names like A,B,...E

    If i choose any dummy table having 5 rows then all records are printing.Is there any way without database field in crystal report.
    Any idea plz................

    Thanks.
    In your loop statement, the s variable is assigned the last record, so you're seeing the last record only.
    Try this..

    s:= s & " " & uppercase({?p_empname}[i])

    How ever you what to see them print, you can use the CRLF instead of the space between s and uppercase({?p_empname}[i])

  4. #4
    Join Date
    Nov 2008
    Posts
    8

    crystal reports without database

    you can crate crystal reports without database..

    http://vb.net-informations.com/cryst...t_database.htm

    huyang.

  5. #5
    Join Date
    Dec 2008
    Posts
    3
    1.

    Open the Form1 form. Click View -> Toolbox in the menu.
    2.

    Drag (from the bottom of the Windows Forms tab in the Toolbox) a CrystalReportViewer into the form.
    3.

    Right click the CrystalReportViewer1 CrystalReportViewer in the form -> Properties.
    4. Set the Dock property to Fill.

    Add the code to fill and show the Crystal Reports report:
    Code:
    Private Sub Form1_Activated(ByVal sender As Object, _
            ByVal e As System.EventArgs) _
            Handles MyBase.Activated
        Dim dsObj As CRDataSet = New CRDataSet
        FillDataSet(dsObj)
    
        Dim cr As MainReport = New MainReport
    
        ' Set the report DataSet   
    
        cr.SetDataSource(dsObj)
    
        CrystalReportViewer1.ReportSource = cr
    
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •