Quantcast
Channel: VBForums - Reporting
Viewing all 589 articles
Browse latest View live

Crystal Reports - Main Report having two subreports

$
0
0
Hello,
I have a report where I am combining two independent reports together.
The main report doesn't have any data sources; they are only on the sub reports.

Both sub reports use the same dataset that contains three tables.

I am getting the error Object reference not set to an instance of an object when I run the code below:

Code:

objRpt = New rptOVERDET
                objRpt.SummaryInfo.Dispose()
                objRpt.Subreports("srOverview").SetDataSource(dsDetail)
                objRpt.Subreports("srOverview").SummaryInfo.Dispose()
                objRpt.Subreports("srOverview").SummaryInfo.ReportComments = "Overview Report" & Trim(strReportHeader) & vbNewLine & Trim(strContactPhone)

                objRpt.Subreports("srDetail").SetDataSource(dsDetail)
                objRpt.Subreports("srDetail").SummaryInfo.Dispose()
                objRpt.Subreports("srDetail").SummaryInfo.ReportComments = "Detail Report" & Trim(strReportHeader) & vbNewLine & Trim(strContactPhone)

Any help would be greatly appreciated.
Eddi Rae

Crystal Reports group footer appearing on following page

$
0
0
Hi.

I've got a report which has a group footer.

The footer sometimes appears by itself on a page. The previous page is full and so the footer (just some totals) appears on the following page.


the text that shown in group footer is "NOTHING FOLLOWS"
I don't want to have a next page if no details shows just group footer and other sections only

PLEASE SEE THE ATTACHMENTS FOR REFERENCE

1 SHOWS THE 2ND PAGE THAT SHOWS ONLY NOTHING TO FOLLOWS WITHOUT THE DETAILS
2 SHOWS THE DESIGN VIEW
3 SHOWS THE FIRST PAGE INCLUDING ALL THE DETAILS
Attached Images
   

ReportViewer does not auto refresh after chainging data

$
0
0
I have an application that goes an gets data from SQL then displays it in a local rdlc. Then close the print preview form and run the program again to get different data. The print preview comes up with the old data. Even though I have: PrintPreview.ReportViewer1.LocalReport.Refresh(). If I right click ont the print preview form and refresh or hit the refresh button then the data updates on the screen. this is my code

Dim RDS As New ReportDataSource("DataSet1", ds.Tables(0))
PrintPreview.ReportViewer1.ProcessingMode = ProcessingMode.Local
PrintPreview.ReportViewer1.LocalReport.DataSources.Clear()
PrintPreview.ReportViewer1.LocalReport.DataSources.Add(RDS)
PrintPreview.ReportViewer1.LocalReport.Refresh()
PrintPreview.ReportViewer1.PrinterSettings.Copies = 1
PrintPreview.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
PrintPreview.ReportViewer1.ShowRefreshButton = True

Dim p1 As New ReportParameter("p1", lookup)
PrintPreview.ReportViewer1.LocalReport.SetParameters(p1)
PrintPreview.ReportViewer1.LocalReport.Refresh()

PrintPreview.ShowDialog()

I think I can fix it by using below code after the ShowDialog but I am not sure of how to rebind the datasource.

PrintPreview.ReportViewer1.Reset()
PrintPreview.ReportViewer1.LocalReport.DataSources.Clear()
PrintPreview.ReportViewer1.LocalReport.ReportPath = "History Report.rdlc"
Dim bindingsource As BindingSource = New BindingSource()

Now where do I go? (VS 2013)

Any help is much appreciated.

What is important about reporting tools?

$
0
0
When you look to buy a 3rd party reporting tool to use with VB or your .NET development, what are the characteristics you look for when making the decision on which to buy? Is it ease-of-use, controls, and/or something else?

I'm not looking for tools that you use or sell, but rather what makes you consider one tool over another.

Thanks!

Brad!

Oledb Objects SAP Crystal Reporting

$
0
0
Hi, Please can any one tell video tutorials from scratch for OLEDB Objects I am not using sql server.
thanks

Blank Page

$
0
0
Hi,
I need a blank page without any header footer sections lines.
thanks
Attached Images
 

Help me Improve my CrystalReport Class

$
0
0
Good day,

I am writing my sqlReport class in my project..The thing is, my dataset is designed to accept any field, any datatype, and then shows the result of the sql query to the crystalreportviewer. But then I am stuck with this problem. I will try my best to explain why I'm stuck in it.

Please take a look at my dataset.xsd.

Name:  Untitled.png
Views: 72
Size:  5.9 KB

and here's my sqlreport.rpt.
Name:  Untitled2.jpg
Views: 79
Size:  26.6 KB

annndd.. this is my class that will populate the dataset and then pass the values to crystal report columns.

Code:

Public Function rptSQL(ByVal CrystalReportViewer As CrystalReportViewer, ByVal fields_As As String()) As sqlreport
        Dim objRpt As New sqlreport
        Dim server As New servercon
        Dim ds As New sqlDataset
        Dim cnn As MySqlConnection

'There are more lines of code here

