Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# printing
I have build some project about transaction in a hospital...
but i don't know how to build the result of the bill transaction.
the result contain like this:
 
NANY HOSPITAL
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
October 02, 2012
 
Medic No. : 000900009
PATIENT NAME: Nurwina
ADDRESS : Indramayu ST, No.33 West Java.
 

NO LIST ACT BILL
1 VB 20000
2 JX 30000
================ +
TOTAL = 50000
 
NO LIST DRUGS BILL
1 PARACETAMOL 7000
2 DEXAM 8000
================ +
TOTAL = 15000
Posted 1-Oct-12 18:04pm
Edited 1-Oct-12 18:30pm
v2
Comments
adesusan at 7-Oct-12 7:56am
   
I like your answer, but could you give an example about that... I have no Idea about 2 queries in one and of them is details for another.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You build the result by querying the underling tables which hold the respective pieces of data using joins on primary and foreign keys.
 
It is entirely possible that you may require at least 2 queries, one for the "master" and one for the "details" of your report.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

The answer is print the panel of form using this code:
void PrintImage(object o, PrintPageEventArgs e)
        {
            Bitmap img = new Bitmap(panel3.Width, panel3.Height);
            InvertZOrderOfControls(panel3.Controls);
            panel3.DrawToBitmap(img, new Rectangle(new Point(), panel3.Size));
            InvertZOrderOfControls(panel3.Controls);
            Point p = new Point(0, 0);
            e.Graphics.DrawImage(img, p);
        }
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 23 Sep 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid