0

Not so much experience with Crystal Report

My scenario is like this.

Most of the time I have pre-define page structure for e.g. cheque where everything is already printed we just need to write date, amount in word, amount in number and signature. Likewise I will have similar structure paper size may vary A4 is highly used, A5, A3, Letter size are occasionally used.

Now using crystal report can I place dynamically generated data to specific location of that paper. It should be so precise.

enter image description here

In the image above there are pre-defined places where I can write by pen now what I want is dynamically add text to those fields and If we notice Pin Code has multiple boxes even in that case it should be precise so that when this reported is printed it looks nice and clean.

NOTE

  1. I am using C# as a programming language(just for info)
  2. It is winform application

My concern is what would be the appropriate way to achieve this (place dynamically generated text in its appropriate location) without hit and trial method.

To Clarify more

in the above form there is a place to write Admission Date. Now mathematically we will write date in coordinate (x,y) now my problem is how will I determine this x and y coordinate in report designer.

7
  • and what's the question?
    – derloopkat
    Nov 7, 2017 at 17:36
  • @derloopkat Question is what would be the approach to put dynamic data to its appropriate data in that form without hit and trial method Nov 7, 2017 at 17:38
  • What do you mean how to put data dynamic? Where you need to put the text you put a text placeholder.
    – JonH
    Nov 7, 2017 at 17:41
  • @JonH yes but how do we verify that the text placeholder I have placed in report designer will exactly locate in paper where it should go without printing. Nov 7, 2017 at 17:45
  • Sorry I dont understand this issue I cannot help.
    – JonH
    Nov 7, 2017 at 17:45

1 Answer 1

0

If you have to use Crystal Reports to print over a form, you will have to do the "hit and trial method" unfotunatelly.

There are some stuff that can help or at least avoid more problems, like:

  • Enable "Design > Ruler" and "Design > Grid" to help.
  • Adjust the "Report > Properties > GridSize" to give you more precision.
  • Set "Design > Printer Setup > No Printer". This may avoid different results when different printers are plugged because of default margins setting and stuff like that.

But i think you should consider not using Crystal Reports for this task. In my job, we usually approach these cases printing text directly to the printer and we build XML files to indicates the position of each field.

2
  • thank you for valuable suggestions and guidelines regarding crystal report. I wounder how you managed to do with XML. Is there any reference that I can look after? Nov 9, 2017 at 2:29
  • The XML is just the configuration, like: <FIELD NAME="Date" LINE="10" COLUMN="50/>. But the printing is done through the System.Drawing.Printing or more specific ways, like in this git-hub code. All the paths are tough unfortunatelly :( In the sunny side, at least you do not have to print in continuous forms...
    – heringer
    Nov 9, 2017 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.