cancel
Showing results for 
Search instead for 
Did you mean: 

Fields missing while printing crystal reports !!

Former Member
0 Kudos

Hello everyone

I have a crystal report application in VB.NET 2005, which gets the values of a field from the database and supports printing of the report in the following formats

1. pdf

2. directly to a printer - printout

When i export the report using reportdocument to pdf , all the fields are getting printed : Normal - As expected

But when i print the report directly using PrintToPrinter method,i am not able to print some of the fields. i.e some of the entries are missing in that report printout

Can someone guess what could be the problem ???

Are there any limitations / preconfigurations that needs to be done apart from setting page size,margin before using the PrintToPrinter method

Regards

Srivatsa

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

What version of Crystal Reports are you using?

have you ever applied any CR Service packs?

Are you seeing this in a web or win app?

Are you seeing this on your dev system or after you deploy?

What database are you connecting to?

What is the connection method?

As a test, add export to Crystal Reports format right after you print the report. Now open the exported report in the CR designer. Do you see the fields there or are they stripped out?

Ludek

Former Member
0 Kudos

Hello

I'm using the version of the Crystal Reports that ships alongwith the Visual Studio.NET 2005.

We have also tried applying the latest service packs crxir2_sp4_full_build

The behaviour is seen in the web application and the behaviour is seen both in the dev and deployment system.

The database we are connecting to is SQL Server 2005 and SQL Server 2005 Express and the connection method is through ODBC datasource which connects to the database.

Also i tried exporting to pdf soon before / after printing. But the fields are present in the pdf and not on the printouts

Thanks for your time

Srivatsa

Edited by: Srivatsa Haridas on Nov 4, 2008 6:59 AM

former_member183750
Active Contributor
0 Kudos

OK, a few incongruencies here:

I'm using the version of the Crystal Reports that ships along with the Visual Studio.NET 2005.

- that would make is CR 10.2

We have also tried applying the latest service packs crxir2_sp4_full_build

- So SP 4 for CR XI release 2 would not do you much good as per above (if you are indeed using CR 10.2(?))

- How did you get to the crxir2_sp4_full_build? This is in a gated section of the SAP website. The only publically available SP 4 for CR XI r2 is "incremental... If you did apply crxir2_sp4_full_build, then you are working with CR XI r2 now...

The behavior is seen in the web application and the behavior is seen both in the dev and deployment system.

- So this does not work anywhere? If so, why bother going to deployment?

Also i tried exporting to pdf soon before / after printing. But the fields are present in the pdf and not on the printouts

- Confirm that you do see the fields on an exported PDF and when you print the PDF you get a blank printout?

More clarification needed:

We need to be absolutely clear on what version of Crystal Reports you are using. Open your .NET project, go to your references and look for CrystalDecisions.Crystalreports.Engine.dll. What version is this assembly?

Also, please answer the rest of the questions above.

Ludek

Former Member
0 Kudos

Hello Ludek

The references show the version of Crystal Reports my Visual Studio is using is 10.2.3600.0

Q - So this does not work anywhere? If so, why bother going to deployment?

We werent keen on deploying had we known this issue in the first place Actually first we saw this issue on a deployed system and then i was able to reproduce it on the dev system

Q - Confirm that you do see the fields on an exported PDF and when you print the PDF you get a blank printout?

_*If i take a printout from pdf i get everything.

Currently my workaround is based on this i print the pdf file in the background on click of print*_

I had downloaded crxir2_sp4_full_build SP based on some peoples feedback on msdn forums.

Regards

Srivatsa

Edited by: Srivatsa Haridas on Nov 5, 2008 5:41 AM

Edited by: Srivatsa Haridas on Nov 5, 2008 5:41 AM

Edited by: Srivatsa Haridas on Nov 5, 2008 5:42 AM

Edited by: Srivatsa Haridas on Nov 5, 2008 5:42 AM

Edited by: Srivatsa Haridas on Nov 5, 2008 5:43 AM

former_member183750
Active Contributor
0 Kudos

Oh, OK I get it now. You never tried to print from the dev system and only found out the issue when you tried to print on the deployed system.

Does the worker process actually see the printers? E.g.; if as a test you add this code to your aspx page:

Dim cePrinter As String

For Each cePrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters

Response.Write(cePrinter)

Response.Write("<BR>")

Next

do you see the printers? If you do, another suggestion:

In the design of the report, right click on any unused space and from the pop up menu select "Design" -> "Printer setup". Place a check mark at "No Printer". Compile and see if that helps.

I'd also recommend seeing this blog re. troubleshooting development issues:

Ludek

Former Member
0 Kudos

Hello Ludek

Actually i get all the list of available printers and also i am able to print to those. My only issue is that some fields go missing while i take direct printouts thru PrintToPrinter method from .NET ReportDocument object.

Its looks more like this :

For ex:

If my exported pdf shows this

Heading 1 Heading2

-


aaaaa bbbbb

ccccc ddddd

The direct printout shows some entries missing.

In this case 'ddddd'

Heading 1 Heading2

-


aaaaa bbbbb

ccccc

Can i try applying this cr10win_en_sp6 service pack.Will this be useful ???

Regards

Srivatsa

former_member183750
Active Contributor
0 Kudos

For CR 10.2 you want to use this Service pack:

https://smpdl.sap-ag.de/~sapidp/012002523100006007872008E/crvs05sp1.exe

Then you want to use this [msm|https://smpdl.sap-ag.de/~sapidp/012002523100005853292008E/cr_net_2005_mm_mlb_x86.zip] and create your own msi to deploy the equivalent runtime:

The SP you mention is for CR 10.0

Ludek

Former Member
0 Kudos

Hello Ludek

Is there any extra configuration that is needed once you install the service packs ??

former_member183750
Active Contributor
0 Kudos

Not at all. The dlls get updated - no extra work by you needed.

Ludek

Former Member
0 Kudos

Ok thanks Ludek

But my problem still remains unresolved

I tried all the service packs for the crystal reports and latest drivers for my printer but still no luck

Am pretty clueless ...

Srivatsa

former_member183750
Active Contributor
0 Kudos

1) What is the version of the CR Assembly crystaldecisions.crystalreports.engine referenced now in your project?

2) Is the printer driver installed locally?

3) How is the printing if you enable "no printer" in the printer options of the Crystal Report?

4) Let's forget printing for now. Throw CR viewer on the form and try to view the report. Do you see the fields now?

5) If no in (4) above, export the report from the viewer to the CR format. Open this report in the design view, do you see the fields there - at least in design?

6) Try the printing in a win app. Does that work?

Ludek

Former Member
0 Kudos

1) What is the version of the CR Assembly crystaldecisions.crystalreports.engine referenced now in your project?

10.2.3600.0

2) Is the printer driver installed locally?

Yes. Currently i am using a local printer for my testing purpose.

3) How is the printing if you enable "no printer" in the printer options of the Crystal Report?

Nothing changes even if i enable No printer option

4) Let's forget printing for now. Throw CR viewer on the form and try to view the report. Do you see the fields now?

I can see the fields on the form and also on the pdf,html,word,excel exported formats. Only place the fields are not showing is when i take the direct printouts.

5) If no in (4) above, export the report from the viewer to the CR format. Open this report in the design view, do you see the fields there - at least in design?

I can see all the fields in the CR designer. The strange thing is only the field objects are missing but the field headers are present.

6) Try the printing in a win app. Does that work?

Could you please explain what do you mean when you say "printing in a win app" ???

you mean printing on a windows application?

Edited by: Srivatsa Haridas on Nov 11, 2008 10:37 AM

Former Member
0 Kudos

Hello Ludek

The field value in the report is from a column of the database which has the datatype as nvarchar(max)

could this in someway can cause problem ???

Regards

Srivatsa

former_member183750
Active Contributor
0 Kudos

The field value in the report is from a column of the database which has the datatype as nvarchar(max)

could this in someway can cause problem ???

- not likely if this works in the designer

Could you please explain what do you mean when you say "printing in a win app" ???

you mean printing on a windows application?

- yes

Also, now that you have a viewer in your project, export to the Crystal Reports format, then print that from the CR designer. Does that work?

Ludek

Answers (0)