In the code highlighted above, What if I want to target a new crystal report design? I have 5 crystal report designs, and all of those reports uses the same function, but I rename the function, and give a new reportname. Take a look at this code below:

Code:

Public Function rptSQL1(ByVal CrystalReportViewer As CrystalReportViewer, ByVal fields_As As String()) As sqlreport
'code of lines here
End Function

Public Function rptSQL2(ByVal CrystalReportViewer As CrystalReportViewer, ByVal fields_As As String()) As anotherReport

'code of lines here
End Function

Public Function rptSQL3(ByVal CrystalReportViewer As CrystalReportViewer, ByVal fields_As As String()) As ironReport

'code of lines here
End Function

Is there a way I could say something like this:

Code:

Public Function rptSQL(ByVal CrystalReportViewer As CrystalReportViewer, ByVal fields_As As String()) As Any Report I Want
So that I will not duplicate the functions. Thank you for your time reading. :)

-JL
Attached Images
  

How to setup parental controls for HBO GO streaming?

$
0
0
You can apply the parental control for HBO streaming service in three ways that are from your home device, from the TV service provider or the HBO GO application.

Cross Tab Report

$
0
0
I would like to display datas in my cross tab with date columnwise and location rowwise. Actually I am able to generate the report in this way. But if the date is not in the Transcation table,that particular date is not not coming inthe cross tab header .How can i able to generate with all the dates (Always 1 -31)

Really I need a solution for this

Update table through User Argument

$
0
0
Hi I'm new on VB code,
I'm working on Fast-Reporting tool as its very rare not known in the market.
The existing report taking argument of visit no and need to update the correct reference number both Argumetn should pass before run the report.
The following code already return could you please help me , so the columns

Customer reference value update to = 48000098437
and the VisitID = 4146832

UPDATE tblVisit SET CustomerReference = '4800098437' WHERE VisitID = 4146832
I can do through SQL but through VB I don't know the existing code shown belwo:

Code:

Namespace FastReport
  Public Class ReportScript

    Private myConn As SqlConnection
    Private myCmd1 As SqlCommand
    Private myCmd2 As SqlCommand
    'Private myReader As SqlDataReader
    'Private results As String
    Dim connectionString As String = "Server=MSS_SAFE_SQLAG;Database=MLA_SAFE_Live;User Id=MLA_Safe_Service_Acc;Password=doUuM3Doh8v4yHXRjopf"

   
    Private Sub btnOk_Click(ByVal sender As Object, ByVal e As EventArgs)

      Dim VisitIDString AS String 
      Dim VisitIDsUpdated As Object
      Dim myComma() As Char = {","}
     
      '------------------------------------------------------------------------------------------------------------
      VisitIDString = VisitIDTextBox.Text
      VisitIDString = VisitIDString.Replace(vbCr, "").Replace(vbLf, ",")
      '      VisitIDString = VisitIDString.Replace(",", "")     
      VisitIDString = VisitIDString.Replace(" ", "")
    MsgBox(VisitIDString.Replace(vbCr, "").Replace(vbLf, ",")) 
      VisitIDString = VisitIDString.TrimEnd(MyComma)
     
      Report.SetParameterValue("VisitIDByte",VisitIDString)
    MsgBox(VisitIDString) 
      '------------------------------------------------------------------------------------------------------------
     
      'Create a Connection object
      myConn = New SqlConnection(connectionString)

      'Create a Command object
      myCmd1 = myConn.CreateCommand
      myCmd1.CommandText = "UPDATE tblVisit SET Invoiced = 1 WHERE VisitID IN (" & VisitIDString & ")"
      'Open the connection.
      myConn.Open()

      'Execute the statement and return a single value. If you wanted to return more than 1 value you need to add a loop here. 
     
      VisitIDsUpdated = myCmd1.ExecuteScalar()
           
      'Close the database connection.
      myConn.Close()   
     
    End Sub   
 
 

    Private Sub Label3_Click(ByVal sender As object, ByVal e As EventArgs)
     
    End Sub

    Private Sub TextBox1Ref_Click(ByVal sender As object, ByVal e As EventArgs)
     
    End Sub
  End Class
End Namespace

SSRS Report Builder versus Visual Studio (SSDT)

$
0
0
I'm just getting my feet wet with SQL Server Reporting services.

I've read online that Report Builder allows a more or less non-technical person to create reports.

To create complicated reports that pull from all the features you need to use Visual Studio (or what they are calling SQL Server Data Tools).

Does anyone have experience with the differences and what not??

Thanks!

Steve

Gridvalueat function in CR

$
0
0
k i am trying to suppress a field using this line
Code:

if GridValueAt(CurrentRowIndex, CurrentColumnIndex, 0) > 0 then true
But i get the error like this: A number, currency amount, boolean, date, time, date-time, or string is expected here.

I am using VS 2008 Professional edition and Crystal Reports basic that comes with it.

Value exceeding more than 9 digits

$
0
0
Hi

In a query in ssrs 2008 i have written below select statement. If value is <- 9 digits then it is o.k else it shows error

Select sum(amount) from table1

Thanks

Sum of Column

$
0
0
Hi

In SSRS 2008 report i am displaying Data in 2 columns like this

In First Column =IIF(Fields!OpgAmount.Value > 0 , Fields!OpgAmount.Value , 0)
In Second =IIF(Fields!OpgAmount.Value <= 0 , Fields!OpgAmount.Value , 0)

I want to display sum of these columns in the end.

Thanks

Sum of sum of groups

$
0
0
WHY IT RETURNS 0 WHEN I CREATE A FORMULA FIELD IN CRYSTAL REPORT?

CODE:
Code:

if {Consumption_Branch;1.CLASSIFICATION}="CHILLED"  then
if {Consumption_Branch;1.Vatable}=True then
global numbervar GTotal:=GTotal + Sum ({Consumption_Branch;1.TOTALCOST}, {Consumption_Branch;1.UOM})/1.12
else
global numbervar GTotal:=GTotal + Sum ({Consumption_Branch;1.TOTALCOST}, {Consumption_Branch;1.UOM})

I group my report by classification and sum its total total cost per item but i want to sum the total cost per classification with the code above that calculates items with and without vat..

Problem Exporting a Crystal Report 8.5 Report to Excel

$
0
0
I'm trying to export a Crystal Reports 8.5 report to Excel via VB6 code but is getting a weird message:
Window name: Crystal Reports: Database Error
Error Message: 'Index_0DF0A39F_DFB4_469C' is not an index in this table.

Just before this message appears there is a window 'Exporting Records' with Current and Total etc.

Does anybody know what this means or what I'm doing wrong?

I create a few temporary tables and populate them with the data I need in my report. When I open the tables they show that the fields are indexed that are used in the report links. Displaying and printing the report from VB6 works. The exporting to Excel doesn't work...

This has been frustrating me for days now and I can't figure out what the hell is wrong:mad:

Crystal Reports 8.5 Service Pack

$
0
0
Does anybody know where I can find Crystal Reports 8.5 Service Pack 2 or 3 to download? I googled but can't find a SP2 or SP3 download:eek:

One of the suggestions I found for fixing a problem I'm having with CR 8.5 is installing ExportModeller.dll but my CR8.5 SP1 does not have that file. Suggestion said it is in SP2.

Was it maybe called something else in SP1? I found a EXPMOD.DLL on my CD. Could it be it?

Any help appreciated.

[RESOLVED] Problem Exporting a Crystal Report 8.5 Report to Excel

$
0
0
I'm trying to export a Crystal Reports 8.5 report to Excel via VB6 code but is getting a weird message:
Window name: Crystal Reports: Database Error
Error Message: 'Index_0DF0A39F_DFB4_469C' is not an index in this table.

Just before this message appears there is a window 'Exporting Records' with Current and Total etc.

Does anybody know what this means or what I'm doing wrong?

I create a few temporary tables and populate them with the data I need in my report. When I open the tables they show that the fields are indexed that are used in the report links. Displaying and printing the report from VB6 works. The exporting to Excel doesn't work...

This has been frustrating me for days now and I can't figure out what the hell is wrong:mad:

[RESOLVED] Crystal report how to create the second page in Visual studio

$
0
0
In my report designer i have the first page set up like this picture below:

Name:  1.jpg
Views: 347
Size:  23.2 KB

Now the "details a" contains hours and days when looked there are all days of the month so 31 rows.

Now i have tried everything i think to get a second page with "Details b" containing the details for the person of these records but i cant get it to work.

When i use add page after. all my rows get set to pages so i get 31 pages.

I know section details b is empty but when i fill some other fields there it does not show on the next extra page

Does somebody has a solution?
Attached Images
 

[RESOLVED] Crystal Report File as DataSource

$
0
0
Hello all,
I'm going to be honest here, I'm not entirely sure the title is correct for what i need to do.
I'm trying to re-create some MDB Queries to Crystal Reports for VB.NET and everything has been straight forward until now, one of the reports seems to be using 3 other reports as a data source and it creates its report based on those 3.
I've tried creating a sub-report in CR but I'm unsure if that's what I need to be doing - it doesn't seem to work the same, as i say it looks like i need to create the report using the other reports as the datasource.
I exported the query to a text file and it looks like this:
Code:

SELECT UnCompletedJobsQry.Job_ID AS Expr1, UnCompletedJobsQry.Job_StartDate AS Expr2, UnCompletedJobsQry.Cust_Name AS Expr3, UnCompletedJobsQry.Job_Description AS Expr4, JobSupplierCostQry.SumOfSpInv_Amount AS Expr5, JobTimeCostQry.SumOfTime_Hours AS Expr6, JobTimeCostQry.TimeCost AS Expr7


FROM UnCompletedJobsQry, JobSupplierCostQry, JobTimeCostQry;

My question is, is this possible to do with CR?
My apologies for my ignorance but I'm fairly new to CR and I'm not entirely sure what i should be searching for.
Thanks in advance.
Viewing all 589 articles
Browse latest View live




Latest Images